forked from awslabs/iot-app-kit
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc.js
executable file
·70 lines (70 loc) · 1.94 KB
/
.eslintrc.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
65
66
67
68
69
70
// eslint-disable-next-line no-undef
module.exports = {
env: {
browser: true,
es6: true,
jest: true,
node: true,
},
ignorePatterns: [
'cypress',
'stencil.config.ts',
'configuration',
'__mocks__',
'packages/scene-composer/src/three/tiles3d/*',
'examples/**/*',
],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
'plugin:chai-friendly/recommended',
],
plugins: ['prettier', 'chai-friendly', 'react'],
globals: {
module: true,
process: true,
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2017,
sourceType: 'module',
},
settings: {
react: {
pragma: 'h',
},
},
rules: {
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
'@typescript-eslint/no-empty-function': 0,
'react/react-in-jsx-scope': 'off', // This should always be off as of React 17 and going forward, and we should use the new JSX Transform in Typescript 4.1+ (ref: https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html#removing-unused-react-imports)
'react/jsx-uses-react': 'error',
'react/jsx-uses-vars': 'error',
'react/jsx-curly-brace-presence': ['error', { props: 'never', children: 'never' }],
},
overrides: [
{
files: ['*.spec.tsx', '*.spec.ts'],
rules: {
'max-len': 0,
'@typescript-eslint/no-non-null-assertion': 0,
},
},
{
files: ['./packages/related-table/**/*'],
extends: './packages/related-table/.eslintrc.js',
},
{
files: ['./packages/table/**/*'],
extends: './packages/table/.eslintrc.js',
},
{
files: ['./packages/scene-composer/**/*'],
extends: './packages/scene-composer/.eslintrc.js',
},
],
};