-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy patheslint.config.mjs
More file actions
58 lines (53 loc) · 1.65 KB
/
Copy patheslint.config.mjs
File metadata and controls
58 lines (53 loc) · 1.65 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
// @ts-nocheck
import base from './packages/config/eslint/base.js';
import next from './packages/config/eslint/next.js';
import react from './packages/config/eslint/react.js';
const webFiles = ['apps/web/**/*.{js,jsx,mjs,ts,tsx,mts,cts}'];
const uiFiles = ['packages/ui/**/*.{js,jsx,mjs,ts,tsx,mts,cts}'];
const reactFiles = [...webFiles, ...uiFiles];
const scopeConfigs = (configs, files, ignorePrefix) =>
configs.map((config) => {
if (config.ignores && !config.files) {
return {
...config,
ignores: config.ignores.map((pattern) => `${ignorePrefix}/${pattern}`),
};
}
return {
...config,
files,
};
});
export default [
{
ignores: [
'**/node_modules/**',
'**/dist/**',
'**/.next/**',
'**/.open-next/**',
'**/.turbo/**',
'**/coverage/**',
'**/test-results/**',
'**/playwright-report/**',
'apps/web/next-env.d.ts',
'packages/core/.tsup/**',
],
},
...base,
...scopeConfigs(next, webFiles, 'apps/web'),
...scopeConfigs(react, reactFiles, 'packages/ui'),
{
files: ['tests/**/*.{js,jsx,mjs,ts,tsx,mts,cts}'],
rules: {
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/no-unnecessary-condition': 'off',
'@typescript-eslint/require-await': 'off',
'@typescript-eslint/no-floating-promises': 'off',
'@typescript-eslint/use-unknown-in-catch-callback-variable': 'off',
},
},
];