eslint-config-strict
raw JSON → 14.0.1 verified Sat Apr 25 auth: no javascript deprecated
ESLint shareable config for extremely strict linting, enforcing high code quality and consistency. The current stable version is 14.0.1, which is the final release as the package has been deprecated in favor of eslint-config-strict-es6. It provides a comprehensive set of ESLint rules documented and justified per-rule, covering ES5, ES6, Mocha, browser, and Babel environments. Unlike many other configs, it includes additive presets for React and legacy Node 0.12 support was broken in v10.0.0. No longer actively maintained; last release was in 2017.
Common errors
error Error: Cannot find module 'eslint-config-strict' ↓
cause Package not installed.
fix
Run: npm install --save-dev eslint-config-strict
error Error: Cannot find module 'eslint-plugin-filenames' ↓
cause Missing dependency required by eslint-config-strict.
fix
Run: npm install --save-dev eslint-plugin-filenames
error Configuration for rule 'some-rule' is invalid ↓
cause ESLint version mismatch; newer ESLint may not support deprecated rules.
fix
Use an ESLint version compatible with eslint-config-strict (e.g., ESLint 6.x) or switch config.
Warnings
deprecated eslint-config-strict is deprecated. Use eslint-config-strict-es6 or another modern config. ↓
fix Switch to a maintained config like eslint-config-strict-es6 or eslint-config-airbnb.
breaking Node 0.12 support dropped in v10.0.0. ↓
fix Upgrade Node.js to version 4 or higher.
breaking Old code may cause errors with new configuration due to rule additions/enforcements in v13.0.0, v12.0.0, v11.0.0, etc. ↓
fix Review new rules and update code accordingly; run eslint --fix.
gotcha If using npm < v3, dependencies like eslint-plugin-filenames must be installed manually. ↓
fix Install eslint-plugin-filenames explicitly: npm install --save-dev eslint-plugin-filenames
Install
npm install eslint-config-strict yarn add eslint-config-strict pnpm add eslint-config-strict Imports
- strict wrong
{ "extends": ["eslint-config-strict"] }correct{ "extends": ["strict"] } - strict/es5 wrong
{ "extends": ["strict/es5"] } is correct; no wrong pattern known.correct{ "extends": ["strict/es5"] } - strict/browser wrong
{ "extends": ["strict/browser"] } is correct; ensure env.browser is not also set.correct{ "extends": ["strict/browser"] } - strict/mocha wrong
{ "extends": ["strict/mocha"] } is correct; adding env.mocha is redundant.correct{ "extends": ["strict/mocha"] } - strict/babel wrong
Requires eslint-plugin-babel to be installed separately.correct{ "extends": ["strict/babel"] }
Quickstart
// package.json
{
"devDependencies": {
"eslint": "^6.0.0",
"eslint-config-strict": "^14.0.0",
"eslint-plugin-filenames": "^1.0.0"
},
"eslintConfig": {
"extends": ["strict", "strict/browser", "strict/es5"]
}
}