@danielwerg/eslint-config

1.0.0 • Public • Published

eslint-config

⚙️ Shared ESLint config

tsconfigPrettier 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

GitHubMarketplace • 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';

Package Sidebar

Install

npm i @danielwerg/eslint-config

Weekly Downloads

607

Version

1.0.0

License

MIT

Unpacked Size

32.4 kB

Total Files

16

Last publish

Collaborators

  • danielwerg