2.1.0 • Published 7 months ago
@lintkit/eslint-config v2.1.0
LintKit: ESLint Config
Installation
Install the dependency
npm i --dev @lintkit/eslint-config --saveAdd the cache file to your .gitignore
# Linting
.cacheAdd the scripts to your package.json
"scripts": {
"eslint:dry-run": "eslint app --color --cache --config node_modules/@lintkit/eslint-config/eslint.config.js --cache-location .cache/ --cache-strategy content",
"eslint:fix": "npm run eslint:dry-run -- --fix",
}Local Override
If you need to override some of the config (but keep LintKit defaults), place a file in the root of your project eslint.config.js (or eslint.config.mjs if required)
Update the script to use your local eslint.config.js file instead of the LintKit one.
You can then include the LintKit config and add customisations where required.
import config from '@lintkit/eslint-config/config.js';
config.js.ignores: [
...config.js.ignores,
'**/.Build/**',
]
export default Object.values(config);Upgrading to v2
- Any references to
node_modules/@lintkit/eslint-config/eslint.config.mjsshould be corrected tonode_modules/@lintkit/eslint-config/eslint.config.js