EvgenyOrekhov/eslint-config-hardcore

The most strict (yet practical) ESLint config. 53 plugins. 1405 rules. React, Vue, Node, and pure JS/TS.

472

stars

1,916

commits

JavaScript

primary language

Sep 9, 2026

updated

www.npmjs.com/package/eslint-config-hardcore
code-quality
config
eslint
eslint-config
eslintconfig
hardcore
shareable-configs
Browse cluster: ESLint Configuration and Sharing

README

eslint-config-hardcore

npm code style: prettier

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.

53 plugins. 1405 rules.

Usage

npm install eslint-config-hardcore --save-dev

Available configs:

  • hardcore - base framework-agnostic config
  • hardcore/ts - additional config for TypeScript
  • hardcore/node- additional config for Node.js
  • hardcore/react - additional config for React
  • hardcore/react-performance - additional React config with performance rules
  • hardcore/vue - additional config for Vue 3/Nuxt 3
  • hardcore/react-testing-library - additional config for React Testing Library
  • hardcore/jest - additional config for Jest
  • hardcore/fp - additional config for functional programming
  • hardcore/ts-for-js - additional config for linting JavaScript with typescript-eslint

Example .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
  }
}

Configs

hardcore

Base framework-agnostic config.

¹ json/yml/toml plugins actually include several rules, but I consider each plugin as a single "no-invalid" rule.

hardcore/ts

Config for TypeScript.

hardcore/node

Config for Node.js.

hardcore/react

Config for React.

hardcore/react-performance

Config with performance rules for React.

hardcore/vue

Config for Vue 3/Nuxt 3.

hardcore/react-testing-library

Config for React Testing Library.

PluginEnabled rules
eslint-plugin-testing-library24
Total:24

hardcore/jest

Config for Jest.

PluginEnabled rules
eslint-plugin-jest51
eslint-plugin-jest-dom19
Total:70

hardcore/fp

Config for functional programming.

PluginEnabled rules
eslint-plugin-functional9
Total:9

hardcore/ts-for-js

Config for linting JavaScript with typescript-eslint.

Did you know you can lint JavaScript code with typescript-eslint?

Use this config to take advantage of typescript-eslint's advanced type-aware rules (like @typescript-eslint/naming-convention and @typescript-eslint/prefer-optional-chain) without the need to switch to writing TypeScript.

  1. First, you'll need to create tsconfig.json in the root of your project. You don't have to specify any options, just {} should do it.
  2. Then add hardcore/ts-for-js to the overrides section in your .eslintrc like this:
{
  "extends": ["hardcore"],

  "env": {
    "browser": true
  },

  "overrides": [
    {
      "files": ["*.js"],
      "extends": ["hardcore/ts-for-js"],
      "parserOptions": {
        "project": true
      }
    }
  ]
}

Changelog

License

MIT

Contributors

EvgenyOrekhov

1,550 commits

dependabot[bot]

290 commits

alexkramer98

33 commits

EvgenyOrekhov/eslint-config-hardcore

The most strict (yet practical) ESLint config. 53 plugins. 1405 rules. React, Vue, Node, and pure JS/TS.

472

stars

1,916

commits

JavaScript

primary language

Sep 9, 2026

updated

www.npmjs.com/package/eslint-config-hardcore
code-quality
config
eslint
eslint-config
eslintconfig
hardcore
shareable-configs
Browse cluster: ESLint Configuration and Sharing

README

eslint-config-hardcore

npm code style: prettier

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.

53 plugins. 1405 rules.

Usage

npm install eslint-config-hardcore --save-dev

Available configs:

  • hardcore - base framework-agnostic config
  • hardcore/ts - additional config for TypeScript
  • hardcore/node- additional config for Node.js
  • hardcore/react - additional config for React
  • hardcore/react-performance - additional React config with performance rules
  • hardcore/vue - additional config for Vue 3/Nuxt 3
  • hardcore/react-testing-library - additional config for React Testing Library
  • hardcore/jest - additional config for Jest
  • hardcore/fp - additional config for functional programming
  • hardcore/ts-for-js - additional config for linting JavaScript with typescript-eslint

Example .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
  }
}

Configs

hardcore

Base framework-agnostic config.

¹ json/yml/toml plugins actually include several rules, but I consider each plugin as a single "no-invalid" rule.

hardcore/ts

Config for TypeScript.

hardcore/node

Config for Node.js.

hardcore/react

Config for React.

hardcore/react-performance

Config with performance rules for React.

hardcore/vue

Config for Vue 3/Nuxt 3.

hardcore/react-testing-library

Config for React Testing Library.

PluginEnabled rules
eslint-plugin-testing-library24
Total:24

hardcore/jest

Config for Jest.

PluginEnabled rules
eslint-plugin-jest51
eslint-plugin-jest-dom19
Total:70

hardcore/fp

Config for functional programming.

PluginEnabled rules
eslint-plugin-functional9
Total:9

hardcore/ts-for-js

Config for linting JavaScript with typescript-eslint.

Did you know you can lint JavaScript code with typescript-eslint?

Use this config to take advantage of typescript-eslint's advanced type-aware rules (like @typescript-eslint/naming-convention and @typescript-eslint/prefer-optional-chain) without the need to switch to writing TypeScript.

  1. First, you'll need to create tsconfig.json in the root of your project. You don't have to specify any options, just {} should do it.
  2. Then add hardcore/ts-for-js to the overrides section in your .eslintrc like this:
{
  "extends": ["hardcore"],

  "env": {
    "browser": true
  },

  "overrides": [
    {
      "files": ["*.js"],
      "extends": ["hardcore/ts-for-js"],
      "parserOptions": {
        "project": true
      }
    }
  ]
}

Changelog

License

MIT

Contributors

EvgenyOrekhov

1,550 commits

dependabot[bot]

290 commits

alexkramer98

33 commits

Languages

JavaScript

54.2%

TypeScript

23.0%

HTML

15.8%

Vue

7.1%