-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mjs
More file actions
53 lines (52 loc) · 1.27 KB
/
eslint.config.mjs
File metadata and controls
53 lines (52 loc) · 1.27 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
import mantine from 'eslint-config-mantine';
import { defineConfig } from 'eslint/config';
export default defineConfig(
...mantine,
{ ignores: ['**/*.{mjs,cjs,js,d.ts,d.mts}', '.next'] },
{
files: ['**/*.story.tsx'],
rules: { 'no-console': 'off' },
},
{
languageOptions: {
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
},
},
{
files: ['**/*.{js,jsx}'],
languageOptions: {
ecmaVersion: 'latest',
parserOptions: {
ecmaVersion: 'latest',
ecmaFeatures: { jsx: true },
sourceType: 'module',
},
},
settings: {
react: { version: '19.0' },
},
rules: {
'no-multi-spaces': ['error', { ignoreEOLComments: false }],
'no-trailing-spaces': ['error', { skipBlankLines: false }],
'no-use-before-define': ['error', { functions: true }],
'react/function-component-definition': [
2,
{
namedComponents: 'arrow-function',
unnamedComponents: 'arrow-function',
},
],
'react/prop-types': 0,
'react/jsx-uses-vars': 'error',
'react/jsx-uses-react': 'error',
semi: [2, 'always'],
quotes: [2, 'single'],
},
}
);