-
Notifications
You must be signed in to change notification settings - Fork 86
Expand file tree
/
Copy path.eslintrc.js
More file actions
54 lines (54 loc) · 1.29 KB
/
.eslintrc.js
File metadata and controls
54 lines (54 loc) · 1.29 KB
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
module.exports = {
env: {
browser: true,
commonjs: true,
node: true,
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'local-rules'],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
Promise: 'readonly',
},
parserOptions: {
// Note: The TS compiler determines what syntax is accepted. We're using TS version 4.0.3.
// This seems to correspond to "2020" for this setting.
ecmaVersion: 2020,
sourceType: 'module',
},
overrides: [
{
'files': ['*.ts'],
'rules': {
'@typescript-eslint/explicit-module-boundary-types': ['error']
}
},
{
'files': ['lib/**/*.ts', 'src/**/*.ts'],
'excludedFiles': [
'**/platform_support.ts',
'**/*.spec.ts',
'**/*.test.ts',
'**/*.tests.ts',
'**/*.test-d.ts',
'**/*.gen.ts',
'**/*.d.ts',
'**/__mocks__/**',
'**/tests/**'
],
'rules': {
'local-rules/require-platform-declaration': 'error',
}
}
],
rules: {
'no-prototype-builtins': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-empty-function': 'off',
},
};