Browse by type
The most strict (yet practical) ESLint config.
Aims to include as many plugins and rules as possible to make your code extremely consistent and robust.
51 plugins. 1376 rules.
npm install eslint-config-hardcore --save-dev
Available configs:
hardcore - base framework-agnostic confighardcore/ts - additional config for TypeScripthardcore/node- additional config for Node.jshardcore/react - additional config for Reacthardcore/react-performance - additional React config with performance ruleshardcore/vue - additional config for Vue 3/Nuxt 3hardcore/react-testing-library - additional config for React Testing Libraryhardcore/jest - additional config for Jesthardcore/fp - additional config for functional programminghardcore/ts-for-js - additional config for linting JavaScript with
typescript-eslintExample .eslintrc.json for a React project:
{
"root": true,
"extends": [
"hardcore",
"hardcore/react",
"hardcore/react-performance",
"hardcore/react-testing-library",
"hardcore/jest",
"hardcore/fp"
],
"env": {
"browser": true
},
"overrides": [
{
"files": ["server/**/*.js"],
"extends": ["hardcore/node"],
"env": {
"browser": false
}
}
]
}
Example .eslintrc.json for a TypeScript React project:
{
"root": true,
"extends": [
"hardcore",
"hardcore/react",
"hardcore/react-performance",
"hardcore/react-testing-library",
"hardcore/jest",
"hardcore/fp",
"hardcore/ts"
],
"parserOptions": {
"project": true
},
"env": {
"browser": true
},
"overrides": [
{
"files": ["server/**/*.ts"],
"extends": ["hardcore/node"],
"env": {
"browser": false
}
}
]
}
Example .eslintrc.json for a Vue 3 project:
{
"root": true,
"extends": ["hardcore", "hardcore/vue"],
"settings": {
"import/resolver": {
"alias": {
"map": [["@", "./src/"]],
"extensions": [".js", ".vue"]
}
}
}
}
Example .eslintrc.json for a Nuxt 3 project:
{
"root": true,
"extends": ["hardcore", "hardcore/vue"],
"settings": {
"import/resolver": {
"alias": {
"map": [
["@", "./"],
["#imports", ".nuxt/imports.d.ts"]
],
"extensions": [".js", ".vue"]
}
}
}
}
Example .eslintrc.json for a TypeScript Vue 3 project (depending on
project configuration, you might want to change "project": true to
"project": "tsconfig.app.json"):
{
"root": true,
"extends": ["hardcore", "hardcore/ts", "hardcore/vue"],
"parserOptions": {
"project": true
},
"overrides": [
{
"files": [
"vite.config.*",
"vitest.config.*",
"cypress.config.*",
"playwright.config.*"
],
"parserOptions": {
"project": "tsconfig.node.json"
}
},
{
"files": ["src/**/__tests__/*"],
"parserOptions": {
"project": "tsconfig.vitest.json"
}
}
]
}
Example .eslintrc.json for a TypeScript Nuxt 3 project:
{
"root": true,
"extends": ["hardcore", "hardcore/ts", "hardcore/vue"],
"parserOptions": {
"project": true
}
}
hardcoreBase framework-agnostic config.
¹ json/yml/toml plugins actually include several rules, but I consider each plugin as a single "no-invalid" rule.
hardcore/tsConfig for TypeScript.
| Plugin | Enabled rules |
|---|---|
| typescript-eslint | 105 |
| eslint-plugin-etc | 10 |
| eslint-plugin-total-functions | 8 |
| @shopify/eslint-plugin | 3 |
| eslint-plugin-sonarjs | 1 |
| eslint-plugin-sort-class-members | 1 |
| eslint-plugin-decorator-position | 1 |
| eslint-plugin-no-explicit-type-exports | 1 |
| eslint-plugin-typescript-compat | 1 |
| Total: | 131 |
hardcore/nodeConfig for Node.js.
| Plugin | Enabled rules |
|---|---|
| eslint-plugin-sonarjs | 53 |
| eslint-plugin-n | 34 |
| eslint-plugin-sdl | 1 |
| Total: | 88 |
hardcore/reactConfig for React.
hardcore/react-performanceConfig with performance rules for React.
| Plugin | Enabled rules |
|---|---|
| eslint-plugin-react | 4 |
| eslint-plugin-react-perf | 4 |
| eslint-plugin-react-usememo | 1 |
| Total: | 9 |
hardcore/vueConfig for Vue 3/Nuxt 3.
| Plugin | Enabled rules |
|---|---|
| eslint-plugin-vue | 173 |
| eslint-plugin-vuejs-accessibility | 20 |
| eslint-plugin-vue-scoped-css | 12 |
| eslint-plugin-sonarjs | 1 |
| Total: | 206 |
hardcore/react-testing-libraryConfig for React Testing Library.
| Plugin | Enabled rules |
|---|---|
| [eslint-plugin-testing-library](https://github.com/testing- |
—
$ claude mcp add eslint-config-hardcore \
-- python -m otcore.mcp_server <graph>