https://github.com/1024pix/eslint-plugin
Des règles de lint pour les projets 1024pix
https://github.com/1024pix/eslint-plugin
Last synced: 3 months ago
JSON representation
Des règles de lint pour les projets 1024pix
- Host: GitHub
- URL: https://github.com/1024pix/eslint-plugin
- Owner: 1024pix
- Created: 2023-10-03T08:40:32.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-07-22T05:28:50.000Z (3 months ago)
- Last Synced: 2025-07-22T07:40:18.239Z (3 months ago)
- Language: JavaScript
- Size: 219 KB
- Stars: 0
- Watchers: 12
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# @1024pix/eslint-plugin
[](https://npmjs.com/package/@1024pix/eslint-plugin)
## Usage
### Install
```bash
npm install --save-dev eslint@^9 @1024pix/eslint-plugin
```### Config `eslint.config.cjs`
```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:
```json
{
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint . --fix"
}
}
```### Config VS Code auto fix
Install [VS Code ESLint extension](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) and create `.vscode/settings.json`
```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.
```cjs
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](https://github.com/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](https://eslint.org/docs/latest/use/configure/migration-guide). You can also take inspiration from [this Pix context example](https://github.com/1024pix/pix/pull/8995).
Once finished, `@1024pix/eslint-config` can safely be removed.