diff options
Diffstat (limited to 'tools/eslint/conf/environments.js')
-rw-r--r-- | tools/eslint/conf/environments.js | 132 |
1 files changed, 128 insertions, 4 deletions
diff --git a/tools/eslint/conf/environments.js b/tools/eslint/conf/environments.js index a11f2963dc..44f2e0dee5 100644 --- a/tools/eslint/conf/environments.js +++ b/tools/eslint/conf/environments.js @@ -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 @@ -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 @@ -96,7 +220,7 @@ module.exports = { globals: globals.webextensions }, es6: { - globals: globals.es6, + globals: globals.es2015, parserOptions: { ecmaVersion: 6 } |