@vchikalkin/eslint-config-awesome
v1.1.6
Published
Custom ESLint config for Next.js/React/Typescript/Javascript apps
Downloads
5
Maintainers
Readme
@vchikalkin/eslint-config-awesome
- 🛠️ Most rules autofixable
- 🎯 Designed to work with TypeScript, Nextjs, React projects
- 🏆 Powered by Canonical, SonarJS
🚀 Usage
📥 Install
yarn add -D eslint @vchikalkin/eslint-config-awesome
⚙️ Config .eslintrc.js
For Next.js
const { createConfig } = require('@vchikalkin/eslint-config-awesome');
module.exports = createConfig('next-typescript'); // or module.exports = createConfig('next');
For React
const { createConfig } = require('@vchikalkin/eslint-config-awesome');
module.exports = createConfig('react-typescript'); // or module.exports = createConfig('react');
For TypeScript
const { createConfig } = require('@vchikalkin/eslint-config-awesome');
module.exports = createConfig('typescript');
➕ 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.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll": true,
"source.fixAll.eslint": true,
"source.removeUnusedImports": true
},
"eslint.validate": [
"javascript",
"javascriptreact",
"json",
"typescript",
"typescriptreact",
"yaml"
],
"eslint.lintTask.enable": true
}