This is the ESLint shareable config for the Google JavaScript style guide, forked and updated to support ESLint 9 (Flat Config) while still providing a legacy export.
ESLint shareable config for the Google JavaScript style guide (ES2015+ version)
npm install --save-dev eslint eslint-config-nymph
You can use this config in two ways depending on your ESLint setup:
- ESLint 9+ Flat Config (recommended)
- Create
eslint.config.js
in your project:
import nymph from 'eslint-config-nymph/flat';
export default [
...nymph,
// your project overrides go here
];
- Legacy config (.eslintrc.*)
- In
.eslintrc.json
:
{
"extends": ["eslint-config-nymph"]
}
- ESLint 9 switched to Flat Config and ignores legacy config files unless you use a compatibility layer. Use the
eslint-config-nymph/flat
export with aneslint.config.js
. - Make sure you are running ESLint from the project root where
eslint.config.js
or.eslintrc.*
is located. - If using a monorepo, ensure the config file is visible to the package being linted or pass
--config
explicitly. - Ensure your Node.js version is >= 18.18 since ESLint 9 requires modern Node.
Apache-2 © Google & Web-Tech-TW