-
Notifications
You must be signed in to change notification settings - Fork 8
/
.eslintrc.js
51 lines (48 loc) · 1.18 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
/**
* Eslint config file.
*/
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: [
'standard-with-typescript',
'plugin:mocha/recommended',
'plugin:security/recommended',
'prettier',
],
plugins: ['mocha', 'security', 'prettier'],
overrides: [
{
files: ['test/**/*.test.ts'],
rules: {
'@typescript-eslint/no-floating-promises': 'off',
},
},
],
globals: {
config: 'readonly', // Add globals as 'readonly' or 'writable' as applicable
logger: 'readonly',
},
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: ['./tsconfig.json'],
},
ignorePatterns: ['dist/*'],
rules: {
// Custom eslint rules
'no-trailing-spaces': 'error',
'consistent-return': 'error',
'no-console': 'error',
// Custom mocha rules
'mocha/no-skipped-tests': 'error',
'mocha/no-exclusive-tests': 'error',
// Prettier rules
'prettier/prettier': 'error',
// @todo: Remove these temporarily allowed rules below once the issues are resolved
'@typescript-eslint/strict-boolean-expressions': 'off',
'@typescript-eslint/restrict-template-expressions': 'off',
},
};