-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathlegacy.js
80 lines (80 loc) · 2.55 KB
/
legacy.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
module.exports = {
parser: '@typescript-eslint/parser',
extends: [
// TODO fix
// 'plugin:@typescript-eslint/recommended',
'react-app',
// TODO fix ESLint couldn't determine the plugin "import" uniquely.
// 'plugin:import/errors',
// 'plugin:import/warnings',
'plugin:import/typescript',
'prettier',
],
// plugins: ['@typescript-eslint', 'react', 'import'],
// TODO fix ESLint couldn't determine the plugin "import" uniquely.
plugins: ['react', '@nx' /*'import'*/],
settings: {
react: {
version: 'detect',
},
'import/resolver': {
typescript: {},
},
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
},
rules: {
'import/default': 0,
'import/no-unresolved': 0,
'import/no-named-as-default': 0,
'import/named': 0,
'import/namespace': 0,
'import/order': [
1,
{
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'],
'newlines-between': 'never',
pathGroups: [
{
pattern: '@globalfishingwatch/**',
group: 'external',
position: 'after',
},
{
pattern:
'{features,store,routes,common,components,redux-modules,types,assets,pages,data,hooks,utils}',
group: 'internal',
},
{
pattern:
'{features,store,routes,common,components,redux-modules,types,assets,pages,data,hooks,utils}/**',
group: 'internal',
},
],
pathGroupsExcludedImportTypes: ['builtin'],
},
],
'react/jsx-fragments': ['error', 'element'],
'@typescript-eslint/explicit-function-return-type': 0,
'@typescript-eslint/no-var-requires': 0,
'@typescript-eslint/no-redeclare': 0,
// note you must disable the base rule as it can report incorrect errors
// https://github.com/typescript-eslint/typescript-eslint/blob/master/docs/getting-started/linting/FAQ.md#i-am-using-a-rule-from-eslint-core-and-it-doesnt-work-correctly-with-typescript-code
'no-use-before-define': 'off',
'@typescript-eslint/no-use-before-define': ['error'],
'@typescript-eslint/explicit-module-boundary-types': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/camelcase': 0,
'@typescript-eslint/no-empty-function': 0,
'@nx/dependency-checks': [
'error',
{
ignoredFiles: [
'{projectRoot}/vite.config.{js,ts,mjs,mts}',
'{projectRoot}/rollup.config.{js,ts,mjs,mts}',
],
},
],
},
}