Merge pull request #74 from google/sigje-small-patch-readme chore: Update link to the newly named branch and Copyright
Merge pull request #74 from google/sigje-small-patch-readme
chore: Update link to the newly named branch and Copyright
ESLint shareable config for the Google JavaScript style guide (ES2015+ version)
$ npm install --save-dev eslint eslint-config-google
Once the eslint-config-google package is installed, you can use it by specifying google in the extends section of your ESLint configuration.
eslint-config-google
google
extends
{ "extends": "google", "rules": { // Additional, per-project rules... } }
eslint:recommended
There are several rules in the eslint:recommended ruleset 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:
{ "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, which lists every ESLint rule along with whether (and how) it is enforced by the google config.
index.js
See License
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802032778号
eslint-config-google
Installation
Usage
Once the
eslint-config-googlepackage is installed, you can use it by specifyinggooglein theextendssection of your ESLint configuration.Using the
googleconfig witheslint:recommendedThere are several rules in the
eslint:recommendedruleset 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
googlelast:To see how the
googleconfig compares witheslint:recommended, refer to the source code ofindex.js, which lists every ESLint rule along with whether (and how) it is enforced by thegoogleconfig.License
See License