-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.eslintrc.js
More file actions
58 lines (56 loc) · 1.85 KB
/
Copy path.eslintrc.js
File metadata and controls
58 lines (56 loc) · 1.85 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
55
56
57
58
const globals = {
NodeJS: true,
React: true,
};
module.exports = {
extends: ['@squadus/eslint-config'],
globals: globals,
parserOptions: {
ecmaVersion: 2020,
project: ['./tsconfig.json'],
sourceType: 'module',
},
plugins: ['typescript-sort-keys'],
rules: {
semi: 'error',
camelcase: 'off',
'comma-style': ['error', 'last'],
'max-depth': ['error', 4],
eqeqeq: 'warn',
'no-delete-var': 'error',
'no-console': [
'error',
{
allow: ['warn', 'error', 'time', 'timeEnd'],
},
],
'@typescript-eslint/ban-ts-comment': 'warn',
'@typescript-eslint/explicit-function-return-type': 'warn',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-non-null-assertion': 'warn',
'@typescript-eslint/promise-function-async': 'warn',
'@typescript-eslint/strict-boolean-expressions': 'warn',
'no-warning-comments': [
'warn',
{
terms: ['todo', 'fixme', 'any other term'],
location: 'anywhere',
},
],
'no-duplicate-imports': 'error',
'no-unneeded-ternary': 'error',
'no-useless-escape': 'error',
'typescript-sort-keys/interface': 'error',
'typescript-sort-keys/string-enum': 'error',
// disable react-hooks rules not applicable to this SDK package
'react-hooks/immutability': 'off',
'react-hooks/refs': 'off',
'react-hooks/set-state-in-effect': 'off',
'react-hooks/set-state-in-render': 'off',
'react-hooks/static-components': 'off',
// next two rules works together
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'error',
},
ignorePatterns: ['jest.config.js'],
};