@danielwerg/eslint-config
v1.0.0
Published
Shared ESLint config
Downloads
2,119
Maintainers
Readme
eslint-config
⚙️ Shared ESLint config
💾 Install
yarn add -D @danielwerg/eslint-config
javascript:
yarn add -D eslint prettier eslint-plugin-import
typescript:
yarn add -D eslint typescript @typescript-eslint/parser @typescript-eslint/eslint-plugin prettier eslint-plugin-import
VSCode Prettier ESLint extension
GitHub • Marketplace • VSCode • VSCodium
👀 Usage
.eslintrc.js
/** @type {import('eslint').Linter.Config} */
module.exports = defineConfig({ extends: ['./typescript'], root: true });
TypeScript Aware Rules
Type aware rules are enabled when a tsconfig.eslint.json
is found in the project root, which will introduce some stricter rules into your project. If you want to enable it while have no tsconfig.eslint.json
in the project root, you can change tsconfig name by modifying ESLINT_TSCONFIG
env.
.eslintrc.js
+ process.env['ESLINT_TSCONFIG'] = 'tsconfig.json';