- 🛠️ Most rules autofixable
- 🎯 Designed to work with TypeScript, NextJS, React projects
- 🏆 Powered by Canonical, SonarJS
- ⚙️ Using ESLint Flat config
pnpm add -D eslint typescript @vchikalkin/eslint-config-awesome
Common usage:
const config = require('@vchikalkin/eslint-config-awesome');
/** @type {import("eslint").Linter.Config} */
module.exports = config['react-typescript'];
Extend config:
const config = require('@vchikalkin/eslint-config-awesome');
/** @type {import("eslint").Linter.Config} */
module.exports = [
...config['react-typescript'],
{
rules: {
'rule-name': 'off',
},
ignores: ['node_modules'],
},
//...other configs
];
For example:
{
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint . --fix"
}
}
Install VS Code ESLint extension, VS Code Prettier extension and create .vscode/settings.json
{
"editor.codeActionsOnSave": {
"source.fixAll": "explicit",
"source.fixAll.eslint": "explicit",
"source.removeUnusedImports": "explicit"
},
"eslint.lintTask.enable": true,
"eslint.validate": [
"javascript",
"javascriptreact",
"json",
"typescript",
"typescriptreact",
"yaml"
]
}
Prettier is not needed, ESLint Config Awesome🎉 includes eslint-plugin-prettier with that config:
{
"arrowParens": "always",
"bracketSameLine": false,
"bracketSpacing": true,
"endOfLine": "auto",
"insertPragma": false,
"jsxSingleQuote": false,
"printWidth": 80,
"proseWrap": "preserve",
"quoteProps": "as-needed",
"requirePragma": false,
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "all",
"useTabs": false
}