Sakina eslint config rules for quick use.
Note
Enable autofix required vscode-eslint extension >= 2.3.0 and set
"eslint.experimental.useFlatConfig": true
config.
pnpm add -D eslint-plugin-sakina
// eslint.config.js
module.exports = require('eslint-plugin-sakina/recommended')()
// eslint.config.js
module.exports = require('eslint-plugin-sakina/react')()
// eslint.config.js
module.exports = require('eslint-plugin-sakina/...')({
// ↓ only one option can be configured:
// use `projectService`
projectService: true,
// or use `project`
tsconfig: './tsconfig.eslint.json', // or ['./tsconfig.json', './packages/*/tsconfig.json']
// ↓ config project root dir
root: __dirname
})
No breaking change.
Migration from v3 :
// eslint.config.js
- module.exports = require('eslint-plugin-sakina/recommended')
+ module.exports = require('eslint-plugin-sakina/recommended')()
@fz6m/eslint-plugin-sakina
: Old version in v2 branch.
MIT