-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
46 lines (45 loc) · 1.04 KB
/
eslint.config.mjs
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
import js from '@eslint/js';
import eslintConfigPrettier from 'eslint-config-prettier';
import importPlugin from 'eslint-plugin-import';
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
import globals from 'globals';
export default [
{
files: ['src/**/*.js', 'ui/**/*.js'],
},
js.configs.recommended,
{ languageOptions: { globals: { ...globals.node, ...globals.browser } } },
{
ignores: ['node_modules', '.vite'],
},
eslintConfigPrettier,
eslintPluginPrettierRecommended,
importPlugin.flatConfigs.recommended,
{
rules: {
'import/no-unresolved': 'error',
'import/order': [
'error',
{
'groups': [
'builtin',
'external',
'internal',
['sibling', 'parent'],
'index',
'unknown',
],
'newlines-between': 'always',
'alphabetize': {
order: 'asc',
caseInsensitive: true,
},
},
],
'import/default': 'off',
'import/no-named-as-default': 'off',
'import/namespace': 'off',
'import/no-named-as-default-member': 'off',
},
},
];