🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

eslint-config-google

Package Overview
Dependencies
Maintainers
2
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-config-google - npm Package Compare versions

Comparing version

to
0.7.1

7

index.js

@@ -36,3 +36,2 @@ /**

// 'no-console': 2, // eslint:recommended
// 'no-condition': 2, // eslint:recommended
// 'no-constant-condition': 2, // eslint:recommended

@@ -66,2 +65,3 @@ // 'no-control-regex': 2, // eslint:recommended

requireParamDescription: false,
requireReturnDescription: false,
requireReturn: false,

@@ -186,3 +186,3 @@ prefer: {returns: 'return'},

'brace-style': 2,
'camelcase': 2,
'camelcase': [2, {properties: 'never'}],
'comma-dangle': [2, 'always-multiline'],

@@ -195,2 +195,3 @@ 'comma-spacing': 2,

'func-call-spacing': 2,
// 'func-name-matching': 0,
// 'func-names': 0,

@@ -222,3 +223,3 @@ // 'func-style': 0,

// 'max-statements': 0,
// 'multiline-ternary': 0, // TODO(philipwalton): add a rule to enfore the
// 'multiline-ternary': 0, // TODO(philipwalton): add a rule to enforce the
// operator appearing at the end of the line.

@@ -225,0 +226,0 @@ 'new-cap': 2,

{
"name": "eslint-config-google",
"version": "0.7.0",
"version": "0.7.1",
"description": "ESLint shareable config for the Google style",

@@ -38,7 +38,7 @@ "license": "Apache-2.0",

"devDependencies": {
"eslint": "^3.5.0"
"eslint": "^3.8.1"
},
"peerDependencies": {
"eslint": ">=3.5.0"
"eslint": ">=3.8.1"
}
}
# eslint-config-google [![Build Status](https://travis-ci.org/google/eslint-config-google.svg?branch=master)](https://travis-ci.org/google/eslint-config-google)
> ESLint [shareable config](http://eslint.org/docs/developer-guide/shareable-configs.html) for the [Google style](http://google.github.io/styleguide/javascriptguide.xml)
> ESLint [shareable config](http://eslint.org/docs/developer-guide/shareable-configs.html) for the [Google JavaScript style guide](http://google.github.io/styleguide/javascriptguide.xml)
Note that there are some [rules](https://github.com/google/eslint-config-google/blob/master/index.js) the Google style guide isn't opinionated about and you might want to set yourself.
## Installation
## Install
```

@@ -17,24 +15,33 @@ $ npm install --save-dev eslint eslint-config-google

Add some ESLint config to your `package.json`:
Once the `eslint-config-google` package is installed, you can use it by specifying `google` in the [`extends`](http://eslint.org/docs/user-guide/configuring#extending-configuration-files) section of your [ESLint configuration](http://eslint.org/docs/user-guide/configuring).
```json
```js
{
"scripts": {
"lint": "eslint ."
},
"devDependencies": {
"eslint": "^3.5.0",
"eslint-config-google": "^0.5.0"
},
"eslintConfig": {
"extends": "google"
}
"extends": "google",
"rules": {
// Additional, per-project rules...
}
}
```
Then lint with `$ npm run lint`.
### Using the `google` config with `eslint:recommended`
There are several rules in the [`eslint:recommended` ruleset](http://eslint.org/docs/rules/) that Google style is not opinionated about that you might want to enforce in your project.
To use Google style in conjunction with ESLint's recommended rule set, extend them both, making sure to list `google` last:
```js
{
"extends": ["eslint:recommended", "google"],
"rules": {
// Additional, per-project rules...
}
}
```
To see how the `google` config compares with `eslint:recommended`, refer to the [source code of `index.js`](https://github.com/google/eslint-config-google/blob/master/index.js), which lists every ESLint rule along with whether (and how) it is enforced by the `google` config.
## License
Apache-2 © Google