A shared ESLint configuration
yarn add --dev @jenssimon/eslint-config-base
npm install @jenssimon/eslint-config-base --save-dev
Based on the ESLint AirBnB Extended.
Additionally:
- line length 120 characters
- no semicolons
- eslint-plugin-unicorn
- eslint-plugin-sonarjs
- eslint-plugin-promise
- eslint-plugin-eslint-comments
Note
This configuration is flat config only.
If you need
eslintrc
support please use a version < 9 of this lint configuration.
import path from 'node:path'
import { includeIgnoreFile } from '@eslint/compat'
import { configs } from '@jenssimon/eslint-config-base'
const gitignorePath = path.resolve('.', '.gitignore')
export default [
includeIgnoreFile(gitignorePath),
{
ignores: [
'.yarn/',
],
},
...configs.base,
// for Node.js environments
...configs.node,
]
MIT © 2019 Jens Simon