generated from hmcts/expressjs-template
-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eslintrc.js
81 lines (81 loc) · 2.09 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
73
74
75
76
77
78
79
80
81
module.exports = {
root: true,
env: { browser: true, es6: true, node: true },
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'prettier', 'import', 'jest'],
extends: [
'eslint:recommended',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript',
'plugin:jest/recommended',
'plugin:prettier/recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
],
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
project: './tsconfig.eslint.json',
},
globals: { Atomics: 'readonly', SharedArrayBuffer: 'readonly' },
rules: {
'@typescript-eslint/array-type': 'error',
'@typescript-eslint/explicit-module-boundary-types': 'error',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-shadow': 'error',
'@typescript-eslint/no-unused-vars': [
'error',
{
ignoreRestSiblings: true,
},
],
'@typescript-eslint/no-var-requires': 'off',
curly: 'error',
eqeqeq: 'error',
'import/no-duplicates': 'error',
'import/no-named-as-default': 'error',
'import/order': [
'error',
{
alphabetize: {
caseInsensitive: false,
order: 'asc',
},
'newlines-between': 'always',
},
],
'jest/prefer-to-have-length': 'error',
'jest/valid-expect': 'off',
'linebreak-style': ['error', 'unix'],
'no-console': 'warn',
'no-prototype-builtins': 'off',
'no-return-await': 'error',
'no-unneeded-ternary': [
'error',
{
defaultAssignment: false,
},
],
'object-curly-spacing': ['error', 'always'],
'object-shorthand': ['error', 'properties'],
quotes: [
'error',
'single',
{
allowTemplateLiterals: false,
avoidEscape: true,
},
],
semi: ['error', 'always'],
'sort-imports': [
'error',
{
allowSeparatedGroups: false,
ignoreCase: false,
ignoreDeclarationSort: true,
ignoreMemberSort: false,
},
],
},
};