@paleite/eslint-config
This package includes @paleite's shareable ESLint configuration.
Features
- Defines a set of base rules common across all projects
- Automatically adds React rules for projects that use React
- Automatically adds TypeScript rules for projects written in TypeScript
- Automatically disables conflicting rules
Installation
$ yarn add -D @paleite/eslint-config
Configuration
.eslintrc
:
{ "extends": ["@paleite"] }
NB: If you're using this config for a TypeScript project, make sure you also
follow the TypeScript-instructions
For React projects
No additional steps necessary.
For TypeScript projects
You must define the absolute path to each tsconfig.json
-file in the
parserOptions.project
property. Prefer using globs over specifying each folder
explicitly, because specifying each one individually makes the linter perform a
lot slower.
eslint.config.js
:
module.exports = {
extends: ["@paleite"],
parserOptions: {
project: ["./packages/*/tsconfig.json", "./tsconfig.eslint.json"],
tsconfigRootDir: __dirname,
},
};
For more information on how to configure this, see
@typescript-eslint's official documentation