-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy patheslint.config.mjs
More file actions
62 lines (57 loc) · 1.4 KB
/
eslint.config.mjs
File metadata and controls
62 lines (57 loc) · 1.4 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
import react from 'eslint-plugin-react';
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/*',
'**/*.css',
'setupTests.ts',
'node_modules/*',
],
},
{
files: ['**/*.ts', '**/*.tsx', '**/*.js'],
...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,
},
},
settings: {
react: {
version: "detect",
},
},
plugins: {
'@typescript-eslint': typescriptEslint,
react: react,
next: next
},
rules: {
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-unused-vars': 'warn',
'react/prop-types': 'warn',
},
},
];