2.2.2 β’ Published 7 months ago
@vchikalkin/eslint-config-awesome v2.2.2
@vchikalkin/eslint-config-awesome π
- π οΈ Most rules autofixable
- π― Designed to work with TypeScript, NextJS, React projects
- π Powered by Canonical, SonarJS
- βοΈ Using ESLint Flat config
Requirements
π Usage
π₯ Install
pnpm add -D eslint typescript @vchikalkin/eslint-config-awesome
βοΈ Config eslint.config.js
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
];
β Add script for package.json
For example:
{
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint . --fix"
}
}
β¨ Config VS Code auto 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"
]
}
βοΈ Config .prettierrc
:
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": 100,
"proseWrap": "preserve",
"quoteProps": "as-needed",
"requirePragma": false,
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "all",
"useTabs": false
}
2.3.0
7 months ago
2.2.2
7 months ago
2.2.1
9 months ago
2.2.0
9 months ago
2.1.0
9 months ago
2.0.6
10 months ago
2.0.3
10 months ago
2.0.2
10 months ago
2.0.5
10 months ago
2.0.4
10 months ago
2.0.1
10 months ago
2.0.0
10 months ago
1.1.6
2 years ago
1.1.5
2 years ago
1.1.4
2 years ago
1.1.2
2 years ago
1.1.1
2 years ago
1.1.0
2 years ago
1.0.5
2 years ago
1.0.3
2 years ago
1.0.1
2 years ago
1.0.0
2 years ago