Update version and update site.
A heavily customized ESLint config and plugin for JavaScript following the Google JavaScript style guide.
Check out the demo page.
Recognizes goog.scope as an immediately invoked function expression (IIFE) that doesn’t increase the indent.
goog.scope
goog.scope(function() { var noIndent = 2; });
Recognizes goog.provide and goog.require.
goog.provide
goog.require
goog.provide('my.module'); goog.require('other.module'); my.module.Foo = other.module.Bar;
Avoids flagging typedef, export and other type-related tags as unused.
typedef
export
/** @export {number} */ my.module.foo = 2;
See the Google JavaScript style guide for the rest of the rules.
This is not an official Google product (experimental or otherwise), it is just code that happens to be owned by Google.
Pull requests are always welcome. To get started, install Bazel, Google’s open-source build system, and Yarn, an NPM replacement.
A typical development flow looks like this:
make develop
make test
git commit
git push
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802032778号
Closure Linter - ESLint Plugin and Config for the Google JavaScript Style Guide
A heavily customized ESLint config and plugin for JavaScript following the Google JavaScript style guide.
Check out the demo page.
Google Style Guide Specific Features
Recognizes
goog.scopeas an immediately invoked function expression (IIFE) that doesn’t increase the indent.Recognizes
goog.provideandgoog.require.Avoids flagging
typedef,exportand other type-related tags as unused.See the Google JavaScript style guide for the rest of the rules.
Disclaimer
This is not an official Google product (experimental or otherwise), it is just code that happens to be owned by Google.
Developing
Pull requests are always welcome. To get started, install Bazel, Google’s open-source build system, and Yarn, an NPM replacement.
A typical development flow looks like this:
make developto download dependencies from NPM and to link the projects together.make testto ensure everything works first.make testgit commitgit push