@1024pix/eslint-plugin v2.1.5
@1024pix/eslint-plugin
Usage
Install
npm install --save-dev eslint@^9 @1024pix/eslint-pluginConfig eslint.config.cjs
const pixEslintConfig = require('@1024pix/eslint-plugin/config');
module.exports = pixEslintConfig;Note that this ESLint config is not ready to use with ESM.
Add script for package.json
For example:
{
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint . --fix"
}
}Config VS Code auto fix
Install VS Code ESLint extension and create .vscode/settings.json
{
"prettier.enable": false,
"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
"source.organizeImports": false
}
}FAQ
I prefer XXX...
Sure, you can override the rules in your eslint.config.js file.
const pixEslintConfig = require('@1024pix/eslint-plugin/config');
module.exports = [
...eslintConfig,
{
rules: {
// your rules...
},
},
];Or you can always fork this repo and make your own.
Migration guide
v1.2.0
Before v1.2.0, Pix Config was provided by the @1024pix/eslint-config project.
After upgrading, you should migrate from the old .eslintrc files to the new eslint.config.cjs file format.
Take a look at the official ESLint migration guide. You can also take inspiration from this Pix context example.
Once finished, @1024pix/eslint-config can safely be removed.
7 months ago
10 months ago
8 months ago
11 months ago
6 months ago
9 months ago
6 months ago
10 months ago
5 months ago
9 months ago
9 months ago
11 months ago
11 months 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