forked from uc-cdis/gen3-frontend-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mjs
More file actions
77 lines (75 loc) · 1.95 KB
/
Copy patheslint.config.mjs
File metadata and controls
77 lines (75 loc) · 1.95 KB
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
import react from 'eslint-plugin-react';
import reactHooks from 'eslint-plugin-react-hooks';
import typescriptEslint from '@typescript-eslint/eslint-plugin';
import typescriptParser from '@typescript-eslint/parser';
import jsLint from '@eslint/js';
import tsLint from 'typescript-eslint';
import next from '@next/eslint-plugin-next';
import globals from 'globals';
import reactRecommended from 'eslint-plugin-react/configs/recommended.js';
export default [
reactRecommended,
jsLint.configs.recommended,
...tsLint.configs.recommended,
{
ignores: [
'.nx/**/*',
'**/build/*',
'packages/core/dist/*',
'packages/frontend/dist/*',
'packages/frontend/.rollup.cache/*',
'packages/sampleCommons/.next/*',
'packages/sampleCommons/public/*',
'packages/storybook/.next/*',
'packages/tools/dist/*',
'**/*.css',
'setupTests.ts',
'**/node_modules/*',
'node_modules/*',
],
},
{
files: ['**/*.ts', '**/*.tsx', '**/*.js'],
settings: {
react: {
version: 'detect',
},
},
...react.configs.flat.recommended,
languageOptions: {
...react.configs.flat.recommended.languageOptions,
ecmaVersion: 'latest',
sourceType: 'module',
parser: typescriptParser,
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
globals: {
...globals.node,
...globals.browser,
...globals.serviceworker,
},
},
plugins: {
'@typescript-eslint': typescriptEslint,
react: react,
reactHooks: reactHooks,
next: next,
},
rules: {
'@typescript-eslint/no-explicit-any': 'warn',
"@typescript-eslint/no-unused-vars": [
"warn",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_"
}
],
'react/prop-types': 'warn',
'reactHooks/rules-of-hooks': 'error',
'reactHooks/exhaustive-deps': 'warn',
},
},
];