tools: update to ESLint 4.12.0 by cjihrig · Pull Request #16948 · nodejs/node · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tools/eslint/README.md
8 changes: 5 additions & 3 deletions tools/eslint/conf/default-cli-options.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ module.exports = {
ignorePath: null,
cache: false,

// in order to honor the cacheFile option if specified
// this option should not have a default value otherwise
// it will always be used
/*
* in order to honor the cacheFile option if specified
* this option should not have a default value otherwise
* it will always be used
*/
cacheLocation: "",
cacheFile: ".eslintcache",
fix: false,
Expand Down
132 changes: 128 additions & 4 deletions tools/eslint/conf/environments.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,126 @@ const globals = require("globals");
module.exports = {
builtin: globals.es5,
browser: {
globals: globals.browser

/*
* For backward compatibility.
* Remove those on the next major release.
*/
globals: Object.assign(
{
AutocompleteErrorEvent: false,
CDATASection: false,
ClientRect: false,
ClientRectList: false,
CSSAnimation: false,
CSSTransition: false,
CSSUnknownRule: false,
CSSViewportRule: false,
Debug: false,
DocumentTimeline: false,
DOMSettableTokenList: false,
ElementTimeControl: false,
FederatedCredential: false,
FileError: false,
HTMLAppletElement: false,
HTMLBlockquoteElement: false,
HTMLIsIndexElement: false,
HTMLKeygenElement: false,
HTMLLayerElement: false,
IDBEnvironment: false,
InputMethodContext: false,
MediaKeyError: false,
MediaKeyEvent: false,
MediaKeys: false,
opera: false,
PasswordCredential: false,
ReadableByteStream: false,
SharedKeyframeList: false,
showModalDialog: false,
SiteBoundCredential: false,
SVGAltGlyphDefElement: false,
SVGAltGlyphElement: false,
SVGAltGlyphItemElement: false,
SVGAnimateColorElement: false,
SVGAnimatedPathData: false,
SVGAnimatedPoints: false,
SVGColor: false,
SVGColorProfileElement: false,
SVGColorProfileRule: false,
SVGCSSRule: false,
SVGCursorElement: false,
SVGDocument: false,
SVGElementInstance: false,
SVGElementInstanceList: false,
SVGEvent: false,
SVGExternalResourcesRequired: false,
SVGFilterPrimitiveStandardAttributes: false,
SVGFitToViewBox: false,
SVGFontElement: false,
SVGFontFaceElement: false,
SVGFontFaceFormatElement: false,
SVGFontFaceNameElement: false,
SVGFontFaceSrcElement: false,
SVGFontFaceUriElement: false,
SVGGlyphElement: false,
SVGGlyphRefElement: false,
SVGHKernElement: false,
SVGICCColor: false,
SVGLangSpace: false,
SVGLocatable: false,
SVGMissingGlyphElement: false,
SVGPaint: false,
SVGPathSeg: false,
SVGPathSegArcAbs: false,
SVGPathSegArcRel: false,
SVGPathSegClosePath: false,
SVGPathSegCurvetoCubicAbs: false,
SVGPathSegCurvetoCubicRel: false,
SVGPathSegCurvetoCubicSmoothAbs: false,
SVGPathSegCurvetoCubicSmoothRel: false,
SVGPathSegCurvetoQuadraticAbs: false,
SVGPathSegCurvetoQuadraticRel: false,
SVGPathSegCurvetoQuadraticSmoothAbs: false,
SVGPathSegCurvetoQuadraticSmoothRel: false,
SVGPathSegLinetoAbs: false,
SVGPathSegLinetoHorizontalAbs: false,
SVGPathSegLinetoHorizontalRel: false,
SVGPathSegLinetoRel: false,
SVGPathSegLinetoVerticalAbs: false,
SVGPathSegLinetoVerticalRel: false,
SVGPathSegList: false,
SVGPathSegMovetoAbs: false,
SVGPathSegMovetoRel: false,
SVGRenderingIntent: false,
SVGStylable: false,
SVGTests: false,
SVGTransformable: false,
SVGTRefElement: false,
SVGURIReference: false,
SVGViewSpec: false,
SVGVKernElement: false,
SVGZoomAndPan: false,
SVGZoomEvent: false,
TimeEvent: false,
XDomainRequest: false,
XMLHttpRequestProgressEvent: false,
XPathException: false,
XPathNamespace: false,
XPathNSResolver: false
},
globals.browser
)
},
node: {
globals: globals.node,

/*
* For backward compatibility.
* Remove those on the next major release.
*/
globals: Object.assign(
{ arguments: false, GLOBAL: false, root: false },
globals.node
),
parserOptions: {
ecmaFeatures: {
globalReturn: true
Expand Down Expand Up @@ -51,7 +167,15 @@ module.exports = {
globals: globals.jasmine
},
jest: {
globals: globals.jest

/*
* For backward compatibility.
* Remove those on the next major release.
*/
globals: Object.assign(
{ check: false, gen: false },
globals.jest
)
},
phantomjs: {
globals: globals.phantomjs
Expand Down Expand Up @@ -96,7 +220,7 @@ module.exports = {
globals: globals.webextensions
},
es6: {
globals: globals.es6,
globals: globals.es2015,
parserOptions: {
ecmaVersion: 6
}
Expand Down
1 change: 1 addition & 0 deletions tools/eslint/conf/eslint-recommended.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ module.exports = {
"id-blacklist": "off",
"id-length": "off",
"id-match": "off",
"implicit-arrow-linebreak": "off",
indent: "off",
"indent-legacy": "off",
"init-declarations": "off",
Expand Down
122 changes: 81 additions & 41 deletions tools/eslint/lib/ast-utils.js
Loading