@ethang/eslint-config
v20.1.1
Published
[View Config](https://eslint-config-ethang.pages.dev/rules)
Downloads
622
Readme
Relentless. Unapologetic.
[!CAUTION] Do not use this with Prettier! Styling rules are included.
- 835 errored rules.
- 241 rules from eslint-plugin-sonarjs
- 143 rules from @eslint/js
- 116 rules from sindresorhus/eslint-plugin-unicorn
- 105 rules from @typescript/eslint
- 68 rules from @stylistic/eslint-plugin
- 34 rules from jsx-a11y
- 32 rules from eslint-plugin-lodash
- 25 rules from @stylistic/eslint-plugin-ts
- 20 rules from eslint-plugin-n
- 20 rules from eslint-plugin-perfectionist
- 7 rules from eslint-plugin-tailwindcss
- 7 rules from @eslint/markdown
- 5 rules from @tanstack/eslint-plugin-query
- 5 rules from @eslint/json
- 3 rules from eslint-plugin-barrel-files
- 1 rule from eslint-plugin-depend
- 1 rule from eslint-plugin-compat
- 1 rule from @tanstack/eslint-plugin-router
- 1 rule from @cspell/eslint-plugin
Add Even More!
- 64 rules for Angular
import angularConfig from "@ethang/eslint-config/config.angular.js";
- 38 rules from @angular-eslint/eslint-plugin
- 26 rules from @angular-eslint/eslint-plugin-template
- 52 rules for Astro
import astroConfig from "@ethang/eslint-config/config.astro.js";
- 52 rules from eslint-plugin-astro
- 85 rules for React
import reactConfig from "@ethang/eslint-config/config.react.js";
- 82 rules from @eslint-react/eslint-plugin
- 2 rules from eslint-plugin-react-hooks
- 1 rules from eslint-plugin-react-compiler
- 18 rules for Solid
import solidConfig from "@ethang/eslint-config/config.solid.js";
- 18 rules from eslint-plugin-solid
Install
pnpm i -D eslint typescript-eslint @ethang/eslint-config
Requires TypesScript and tsconfig.json at root directory.
Config
In eslint.config.js
import config from "@ethang/eslint-config/eslint.config.js";
import tseslint from "typescript-eslint";
import astroConfig from "@ethang/eslint-config/config.astro.js"; // OPTIONAL
import reactConfig from "@ethang/eslint-config/config.react.js"; // OPTIONAL
export default tseslint.config(
{
ignores: [], // Ignored files apply to all following configs
},
...config,
...astroConfig,
...reactConfig,
{
languageOptions: {
parserOptions: {
project: true,
tsconfigRootDir: import.meta.dirname,
},
},
rules: {
// Override rules from above configs
},
},
);
Scripts
"scripts": {
"lint": "eslint",
"lint:fix": "eslint . --fix",
}
Browserslist
This config will also lint for browserslist features. Make sure to set this in package.json. More info.
"browserslist": [
"defaults and fully supports es6-module",
"maintained node versions"
]