-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy path.eslintrc.js
72 lines (71 loc) · 2.04 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
71
72
/**
* Copyright (c) 2020
*
* ESLint configuration for linting ThoughtSpot Embed UI SDK
* source code.
*
* @summary ESLint config
* @author Ayon Ghosh <[email protected]>
*/
module.exports = {
env: {
browser: true,
es6: true,
},
ignorePatterns: ['*.scss', '*.md'],
extends: [
'airbnb-base',
'plugin:prettier/recommended',
'plugin:@typescript-eslint/recommended',
],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
},
plugins: ['@typescript-eslint'],
settings: {
'import/extensions': ['.js', '.ts'],
'import/parsers': {
'@typescript-eslint/parser': ['.ts'],
},
'import/resolver': {
typescript: {
alwaysTryTypes: true,
},
node: {
extensions: ['.js', '.ts'],
},
},
},
rules: {
indent: [1, 4, { SwitchCase: 1 }], // Conflict with Prettier
quotes: [2, "single", { "avoidEscape": true }],
'jsx-quotes': [2, 'prefer-single'],
'@typescript-eslint/explicit-function-return-type': [0],
'@typescript-eslint/no-explicit-any': [0],
'@typescript-eslint/no-unused-vars': [0],
'import/prefer-default-export': 0,
// do not complain when importing js related files without extension,
// Typescript should handle this.
'import/extensions': [0],
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: ['**/*.spec.ts'],
},
],
'import/no-absolute-path': [0],
// Disable until this is fixed https://github.com/dividab/tsconfig-paths/issues/128
'import/no-unresolved': 0,
'no-plusplus': 0,
'prefer-destructuring': 0,
'no-continue': 0,
'max-classes-per-file': 0,
'class-methods-use-this': 0,
},
};