ESLint shareable config
pnpm i -D @alexey-koran/eslint-configUsage 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 |
|---|---|---|
| typescript-eslint | enables ESLint and Prettier to support TypeScript | v8.44.* |
Configs |
||
| eslint-config-prettier | turns off all rules that are unnecessary or might conflict with Prettier | v10.1.* |
Plugins |
||
| eslint-plugin-import | intends to support linting of ES2015+ (ES6+) import/export syntax, prevent issues with misspelling of file paths and import names | v2.32.* |
| eslint-import-resolver-typescript | adds TypeScript support to eslint-plugin-import | v4.4.* |
| 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.5.* |
| eslint-plugin-react | React specific linting rules for ESLint | v7.37.* |
| eslint-plugin-react-hooks | enforces the Rules of Hooks | v7.0.* |
| @stylistic/eslint-plugin | Stylistic Formatting for ESLint. Formatting and Linting in one go, with fully customizable rules | v5.4.* |
Other |
||
| globals | global identifiers from different JavaScript environments | v16.4.* |
| Package name | Description | Version |
|---|---|---|
| eslint | configurable JavaScript linter | v9.37.* |
| prettier | opinionated code formatter | v3.6.* |
Plugins |
||
| @eslint/js | ESLint JavaScript plugin Separating out JavaScript-specific functionality from ESLint | v9.37.* |
Other |
||
| @eslint/config-inspector | ESLint config inspector | v1.3.* |
| @alexey-koran/prettier-config | Prettier sharing configuration | v0.1* |