ESLint shareable config
pnpm i -D @alexey-koran/eslint-config
Usage example
Note
allJsTsExtensions
= js, cjs, mjs, jsx, cjsx, mjsx, ts, cts, mts, tsx, ctsx, mtsx
For the more details check scripts section in package.json
Command | Description | Path |
---|---|---|
Code linting & formatting |
||
pnpm prettier |
code format check | **/*.{allJsTsExtensions,pcss} |
pnpm prettier:fix |
code format autofix | **/*.{allJsTsExtensions,pcss} |
pnpm lint |
eslint check | **/*.{allJsTsExtensions} |
pnpm lint:fix |
eslint autofix | **/*.{allJsTsExtensions} |
Analyzation & config check |
||
pnpm test:eslint-config |
eslint config inspector, displays flat configs & rules | |
Note
For the more details check dev & prod dependencies in package.json
Package name | Description | Version |
---|---|---|
eslint | configurable JavaScript linter | v9.12.* |
typescript-eslint | enables ESLint and Prettier to support TypeScript | v8.8.* |
Configs |
||
eslint-config-prettier | turns off all rules that are unnecessary or might conflict with Prettier | v9.1.* |
Plugins |
||
@eslint/js | ESLint JavaScript plugin Separating out JavaScript-specific functionality from ESLint | v9.12.* |
eslint-plugin-import | intends to support linting of ES2015+ (ES6+) import/export syntax, prevent issues with misspelling of file paths and import names | v2.31.* |
eslint-import-resolver-typescript | adds TypeScript support to eslint-plugin-import | v3.6.* |
eslint-import-resolver-webpack | webpack-literate module resolution plugin for eslint-plugin-import | v0.13.* |
eslint-plugin-jsx-a11y | static AST checker for accessibility rules on JSX elements | v6.10.* |
eslint-plugin-prettier | runs Prettier as an ESLint rule and reports differences as individual ESLint issues | v5.2.* |
eslint-plugin-react | React specific linting rules for ESLint | v7.37.* |
eslint-plugin-react-hooks | enforces the Rules of Hooks | v5.1.*-rc |
@stylistic/eslint-plugin-js | JavaScript stylistic rules for ESLint | v2.9.* |
@stylistic/eslint-plugin-jsx | JSX stylistic rules for ESLint | v2.9.* |
@stylistic/eslint-plugin-ts | TypeScript stylistic rules for ESLint | v2.9.* |
Other |
||
globals | global identifiers from different JavaScript environments | v15.10.* |
Package name | Description | Version |
---|---|---|
For local development |
||
@eslint/config-inspector | ESLint config inspector | v0.5.* |
@alexey-koran/prettier-config | Prettier sharing configuration | v0.1* |