3.1.0 • Published 5 months ago
@saeris/eslint-config v3.1.0
📦 Installation
npm install --save-dev @saeris/eslint-config eslint typescript
# or
yarn add -D @saeris/eslint-config eslint typescript🔧 Usage
.eslintrc.js
// Required line to use shared plugins
require(`@saeris/eslint-config/patch`);
module.exports = {
extends: [
// import all of the rules:
require.resolve("@saeris/eslint-config")
// or import partial rulesets:
// Vanilla ESLint rules, Import & Promise Plugins
require.resolve("@saeris/eslint-config/base"),
// Jest Plugin
require.resolve("@saeris/eslint-config/jest"),
// React, React-Hooks, and JSX-a11y Plugins
require.resolve("@saeris/eslint-config/react"),
// Typescript ESLint Plugin basic rules
require.resolve("@saeris/eslint-config/typescript"),
// Typescript-ESLint Plugin rules requiring Type Information
require.resolve("@saeris/eslint-config/type-aware")
]
};By default, the type-aware ruleset will look for some common Typescript configuration file names from the following:
tsconfig-eslint.jsontsconfig.eslint.jsontsconfig.json
If none of the above are found, the parser will throw an error. If you have a custom tsconfig you would like to use, you can override the default setting by setting your ESLint config's parserOptions.project field, such as in this example:
.eslintrc.js
require(`@saeris/eslint-config/patch`);
module.exports = {
extends: [require.resolve("@saeris/eslint-config/type-aware")],
parserOptions: {
project: "./path/to/your/config.json"
}
};🥂 License
Released under the MIT license.
3.0.3
5 months ago
3.0.2
5 months ago
3.1.0
5 months ago
3.0.1
5 months ago
3.0.0
5 months ago
2.6.0
2 years ago
2.5.0
2 years ago
2.4.1
2 years ago
2.4.0
2 years ago
2.3.1
3 years ago
2.3.0
3 years ago
2.2.0
3 years ago
2.1.0
4 years ago
2.0.2
5 years ago
2.0.1
5 years ago
2.0.0
5 years ago
1.0.10
5 years ago
1.0.9
5 years ago
1.0.8
5 years ago
1.0.7
5 years ago
1.0.6
5 years ago
1.0.5
5 years ago
1.0.2
5 years ago
1.0.1
5 years ago
1.0.4
5 years ago
1.0.3
5 years ago
1.0.0
5 years ago
0.0.0
5 years ago