@bancame/eslint-config
v1.1.4
Published
ESLint configuration for Bancame projects using TypeScript and React
Downloads
15
Readme
Bancame ESLint Flat Configuration
A batteries-included, flat-config ESLint setup for TypeScript & React projects, built on top of ESLint v9. It ships with sensible defaults and plugins to cover:
- TypeScript (
@typescript-eslint/parser,@typescript-eslint/eslint-plugin) - React/JSX (
eslint-plugin-react,eslint-plugin-react-hooks,eslint-plugin-react-refresh) - Import ordering (
eslint-plugin-import) - Google Translate helper rules (
eslint-plugin-react-google-translate) - Prettier integration (
eslint-config-prettier)
⚠️ Uses ESLint’s new flat config format. If you prefer classic
.eslintrc.js, see the “Legacy Usage” section below.
Table of Contents
Installation
- Install the package and required peers
npm install --save-dev @bancame/eslint-config- Install ESLint and required plugins
npm install --save-dev eslint-import-resolver-typescriptIf you use React, also install the React plugins:
npm install --save-dev eslint-plugin-react-hooksBasic Usage (flat config)
- Create a
eslint.config.mjsfile in your project root:
import { defineConfig } from 'eslint/config';
import baseConfig from '@bancame/eslint-config';
export default defineConfig(baseConfig);- (Optional) Create an
.eslintignorefile to exclude files/folders from linting, e.g.:
build/
dist/
node_modules/- Run ESLint:
npx eslint . --ext .js,.ts,.jsx,.tsx
Optional: React support
- The config scopes React-specific rules only to .jsx/.tsx files.
- In a non-React repo you may omit installing the React plugins; ESLint will skip those rules automatically.
Legacy Usage (.eslintrc.cjs)
If you’re not ready for flat config, import our defaults into a classic config:
module.exports = require('@bancame/eslint-config').default;Then lint as usual:
npx eslint . --ext .js,.ts,.jsx,.tsxPublishing to npm
To publish this package to npm, follow these steps:
Update the version in
package.json.Update the changelog in
CHANGELOG.mdwith the new version and a summary of changes.- Use the format:
## [x.x.x] - YYYY-MM-DD - Example:
## [1.0.0] - 2025-06-02 - Launch first release with support for eslint v9 and flat config.
- Use the format:
Create a new pull request with the version change.
Wait for the CI to pass.
Merge the pull request.
