eslint-config-btmills
My personal ESLint shareable configurations.
Installation
npm install --save-dev eslint @btmills/eslint-config-btmills
If using ES6 modules, install eslint-plugin-import:
npm install --save-dev eslint-plugin-import
If using React, install eslint-plugin-react and eslint-plugin-react-hooks:
npm install --save-dev eslint-plugin-react eslint-plugin-react-hooks
If using TypeScript, install typescript-eslint:
npm install --save-dev @typescript-eslint/parser @typescript-eslint/eslint-plugin
If using Flow, install babel-eslint and eslint-plugin-flowtype:
npm install --save-dev babel-eslint eslint-plugin-flowtype
Usage
Add one of the following lines to your project's .eslintrc.js
:
module.exports = {
"extends": "@btmills/eslint-config-btmills",
"extends": "@btmills/eslint-config-btmills/es5",
"extends": "@btmills/eslint-config-btmills/es2015",
"extends": "@btmills/eslint-config-btmills/es2016",
"extends": "@btmills/eslint-config-btmills/es2017",
"extends": "@btmills/eslint-config-btmills/es2018",
"extends": "@btmills/eslint-config-btmills/es2019",
"extends": "@btmills/eslint-config-btmills/es2020",
"extends": "@btmills/eslint-config-btmills/es2021",
"extends": "@btmills/eslint-config-btmills/es2022",
"extends": [
"@btmills/eslint-config-btmills/es2015",
"@btmills/eslint-config-btmills/react",
"@btmills/eslint-config-btmills/flow"
],
"overrides": [
{
"files": ["**/*.ts{,x}"],
"extends": ["@btmills/eslint-config-btmills/typescript"]
},
{
"files": ["**/*.ts{,x}"],
"extends": ["@btmills/eslint-config-btmills/typescript-project"],
"parserOptions": {
"project": "./tsconfig.json"
}
}
]
};
License
MIT © Brandon Mills