-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.eslintrc.js
49 lines (44 loc) · 1.24 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
// eslint-disable-next-line import/no-commonjs
module.exports = {
env: {
browser: true, // For frontend only
es2020: true,
jest: true,
},
extends: [
'algolia',
'algolia/jest',
'algolia/typescript',
'plugin:import/typescript',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 11,
sourceType: 'module',
},
settings: {
'import/resolver': {
typescript: {},
},
},
plugins: ['prettier', '@typescript-eslint', 'import', 'algolia'],
rules: {
'algolia/func-style-toplevel': 'error',
'no-console': 'off',
'no-continue': 'off',
'no-loop-func': 'off',
'consistent-return': 'off',
'@typescript-eslint/explicit-member-accessibility': [
'error',
{ accessibility: 'no-public' },
],
'eslint-comments/disable-enable-pair': ['error', { allowWholeFile: true }],
'no-param-reassign': [
'error',
{ props: true, ignorePropertyModificationsFor: ['res', 'req'] }, // http://expressjs.com/en/api.html#res.locals
],
// TMP
'jsdoc/check-examples': ['off'],
'@typescript-eslint/prefer-optional-chain': ['off'], // to re-enable when this is fixed: https://github.com/typescript-eslint/typescript-eslint/issues/6024
},
};