forked from facebook/react
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy patheslintrc.cjs.js
64 lines (56 loc) · 1.41 KB
/
eslintrc.cjs.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
'use strict';
module.exports = {
env: {
commonjs: true,
browser: true,
},
globals: {
// ES 6
Map: 'readonly',
Set: 'readonly',
Proxy: 'readonly',
Symbol: 'readonly',
WeakMap: 'readonly',
WeakSet: 'readonly',
Uint16Array: 'readonly',
Reflect: 'readonly',
globalThis: 'readonly',
// Vendor specific
MSApp: 'readonly',
__REACT_DEVTOOLS_GLOBAL_HOOK__: 'readonly',
// CommonJS / Node
process: 'readonly',
setImmediate: 'readonly',
Buffer: 'readonly',
// Trusted Types
trustedTypes: 'readonly',
// Scheduler profiling
Int32Array: 'readonly',
ArrayBuffer: 'readonly',
TaskController: 'readonly',
reportError: 'readonly',
// Flight
Uint8Array: 'readonly',
Promise: 'readonly',
// Flight Webpack
__webpack_chunk_load__: 'readonly',
__webpack_require__: 'readonly',
// jest
expect: 'readonly',
jest: 'readonly',
// act
IS_REACT_ACT_ENVIRONMENT: 'readonly',
},
parserOptions: {
ecmaVersion: 5,
sourceType: 'script',
},
rules: {
'no-undef': 'error',
'no-shadow-restricted-names': 'error',
},
// These plugins aren't used, but eslint complains if an eslint-ignore comment
// references unused plugins. An alternate approach could be to strip
// eslint-ignore comments as part of the build.
plugins: ['jest', 'no-for-of-loops', 'react', 'react-internal'],
};