-
-
Notifications
You must be signed in to change notification settings - Fork 47
/
Copy path.eslintrc.js
42 lines (36 loc) · 951 Bytes
/
.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
// http://eslint.org/docs/user-guide/configuring
const rules = {
'no-underscore-dangle': ['error', {
allowAfterThis: true,
enforceInMethodNames: false,
// node-ignore only
allow: ['_rules', '_test']
}],
'operator-linebreak': 0,
indent: ['error', 2, {
MemberExpression: 0,
// Eslint bug
ignoreComments: true
}]
}
if (process.platform === 'win32') {
// Ignore linebreak-style on Windows, due to a bug of eslint
rules['linebreak-style'] = 0
}
module.exports = {
// Uses `require.resolve` to support npm linked eslint-config
extends: require.resolve('eslint-config-ostai'),
root: true,
rules,
overrides: [
{
files: ['*.ts', '*.cts', '*.mts', '*.cjs', '*.mjs'],
extends: ['plugin:@typescript-eslint/recommended'],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
rules: {
'@typescript-eslint/no-unused-vars': 'off'
}
}
]
}