-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
123 lines (123 loc) · 3.64 KB
/
.eslintrc
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
{
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:deprecation/recommended"
],
"parserOptions": {
"project": ["./tsconfig.json"]
},
"env": {
"es2022": true,
"node": true
},
"ignorePatterns": [
"dist",
"src/shared/models/code-systems/medDraCodeMapping.ts"
],
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "unused-imports", "import"],
"rules": {
"array-bracket-newline": ["error", { "multiline": true }],
"array-bracket-spacing": ["error", "never"],
"array-element-newline": ["error", "consistent"],
"arrow-parens": ["error", "always"],
"arrow-spacing": "error",
"brace-style": "error",
"comma-dangle": [
"error",
{
"arrays": "always-multiline",
"imports": "always-multiline",
"objects": "always-multiline"
}
],
"comma-spacing": ["error", {"before": false, "after": true}],
"default-case": "error",
"eol-last": ["error", "always"],
"eqeqeq": "error",
"function-paren-newline": ["error", "consistent"],
"id-match": "error",
"indent": ["error", 2, { "SwitchCase": 1 }],
"jsx-quotes": ["error", "prefer-double"],
"keyword-spacing": "error",
"max-len": [
"error",
{
"code": 160,
"ignoreUrls": true,
"ignoreStrings": true,
"ignoreTemplateLiterals": true,
"ignoreRegExpLiterals": true
}
],
"no-console": "error",
"no-multiple-empty-lines": ["error", { "max": 1, "maxEOF": 0, "maxBOF": 0 }],
"no-multi-spaces": "error",
"no-param-reassign": "error",
"no-tabs": "error",
"no-trailing-spaces": "error",
"no-whitespace-before-property": "error",
"object-curly-spacing": ["error", "always"],
"object-curly-newline": ["error", { "multiline": true }],
"object-property-newline": ["error", { "allowAllPropertiesOnSameLine": true }],
"prefer-const": "error",
"quote-props": ["error", "as-needed"],
"quotes": ["error", "single", { "avoidEscape": true }],
"semi": ["error", "never"],
"sort-keys": ["error"],
"space-before-blocks": "error",
"space-infix-ops": "error",
"yoda": "error",
"import/newline-after-import": "error",
"import/no-extraneous-dependencies": "error",
"import/no-mutable-exports": "error",
"import/no-unresolved": "error",
"import/order": [
"warn",
{
"groups": [["builtin", "external"], ["internal", "parent", "sibling", "index", "object", "type"]],
"newlines-between": "always",
"alphabetize": { "order": "asc", "caseInsensitive": true }
}
],
"@typescript-eslint/ban-ts-comment": "off",
"unused-imports/no-unused-imports": "error"
},
"settings": {
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},
"import/resolver": {
"typescript": {
"alwaysTryTypes": true
}
}
},
"overrides": [
{
"files": ["**/*.test.ts"],
"extends": [
"plugin:vitest/all"
],
"rules": {
"@typescript-eslint/unbound-method": "off",
"vitest/max-expects": "off",
"vitest/no-conditional-expect": "off",
"vitest/no-hooks": "off",
"vitest/no-large-snapshots": "off",
"vitest/require-hook": "off",
"vitest/prefer-expect-assertions": "off"
}
},
{
"files": ["src/shared/models/code-systems/*.ts", "src/shared/test/helpers/RiphDtoTestFactory.ts"],
"rules": {
"sort-keys": "off"
}
}
]
}