1.0.0 ⢠Published 2 years ago
@danielwerg/eslint-config v1.0.0
eslint-config
āļø Shared ESLint config
š¾ Install
yarn add -D @danielwerg/eslint-configjavascript:
yarn add -D eslint prettier eslint-plugin-importtypescript:
yarn add -D eslint typescript @typescript-eslint/parser @typescript-eslint/eslint-plugin prettier eslint-plugin-importVSCode 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';