forked from jaredhanson/passport
-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
.eslintrc.js
108 lines (104 loc) · 3.03 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
module.exports = {
env: {
node: true,
browser: false
},
extends: [
'@passport-next/eslint-config-passport-next/sauron-node.js',
// Override ash-nazg's current preference for ESM
'plugin:node/recommended-script'
],
overrides: [
{
files: ['test/**'],
env: {
// jest: true,
mocha: true
},
globals: {
expect: 'readonly'
},
rules: {
'jsdoc/require-jsdoc': 'off'
// 'jest/no-disabled-tests': [2],
// 'jest/no-focused-tests': [2],
// 'jest/no-identical-title': [2],
// 'jest/prefer-to-have-length': [2],
// 'jest/valid-expect': [2],
}
},
{
files: ['**/*.md'],
rules: {
'eol-last': 'off',
'no-console': 'off',
'no-undef': 'off',
'no-unused-vars': 'warn',
'padded-blocks': 'off',
'import/unambiguous': 'off',
'import/no-unresolved': 'off',
'node/no-missing-import': 'off',
'node/no-missing-require': 'off',
'func-names': 'off',
'import/newline-after-import': 'off',
strict: 'off',
// Disable until eslint-plugin-jsdoc may fix: https://github.com/gajus/eslint-plugin-jsdoc/issues/211
indent: 'off'
}
}
],
globals: {
// By some ESLint bug, config overrides not working with globals
require: 'readonly',
module: 'readonly',
exports: 'writable'
},
plugins: [
// 'jest'
],
rules: {
'no-underscore-dangle': 0,
'no-param-reassign': 0,
// Disable until implementing promises and Node version supporting
'promise/prefer-await-to-callbacks': 0,
'promise/prefer-await-to-then': 0,
// Disable until ready to tackle
'require-jsdoc': 0,
// Disable current preferences of ash-nazg
'import/no-commonjs': 0,
'node/exports-style': 0,
// add back different or stricter rules from airbnb
'object-curly-spacing': ['error', 'always'],
'func-names': 'warn',
'max-len': ['error', 100, 2, {
ignoreUrls: true,
ignoreComments: false,
ignoreRegExpLiterals: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
}],
'space-before-function-paren': ['error', {
anonymous: 'always',
named: 'never',
asyncArrow: 'always'
}],
'no-multiple-empty-lines': ['error', { max: 2, maxEOF: 0 }],
'arrow-parens': ['error', 'as-needed', {
requireForBlockBody: true,
}],
'no-empty-function': ['error', {
allow: [
'arrowFunctions',
'functions',
'methods',
]
}],
'no-unused-vars': ['error', { vars: 'all', args: 'after-used', ignoreRestSiblings: true }],
'no-multi-assign': ['error'],
'no-unused-expressions': ['error', {
allowShortCircuit: false,
allowTernary: false,
allowTaggedTemplates: false,
}]
}
};