# Google

The Google JavaScript style guide. Mostly formatting rules, written for the eslintrc format.

- Linter: ESLint
- Package: `eslint-config-google` (https://github.com/google/eslint-config-google)
- Author: Google (community)
- Rules: 60, plus 2 from plugins this site doesn't track
- Weekly downloads: 646.4K, +18.9% last quarter
- Technologies: javascript (60)

## Install

```sh
npm install -D eslint eslint-config-google
pnpm add -D eslint eslint-config-google
yarn add -D eslint eslint-config-google
bun add -d eslint eslint-config-google
```

## Config: `eslint.config.js`

```js
// .eslintrc.json (legacy config format)
{
  "extends": "google"
}
```

## Rules it enables

| Rule | Severity | Description | Reach |
| --- | --- | --- | --- |
| [eslint/no-with](https://lintradar.dev/rules/eslint/no-with.md) | error | Disallow `with` statements | 279.7M |
| [eslint/no-this-before-super](https://lintradar.dev/rules/eslint/no-this-before-super.md) | error | Disallow `this`/`super` before calling `super()` in constructors | 278.1M |
| [eslint/no-irregular-whitespace](https://lintradar.dev/rules/eslint/no-irregular-whitespace.md) | error | Disallow irregular whitespace | 277.6M |
| [eslint/constructor-super](https://lintradar.dev/rules/eslint/constructor-super.md) | error | Require `super()` calls in constructors | 274.1M |
| [eslint/no-unused-vars](https://lintradar.dev/rules/eslint/no-unused-vars.md) | error | Disallow unused variables | 273.9M |
| [eslint/prefer-const](https://lintradar.dev/rules/eslint/prefer-const.md) | error | Require `const` declarations for variables that are never reassigned after declared | 223.9M |
| [eslint/prefer-rest-params](https://lintradar.dev/rules/eslint/prefer-rest-params.md) | error | Require rest parameters instead of `arguments` | 220.5M |
| [eslint/no-unexpected-multiline](https://lintradar.dev/rules/eslint/no-unexpected-multiline.md) | error | Disallow confusing multiline expressions | 197.7M |
| [eslint/no-var](https://lintradar.dev/rules/eslint/no-var.md) | error | Require `let` or `const` instead of `var` | 195.4M |
| [eslint/prefer-spread](https://lintradar.dev/rules/eslint/prefer-spread.md) | error | Require spread operators instead of `.apply()` | 192M |
| [eslint/no-caller](https://lintradar.dev/rules/eslint/no-caller.md) | error | Disallow the use of `arguments.caller` or `arguments.callee` | 102.1M |
| [eslint/new-cap](https://lintradar.dev/rules/eslint/new-cap.md) | error | Require constructor names to begin with a capital letter | 45.9M |
| [eslint/no-array-constructor](https://lintradar.dev/rules/eslint/no-array-constructor.md) | error | Disallow `Array` constructors | 45.5M |
| [eslint/no-new-wrappers](https://lintradar.dev/rules/eslint/no-new-wrappers.md) | error | Disallow `new` operators with the `String`, `Number`, and `Boolean` objects | 22.7M |
| [eslint/no-extend-native](https://lintradar.dev/rules/eslint/no-extend-native.md) | error | Disallow extending native types | 22.7M |
| [eslint/no-extra-bind](https://lintradar.dev/rules/eslint/no-extra-bind.md) | error | Disallow unnecessary calls to `.bind()` | 22.7M |
| [eslint/no-multi-str](https://lintradar.dev/rules/eslint/no-multi-str.md) | error | Disallow multiline strings | 21.5M |
| [eslint/no-throw-literal](https://lintradar.dev/rules/eslint/no-throw-literal.md) | error | Disallow throwing literals as exceptions | 20.9M |
| [eslint/no-new-object](https://lintradar.dev/rules/eslint/no-new-object.md) | error | Disallow `Object` constructors | 19M |
| [eslint/no-new-symbol](https://lintradar.dev/rules/eslint/no-new-symbol.md) | error | Disallow `new` operators with the `Symbol` object | 17.8M |
| [eslint/rest-spread-spacing](https://lintradar.dev/rules/eslint/rest-spread-spacing.md) | error | Enforce spacing between rest and spread operators and their expressions | 17.8M |
| [eslint/one-var](https://lintradar.dev/rules/eslint/one-var.md) | error | Enforce variables to be declared either together or separately in functions | 17.4M |
| [eslint/prefer-promise-reject-errors](https://lintradar.dev/rules/eslint/prefer-promise-reject-errors.md) | error | Require using Error objects as Promise rejection reasons | 16.9M |
| [eslint/curly](https://lintradar.dev/rules/eslint/curly.md) | error | Enforce consistent brace style for all control statements | 16.7M |
| [eslint/eol-last](https://lintradar.dev/rules/eslint/eol-last.md) | error | Require or disallow newline at the end of files | 14.2M |
| [eslint/no-trailing-spaces](https://lintradar.dev/rules/eslint/no-trailing-spaces.md) | error | Disallow trailing whitespace at the end of lines | 14.2M |
| [eslint/quotes](https://lintradar.dev/rules/eslint/quotes.md) | error | Enforce the consistent use of either backticks, double, or single quotes | 14.2M |
| [eslint/camelcase](https://lintradar.dev/rules/eslint/camelcase.md) | error | Enforce camelcase naming convention | 14M |
| [eslint/spaced-comment](https://lintradar.dev/rules/eslint/spaced-comment.md) | error | Enforce consistent spacing after the `//` or `/*` in a comment | 13.7M |
| [eslint/array-bracket-spacing](https://lintradar.dev/rules/eslint/array-bracket-spacing.md) | error | Enforce consistent spacing inside array brackets | 13.7M |
| [eslint/block-spacing](https://lintradar.dev/rules/eslint/block-spacing.md) | error | Disallow or enforce spaces inside of blocks after opening block and before closing block | 13.7M |
| [eslint/brace-style](https://lintradar.dev/rules/eslint/brace-style.md) | error | Enforce consistent brace style for blocks | 13.7M |
| [eslint/comma-dangle](https://lintradar.dev/rules/eslint/comma-dangle.md) | error | Require or disallow trailing commas | 13.7M |
| [eslint/comma-spacing](https://lintradar.dev/rules/eslint/comma-spacing.md) | error | Enforce consistent spacing before and after commas | 13.7M |
| [eslint/comma-style](https://lintradar.dev/rules/eslint/comma-style.md) | error | Enforce consistent comma style | 13.7M |
| [eslint/computed-property-spacing](https://lintradar.dev/rules/eslint/computed-property-spacing.md) | error | Enforce consistent spacing inside computed property brackets | 13.7M |
| [eslint/func-call-spacing](https://lintradar.dev/rules/eslint/func-call-spacing.md) | error | Require or disallow spacing between function identifiers and their invocations | 13.7M |
| [eslint/generator-star-spacing](https://lintradar.dev/rules/eslint/generator-star-spacing.md) | error | Enforce consistent spacing around `*` operators in generator functions | 13.7M |
| [eslint/indent](https://lintradar.dev/rules/eslint/indent.md) | error | Enforce consistent indentation | 13.7M |
| [eslint/key-spacing](https://lintradar.dev/rules/eslint/key-spacing.md) | error | Enforce consistent spacing between keys and values in object literal properties | 13.7M |
| [eslint/keyword-spacing](https://lintradar.dev/rules/eslint/keyword-spacing.md) | error | Enforce consistent spacing before and after keywords | 13.7M |
| [eslint/no-mixed-spaces-and-tabs](https://lintradar.dev/rules/eslint/no-mixed-spaces-and-tabs.md) | error | Disallow mixed spaces and tabs for indentation | 13.7M |
| [eslint/no-multi-spaces](https://lintradar.dev/rules/eslint/no-multi-spaces.md) | error | Disallow multiple spaces | 13.7M |
| [eslint/no-multiple-empty-lines](https://lintradar.dev/rules/eslint/no-multiple-empty-lines.md) | error | Disallow multiple empty lines | 13.7M |
| [eslint/no-tabs](https://lintradar.dev/rules/eslint/no-tabs.md) | error | Disallow all tabs | 13.7M |
| [eslint/object-curly-spacing](https://lintradar.dev/rules/eslint/object-curly-spacing.md) | error | Enforce consistent spacing inside braces | 13.7M |
| [eslint/operator-linebreak](https://lintradar.dev/rules/eslint/operator-linebreak.md) | error | Enforce consistent linebreak style for operators | 13.7M |
| [eslint/padded-blocks](https://lintradar.dev/rules/eslint/padded-blocks.md) | error | Require or disallow padding within blocks | 13.7M |
| [eslint/quote-props](https://lintradar.dev/rules/eslint/quote-props.md) | error | Require quotes around object literal property names | 13.7M |
| [eslint/semi](https://lintradar.dev/rules/eslint/semi.md) | error | Require or disallow semicolons instead of ASI | 13.7M |
| [eslint/semi-spacing](https://lintradar.dev/rules/eslint/semi-spacing.md) | error | Enforce consistent spacing before and after semicolons | 13.7M |
| [eslint/space-before-blocks](https://lintradar.dev/rules/eslint/space-before-blocks.md) | error | Enforce consistent spacing before blocks | 13.7M |
| [eslint/space-before-function-paren](https://lintradar.dev/rules/eslint/space-before-function-paren.md) | error | Enforce consistent spacing before `function` definition opening parenthesis | 13.7M |
| [eslint/yield-star-spacing](https://lintradar.dev/rules/eslint/yield-star-spacing.md) | error | Require or disallow spacing around the `*` in `yield*` expressions | 13.7M |
| [eslint/guard-for-in](https://lintradar.dev/rules/eslint/guard-for-in.md) | error | Require `for-in` loops to include an `if` statement | 13.2M |
| [eslint/arrow-parens](https://lintradar.dev/rules/eslint/arrow-parens.md) | error | Require parentheses around arrow function arguments | 10.6M |
| [eslint/linebreak-style](https://lintradar.dev/rules/eslint/linebreak-style.md) | error | Enforce consistent linebreak style | 10.6M |
| [eslint/max-len](https://lintradar.dev/rules/eslint/max-len.md) | error | Enforce a maximum line length | 10.6M |
| [eslint/switch-colon-spacing](https://lintradar.dev/rules/eslint/switch-colon-spacing.md) | error | Enforce spacing around colons of switch statements | 10.6M |
| [eslint/no-invalid-this](https://lintradar.dev/rules/eslint/no-invalid-this.md) | error | Disallow use of `this` in contexts where the value of `this` is `undefined` | 646.4K |

---

Web page: https://lintradar.dev/presets/google. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
