Customized Airbnb ESLint configuration for JavaScript and TypeScript projects
First you gotta install it:
npm i --save-dev eslint @deseteral/eslint-config
Then you gotta setup your .eslintrc
to extend that config:
{
"extends": "@deseteral/eslint-config"
}
...or if you're using TypeScript:
{
"extends": "@deseteral/eslint-config/typescript"
}
The last thing you have to do is put linting script in your project's package.json
:
"scripts": {
"lint": "eslint src --ext js,jsx,ts,tsx"
}
- Upgraded dependencies.
- Upgraded ESLint rules dependencies.
- Upgraded dependencies.
- Disabled
no-dupe-class-members
because it's handled by TypeScript.
- Reverted changes from last version.
- Replaced
indent
with it's TypeScript equivalent.
- Bad config for
import/no-default-export
. - Added
function-paren-newline
rule.
- Upgraded deps. ESLint 8 is now minimum required version.
- Removed disabling
dot-notation
rule. - Replaced
import/prefer-default-export
withimport/no-default-export
rule.
- Turned off
react/require-default-props'
rule for TypeScript
- Migrated package-lock to version 2
- Added
type-annotation-spacing
rule for TypeScript
- Upgraded deps
- Upgraded ESLint
- Fixed false-positive
no-shadow
when defining enums in TypeScript
- Fixed false-positive
no-use-before-define
when using TypeScript
- Fixed false-positive
no-unused-expressions
when using optional call expressions in TypeScript
- Upgraded ESLint version
- Upgraded Airbnb config
- Enabled rules of Hooks
- Allowed using
_id
as variable name (for MongoDBObjectID
representation)
- Fixed false-positive
Cannot read property 'map' of undefined
errors for TypeScript
- Disabled
import/extensions
for TypeScript projects
- Upgraded ESLint version
- Upgraded Airbnb config
- Enabled TypeScript extensions for
import/extensions
rule
- Babel parser is now in dependencies not dev dependencies.
- ESLint is now using Babel as its code parser.
- Rule specifing use of operator linebreak.
- JSX is now allowed in files with
.tsx
extension.
- Initial release.
This project is licensed under the MIT license.