Repository navigation
Expand file tree
/
Copy patheslint.config.mjs
More file actions
72 lines (71 loc) · 2.04 KB
/
Copy patheslint.config.mjs
File metadata and controls
72 lines (71 loc) · 2.04 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
import {defineConfig} from 'eslint/config';
import {configs} from '@croct/eslint-plugin';
import {createTypeScriptImportResolver} from 'eslint-import-resolver-typescript';
export default defineConfig(
configs.typescript,
{
settings: {
/*
Without an explicit resolver, import-x falls back to the legacy "node" one, which is
not installed. Resolution then silently yields nothing, and no-cycle walking into
node_modules loads whatever sits at <package>/node as the resolver, which crashes the
run on packages shipping native bindings there, such as lightningcss.
This resolver also understands the tsconfig paths for #app and #imports.
*/
'import-x/resolver-next': [createTypeScriptImportResolver({project: './tsconfig.json'})],
},
},
{
rules: {
'func-names': 'off',
'@typescript-eslint/only-throw-error': 'off',
'@typescript-eslint/no-redundant-type-constituents': 'off',
'no-param-reassign': ['error', {props: false}],
},
settings: {
jest: {
version: 29,
},
},
},
{
files: [
'src/module.ts',
'src/runtime/plugin.ts',
'src/runtime/server/middleware/**/*.ts',
'src/runtime/server/api/**/*.ts',
'src/runtime/components/**/*.ts',
],
rules: {
'import-x/no-default-export': 'off',
},
},
{
files: [
'e2e/**/*.ts',
'*.config.ts',
],
rules: {
'import-x/no-default-export': 'off',
},
},
{
files: [
'e2e/specs/**/*.spec.ts',
],
rules: {
'@croct/parameter-destructuring': 'off',
},
},
{
ignores: [
'dist/',
'coverage/',
'e2e/app/',
'node_modules/',
'.nuxt/',
'*.mjs',
'**/*.d.ts',
],
},
);