@equiem/eslint-config v6.0.40
@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
// .eslintrc.js
module.exports = {
root: true,
extends: [
"@equiem", // For TS projects or mixed TS/JS projects.
// "@equiem/eslint-config/browser", // For projects running in the browser.
],
};
// .prettierrc
"@equiem/prettier-config"
Extras
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:
// .eslintrc.js
module.exports = {
overrides: [
{
// This must be a valid path inside your TypeScript source folders.
files: ["src/**/*.js", "src/**/*.jsx"],
rules: { "deprecation/deprecation": "warn" },
},
],
};
12 months ago
12 months ago
1 year ago
1 year ago
1 year ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago