@bagaar/eslint-config is built and maintained by Bagaar.
EsLint config for Bagaar projects.
npm install @bagaar/eslint-config --save-devyarn add @bagaar/eslint-config --devpnpm add @bagaar/eslint-config --save-devExtend your local config with the default export of @bagaar/eslint-config:.
// .eslintrc.js
const config = require('@bagaar/eslint-config');
module.exports = {
...config,
root: true,
};The config value here is just a plain JS object so it can be customised at will. The config will contain different rules based on which dependencies are present, all peerdependencies are therefore optional.
If you want to extend instead of override a property, be sure to spread the original values as well, for example:
// .eslintrc.js
const config = require('@bagaar/eslint-config');
module.exports = {
...config,
root: true,
overrides: [
...config.overrides,
{
files: ['./index.js'],
rules: {
"no-console": 'off',
}
},
]
};To print out the generated config to the console, set the env var DEBUG=true. e.g.:
// package.json
...
"scripts": {
"lint": "eslint . --cache",
"lint:debug": "DEBUG=true eslint .",
},
...
This project is licensed under the MIT License.