forked from azerothcore/acore-node-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
55 lines (55 loc) · 1.53 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
module.exports = {
env: {
// supporting all kind of environment
// to build universal lib
browser: true,
commonjs: true,
es6: true,
node: true,
},
parser: '@typescript-eslint/parser',
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'google', // google style guide
'plugin:jest/recommended', // jest support
'plugin:jest/style', // style for jest files
'plugin:jsdoc/recommended', // jsdoc rules to document code
],
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
},
plugins: ['json', 'import', 'jsdoc', 'jest', '@typescript-eslint'],
ignorePatterns: ['/*', '!src'],
rules: {
'require-jsdoc': 0, // jsdoc is not mandatory on functions
// disable eslint jsdoc internal check, already done by "jsdoc" plugin
'valid-jsdoc': 0,
'max-len': 0, // disable max length check of code lines
// disable the rule for all files
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/camelcase': 'off',
'jsdoc/require-param-type': 'off',
'new-cap': 0,
'jsdoc/require-returns': 'off',
'jsdoc/require-param-description': 'off',
},
overrides: [
{
// enable the rule specifically for TypeScript files
files: ['*.ts', '*.tsx'],
rules: {
'@typescript-eslint/explicit-function-return-type': ['error'],
},
},
],
settings: {
jsdoc: {
preferredTypes: {
object: 'Object',
},
},
},
};