This repository has been archived by the owner on Mar 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
/
.eslintrc.js
66 lines (64 loc) · 1.66 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
module.exports = {
parser: '@typescript-eslint/parser',
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:jsdoc/recommended',
'google',
'prettier',
],
env: {
node: true,
jest: true,
},
parserOptions: {
project: './tsconfig.json',
ecmaFeatures: {
experimentalObjectRestSpread: true,
impliedStrict: true,
},
sourceType: 'module',
},
globals: {
strapi: true,
},
rules: {
indent: ['error', 2, { SwitchCase: 1 }],
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
// jsdoc
'require-jsdoc': 'off',
'valid-jsdoc': 'off',
'jsdoc/require-param-description': 'off',
'jsdoc/require-returns': 'off',
'jsdoc/require-returns-description': 'off',
'jsdoc/no-undefined-types': [
'warn',
{
definedTypes: ['never'],
},
],
// JS requirements
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
// TODO
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/restrict-template-expressions': 'off',
},
settings: {
'import/resolver': {
typescript: {},
},
jsdoc: {
// mode: 'typescript',
tagNamePreference: {
param: 'param',
returns: 'return',
},
},
},
};