mirror of
https://github.com/facebookarchive/prepack.git
synced 2024-10-26 23:32:02 +03:00
679b7d092e
Summary: Release notes: none Make our linter use the latest `ecmaVersion`. https://eslint.org/docs/user-guide/configuring#deprecated Closes https://github.com/facebook/prepack/pull/2069 Differential Revision: D8230681 Pulled By: trueadm fbshipit-source-id: fddaeef4692cf45e929f243a7255518705a25727
73 lines
1.4 KiB
JavaScript
73 lines
1.4 KiB
JavaScript
/**
|
|
* Copyright (c) 2017-present, Facebook, Inc.
|
|
* All rights reserved.
|
|
*
|
|
* This source code is licensed under the BSD-style license found in the
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
*/
|
|
|
|
/* @flow */
|
|
|
|
// The irony :P
|
|
/* eslint-disable no-undef */
|
|
module.exports = {
|
|
env: {
|
|
commonjs: true,
|
|
browser: true,
|
|
},
|
|
rules: {
|
|
"no-undef": "error",
|
|
"no-use-before-define": ["error", { variables: false, functions: false }],
|
|
},
|
|
parserOptions: {
|
|
ecmaVersion: 2018,
|
|
ecmaFeatures: {
|
|
jsx: true,
|
|
},
|
|
},
|
|
globals: {
|
|
// FB
|
|
Env: true,
|
|
Bootloader: true,
|
|
JSResource: true,
|
|
babelHelpers: true,
|
|
regeneratorRuntime: true,
|
|
asset: true,
|
|
cx: true,
|
|
cssVar: true,
|
|
csx: true,
|
|
errorDesc: true,
|
|
errorHelpCenterID: true,
|
|
errorSummary: true,
|
|
gkx: true,
|
|
glyph: true,
|
|
ifRequired: true,
|
|
ix: true,
|
|
fbglyph: true,
|
|
fbt: true,
|
|
requireWeak: true,
|
|
xuiglyph: true,
|
|
// React
|
|
React: true,
|
|
__REACT_DEVTOOLS_GLOBAL_HOOK__: true,
|
|
// Normal
|
|
Exception: true,
|
|
Error: true,
|
|
// ES 6
|
|
Promise: true,
|
|
Map: true,
|
|
Set: true,
|
|
Proxy: true,
|
|
Symbol: true,
|
|
WeakMap: true,
|
|
WeakSet: true,
|
|
Reflect: true,
|
|
// Vendor specific
|
|
MSApp: true,
|
|
ActiveXObject: true,
|
|
// CommonJS / Node
|
|
process: true,
|
|
},
|
|
};
|