forked from mastilver/dynamic-cdn-webpack-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
65 lines (64 loc) · 1.46 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
/** @type {Partial<import('eslint').Linter.RulesRecord>} */
const rules = {
curly: ['error', 'multi-line'],
eqeqeq: ['error', 'smart'],
'capitalized-comments': ['off'],
'no-eq-null': ['off'],
'@typescript-eslint/consistent-indexed-object-style': [
'error',
'index-signature',
],
// 'import/extensions': 'off',
// 'node/file-extension-in-import': 'off',
// 'unicorn/prefer-node-protocol': 'off',
// 'unicorn/no-array-reduce': 'off',
// 'unicorn/prefer-spread': 'off',
};
/** @type {import('eslint').Linter.Config} */
const config = {
extends: ['xo', 'prettier', 'plugin:prettier/recommended'],
parserOptions: {
project: false,
},
rules,
overrides: [
{
files: ['src/**/*.ts'],
parserOptions: {
project: 'src/tsconfig.json',
},
extends: [
'xo',
'xo-typescript',
'prettier',
'plugin:prettier/recommended',
],
rules,
},
{
files: ['*.config.js'],
rules: {
'unicorn/prefer-module': 'off',
'@typescript-eslint/no-throw-literal': ['off'],
},
},
{
files: ['test/**/*.js'],
rules: {
...rules,
'no-unused-vars': 'off',
'func-names': 'off',
'prettier/prettier': [
'error',
{
printWidth: 140,
tabWidth: 4,
trailingComma: 'es5',
arrowParens: 'avoid',
},
],
},
},
],
};
module.exports = config;