@tsuk1ko/eslint-config
v2.1.0
Published
Kirin's ESLint config preset, based on [antfu/eslint-config](https://github.com/antfu/eslint-config).
Downloads
78
Readme
eslint-config
Kirin's ESLint config preset, based on antfu/eslint-config.
Usage
Install
npm i -D @tsuk1ko/eslint-config @antfu/eslint-config eslint eslint-config-prettiereslint-config-prettier is optional. If you need it and have installed it, it will be automatically included in the ESLint rules.
Auto-generate configuration
npx tec-initThis will do the things mentioned in the "Manual configuration" below and overwrite existing files.
Manual configuration
Create eslint.config.mjs:
import config from '@tsuk1ko/eslint-config';
export default config();Create .prettierrc.json:
{
"printWidth": 100,
"singleQuote": true,
"trailingComma": "all",
"arrowParens": "avoid",
"useTabs": false,
"tabWidth": 2,
"semi": true
}Create .prettierignore:
auto-imports.d.ts
components.d.ts
**/*.jsAdd npm scripts:
{
"scripts": {
"lint": "eslint",
"lint:fix": "eslint --fix",
"format": "prettier --write src/"
}
}Extends ignores
import config, { defaultIgnores } from './src';
export default config(undefined, {
ignores: [...defaultIgnores, 'add your ignores'],
});Custom
This package provides the same parameters as antfu/eslint-config for customization. Please refer to the antfu/eslint-config documentation for details.
