pnpm i -D @nekochan0122/config
- Install ESLint
pnpm i -D eslint typescript-eslint @eslint/js @eslint/compat @types/eslint__js
- Install Base Plugins
pnpm i -D globals @stylistic/eslint-plugin eslint-plugin-import eslint-plugin-simple-import-sort eslint-plugin-unicorn
- Use it
Base:
import nekoConfig from '@nekochan0122/config/eslint'
import globals from 'globals'
import tseslint from 'typescript-eslint'
export default tseslint.config(
...nekoConfig.presets.base,
{
languageOptions: {
globals: globals.browser, // choose the correct globals for ur project
},
rules: {
'@stylistic/indent': ['error', 4], // you can override rules in here
},
}
)
React:
pnpm i -D eslint-plugin-react eslint-plugin-react-hooks@rc eslint-plugin-react-refresh eslint-plugin-jsx-a11y
import nekoConfig from '@nekochan0122/config/eslint'
import globals from 'globals'
import tseslint from 'typescript-eslint'
export default tseslint.config(
...nekoConfig.presets.react,
{
languageOptions: {
globals: globals.browser,
},
}
)
- Update VSCode Settings (Optional)
{
"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "always"
},
}
Caution
Do not use this config with Prettier or other formatter.
- Install Fonts
Editor
Terminal
- Download Profile
https://github.com/nekochan0122/config/blob/main/src/vscode
- Import Profile
File -> Preferences -> Profile -> Import