npm install --save-dev eslint@^9 @1024pix/eslint-plugin
const pixEslintConfig = require('@1024pix/eslint-plugin/config');
module.exports = pixEslintConfig;
Note that this ESLint config is not ready to use with ESM.
For example:
{
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint . --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
}
}
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.
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.