ESLint config for my projects.
npm install --save-dev eslint @kochurko/eslint-config
Add the following to your .eslintrc.cjs
:
module.exports = {
extends: ["@kochurko/eslint-config"],
root: true,
};
Add the following to your .eslintrc.cjs
:
module.exports = {
extends: ["@kochurko/eslint-config/client"],
};
or for server:
module.exports = {
extends: ["@kochurko/eslint-config/server"],
};
If you're utilizing Prettier, change the root configuration to extend the prettier
preset.
module.exports = {
extends: ["@kochurko/eslint-config", "@kochurko/eslint-config/prettier"],
root: true,
};
If you want to enforce a convention in module import order, extend root config with the additional rules:
module.exports = {
extends: ["@kochurko/eslint-config", "@kochurko/eslint-config/import"],
root: true,
};
If you want to spot accessibility issues, extend root config with the additional rules:
module.exports = {
extends: ["@kochurko/eslint-config", "@kochurko/eslint-config/a11y"],
root: true,
};