eslint-config-aha
raw JSON → 0.1.3 verified Sat Apr 25 auth: no javascript
A shared ESLint configuration for Aha! projects, v0.1.3, with infrequent releases. Based on JavaScript Standard Style with modifications. Requires multiple peer dependencies including ESLint ^4.3.0, eslint-config-standard, and several plugins. Different from standard-config by adding specific overrides for React Rules of Hooks and lodash/underscore deprecation warnings.
Common errors
error Cannot find module 'eslint-config-standard' ↓
cause Missing peer dependency
fix
npm install eslint-config-standard --save-dev
error ESLint couldn't find the config 'aha' ↓
cause eslint-config-aha not installed
fix
npm install eslint-config-aha --save-dev
error Failed to load plugin 'react-hooks' declared in 'eslint-config-aha' ↓
cause Missing eslint-plugin-react-hooks
fix
npm install eslint-plugin-react-hooks@1 --save-dev (note: deprecated, use v4 if possible)
Warnings
deprecated eslint-plugin-react-hooks v1 has been deprecated in favor of v4+ ↓
fix Update eslint-plugin-react-hooks to v4 and adjust rules if necessary.
breaking ESLint version 4 is very old and unsupported; newer ESLint versions may break ↓
fix Upgrade ESLint to v7 or v8 and use eslint-config-aha with updated peer deps or fork.
gotcha Package requires manual installation of all peer dependencies; missing one will cause ESLint to fail ↓
fix Install all peer deps as listed in package.json or use the command from the README.
Install
npm install eslint-config-aha yarn add eslint-config-aha pnpm add eslint-config-aha Imports
- config wrong
{ "extends": "eslint-config-aha" }correct{ "extends": "aha" } - require.resolve wrong
const config = require('eslint-config-aha')correctconst config = require.resolve('eslint-config-aha') - merge configs wrong
{ "extends": "aha" }correct{ "extends": ["airbnb", "aha"] }
Quickstart
// .eslintrc.json
{
"extends": "aha",
"rules": {
// Override rules here
}
}
// Install dependencies
npm install --save-dev eslint eslint-config-aha eslint-config-standard eslint-config-standard-jsx eslint-plugin-import eslint-plugin-node eslint-plugin-promise eslint-plugin-react eslint-plugin-standard eslint-plugin-you-dont-need-lodash-underscore