eslint-config-hardcore
raw JSON → 49.0.0 verified Sat Apr 25 auth: no javascript
The most strict (yet practical) ESLint config, bundling 51 plugins and 1376 rules for maximum code consistency and robustness. Current stable version is 49.0.0, released with a cadence of major updates every few months. It supports ESLint v8 (legacy config format) and TypeScript >=4.7.4. Key differentiators: it is the most comprehensive ESLint config available, covering React, Vue, Node, Jest, FP, performance, and more through modular sub-configs. Notably, v49 is likely the last major release supporting ESLint v8 and legacy config; future versions will target ESLint v9 and flat config, and may drop plain JavaScript support entirely.
Common errors
error Error: Failed to load plugin 'import' declared in 'hardcore': Cannot find module 'eslint-plugin-import' ↓
cause eslint-config-hardcore has many plugin dependencies that must be installed alongside it.
fix
Run 'npm install eslint-config-hardcore --save-dev' which installs all peer dependencies automatically, or manually install missing plugins.
error Parsing error: The keyword 'import' is reserved ↓
cause TypeScript parser not configured when using hardcore/ts config.
fix
Add 'parser': '@typescript-eslint/parser' (or rely on hardcore/ts to set it) and 'parserOptions.project'.
error ESLint couldn't determine the plugin 'unicorn' uniquely. ↓
cause Multiple versions of eslint-plugin-unicorn installed or conflicting plugin aliases.
fix
Ensure only one version of eslint-plugin-unicorn is installed: 'npm dedupe' or check package-lock.
error Configuration for rule 'import/order' is invalid ↓
cause The hardcore config sets very strict import ordering rules that may conflict with existing .eslintrc settings.
fix
Either override the rule in your config: 'rules': { 'import/order': 'off' } or adjust your code to match the expected order.
Warnings
breaking v49.0.0: Updated typescript-eslint to v7, added perfectionist rules, and changed import/docstyle to tomdoc (affects import/no-deprecated). ↓
fix Review new rules; adjust code for tomdoc style in JSDoc comments if needed.
breaking v49.0.0 is the last major release supporting ESLint v8 and legacy config. Next major will require ESLint v9 and flat config. ↓
fix Prepare migration to ESLint v9 and flat config when upgrading beyond v49.
deprecated Future major release will likely support only TypeScript projects; plain JavaScript support may be dropped. ↓
fix Migrate to TypeScript or consider alternative configs if maintaining JS-only projects.
gotcha The config is extremely strict (1376+ rules). Expect many lint errors on existing codebases; incremental adoption recommended. ↓
fix Use eslint's --quiet flag or disable specific rules in your overrides to onboard gradually.
gotcha The 'hardcore/ts' config requires parserOptions.project to be set (commonly 'true' or a tsconfig path). Missing this causes parse errors. ↓
fix Add 'parserOptions': { 'project': true } to your ESLint config.
Install
npm install eslint-config-hardcore yarn add eslint-config-hardcore pnpm add eslint-config-hardcore Imports
- hardcore (config) wrong
importing the package directly in code (e.g., const config = require('eslint-config-hardcore'))correctextends: ['hardcore'] in .eslintrc.json - hardcore/ts wrong
using hardcore/ts without also extending hardcore firstcorrectextends: ['hardcore', 'hardcore/ts'] in .eslintrc.json - hardcore/react wrong
extending hardcore/react without a React environment configuredcorrectextends: ['hardcore', 'hardcore/react'] in .eslintrc.json
Quickstart
// 1. Install
npm install eslint-config-hardcore --save-dev
// 2. Create .eslintrc.json
{
"root": true,
"extends": ["hardcore", "hardcore/ts"],
"parserOptions": {
"project": true
},
"env": {
"browser": true
}
}
// 3. Run ESLint
npx eslint .