forked from capitalone/Stratum-Observability
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
34 lines (34 loc) · 1.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
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.json']
},
plugins: ['simple-import-sort', '@typescript-eslint'],
env: {
jest: true
},
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'],
globals: {
customElements: true
},
rules: {
// Enforce consistent brace style for all control statements.
curly: ['error', 'all'],
// Require `default` cases in `switch` statements.
'default-case': 'error',
// Require the use of `===` and `!==`.
eqeqeq: ['error', 'smart'],
// Disallow duplicate module imports.
'no-duplicate-imports': 'warn',
// Disallow empty functions.
'no-empty-function': 'error',
// Disallow template literal placeholder syntax in regular strings.
'no-template-curly-in-string': 'warn',
// Disallow loops with a body that allows only one iteration.
'no-unreachable-loop': 'error',
// Enforce sorted import declarations within modules.
'simple-import-sort/imports': 'error'
}
};