README
Bothrs: ESLint configuration
A very opinionated ESLint configuration used at Bothrs.
Prerequisites
- Prettier
- Typescript
Installation
Install the package as a devDependency.
yarn add @bothrs/eslint-config -D
Add the package to the extends
-section of your eslint configuration.
Example .eslintrc.js
file:
// .eslintrc.js
module.exports = {
env: {
es6: true,
node: true,
},
extends: [
'@bothrs/eslint-config',
// Additionally add rules for frameworks
'@bothrs/eslint-config/jest',
'@bothrs/eslint-config/react',
'@bothrs/eslint-config/react-native',
],
// Add parserOptions when using Typescript
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
},
}
Rules
This ESLint config is a collection of plugins and custom rules.