@equiem/eslint-config
Synopsis
This is a preset for eslint for use with TypeScript or JavaScript projects.
Installation
$ npm install --save-dev @equiem/eslint-config @equiem/prettier-config
There will be a number of peer dependencies you will also need to install.
Usage
module.exports = {
root: true,
extends: [
"@equiem",
],
};
// .prettierrc
"@equiem/prettier-config"
Deprecation warnings for JavaScript files
As a general rule we can't enable the deprecation/deprecation
rule for JavaScript files because this rule requires TypeScript type information to work. If you have a mixed TypeScript/JavaScript project then you can enable it for the JavaScript files inside your TypeScript project using the following override:
module.exports = {
overrides: [
{
files: ["src/**/*.js", "src/**/*.jsx"],
rules: { "deprecation/deprecation": "warn" },
},
],
};