Registry / testing / eslint-config-google

eslint-config-google

JSON →
library0.14.0jsnpmunverified

ESLint shareable config enforcing the Google JavaScript style guide (ES2015+ version). The current stable version is 0.14.0, with peer dependency on ESLint >=5.16.0. This package is the official config from Google, updated to match the Google JS style guide. It is an extension of ESLint's base config that overrides rules to comply with Google's coding standards. It is minimal by design – no additional plugins or custom rules beyond style enforcement. Release cadence is low, typically updated for style guide changes. For new projects, consider using the flattened version from google/gts for easier setup.

npm install eslint-config-google
INSTALL
IMPORT
SIG · ESLINT-CONFIG-GOOG
E
eslint-config-google
testingjavascriptv0.14.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

extends: 'google'
Use in eslint config: { "extends": "google" }
import google from 'eslint-config-google' or require('eslint-config-google')
This is an ESLint config, not a JavaScript module. It is used in the .eslintrc or eslintConfig field in package.json under 'extends'.
Usage with eslint:recommended
{ "extends": ["eslint:recommended", "google"] }
{ "extends": ["google", "eslint:recommended"] }
Order matters: 'google' should come last to override any conflicting rules from eslint:recommended.
npm install
npm install --save-dev eslint eslint-config-google
npm install eslint-config-google (without eslint as peer dep)
eslint is a required peer dependency and must be installed separately.

Shows installation, ESLint config setup with google config, and running ESLint on a sample file.

// Install dependencies: // npm install --save-dev eslint eslint-config-google // .eslintrc.json: { "extends": ["eslint:recommended", "google"], "rules": { // Override any rules here "valid-jsdoc": "warn" } } // Example file to lint (test.js): function greet(name) { return 'Hello, ' + name; } console.log(greet('World')); // Run: npx eslint test.js
Debug
Known issues
breakingGoogle's style guide has changed over time; major version bumps in eslint-config-google may introduce new rules or change existing ones, breaking linting on code that previously passed.
fix
Check the changelog and update your code to comply with new rules. Run 'npx eslint --fix' to auto-fix where possible.
affects: >=0.10.0
gotchaThis package only enforces style rules; it does not include any rules beyond what Google style requires. It does not include plugins like @typescript-eslint.
fix
If you need TypeScript support, use '@typescript-eslint/eslint-plugin' and '@typescript-eslint/parser' along with overrides.
affects: >=0.1.0
deprecatedESLint version <5.0.0 is no longer supported by recent versions of eslint-config-google (0.11.0+).
fix
Upgrade ESLint to >=5.16.0.
affects: >=0.11.0
gotchaThe 'google' config does not include 'eslint:recommended' by default. If you extend only 'google', recommended rules like 'no-undef' are not enabled.
fix
Add 'eslint:recommended' to 'extends' array before 'google' to get both sets of rules.
affects: >=0.1.0
gotchaSome rules enforced by Google style may conflict with other plugins (e.g., Prettier). This can cause double-formatting confusion.
fix
Use eslint-config-prettier to disable any rules that conflict with Prettier.
affects: >=0.1.0
Errors
Common errors & fixes
Failed to load config "google" to extend from.
eslint-config-google is not installed or cannot be resolved.
fix
Run 'npm install --save-dev eslint eslint-config-google' to install the package.
ESLint couldn't find the config "google" after extending.
The config name 'google' is not a valid module; it must be installed as a dev dependency.
fix
Ensure eslint-config-google is listed in devDependencies and node_modules/ contains it.
Configuration for rule "google/..." is invalid.
Using a rule from eslint-config-google that doesn't exist (e.g., a plugin rule).
fix
Google config only sets core ESLint rules; there is no such rule prefix. Remove any 'google/' prefixed rules from your config.
Upgrade
Version history
0.14.0latest on npm
Audit
Dependencies
eslintrequiredpeer dependency required; eslint-config-google is a shareable ESLint config that extends ESLint's rules
Agent activity
2 hits · last 30 days
node
2
Resources