forked from WoWAnalyzer/WoWAnalyzer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
53 lines (52 loc) · 1.67 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
const CHECK_CODESTYLE = process.env.CODE_STYLE === 'true';
const CI = Boolean(process.env.CI);
module.exports = {
extends: ['@martijnhols/eslint-config', 'plugin:react/jsx-runtime'],
rules: {
'no-use-before-define': 'off',
'import/order': [
// This is an annoying code style rule that can be fixed automatically.
// Only check it during the precommit fix script, and in CI.
CHECK_CODESTYLE ? 'warn' : 'off',
{
groups: [['external', 'builtin'], 'internal', ['parent', 'sibling', 'index']],
pathGroups: [
{
pattern: '@wowanalyzer/**',
group: 'internal',
position: 'after',
},
],
pathGroupsExcludedImportTypes: ['builtin'],
'newlines-between': 'always',
alphabetize: {
order: 'asc',
caseInsensitive: true,
},
},
],
'import/no-extraneous-dependencies': [CI ? 'warn' : 'off'],
},
overrides: [
// Disable some rules for .js files to not have to update all old files in one go
{
files: ['**/*.js'],
rules: {
'react/prefer-stateless-function': 'off',
'@typescript-eslint/no-unused-vars': 'off',
},
},
// Disable a set for now to enable incrementally to allow for partial implementation
{
files: ['**/*.js', '**/*.ts?(x)'],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'react/display-name': 'off',
// This one in particular hurts:
'@typescript-eslint/no-non-null-assertion': 'off',
// Needs manual resolution, but has about 400 errors:
'@typescript-eslint/no-unused-expressions': 'off',
},
},
],
};