-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy patheslint.config.js
64 lines (63 loc) · 1.65 KB
/
eslint.config.js
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
import { readFileSync } from 'node:fs';
import { join } from 'node:path';
import nkzw from '@nkzw/eslint-config';
import workspaces from 'eslint-plugin-workspaces';
export default [
...nkzw,
{
ignores: ['packages/*/lib', 'packages/fbtee/lib-tmp/'],
},
{
plugins: { workspaces },
rules: {
'@nkzw/no-instanceof': 0,
'@typescript-eslint/array-type': [2, { default: 'generic' }],
'import/no-extraneous-dependencies': [
2,
{
devDependencies: [
'./example/vite.config.ts',
'./jest-preprocessor.js',
'./packages/fbtee/babel-build.config.js',
'**/__tests__/**/*.tsx',
'eslint.config.js',
],
packageDir: [import.meta.dirname].concat(
readFileSync('./pnpm-workspace.yaml', 'utf8')
.split('\n')
.slice(1)
.map((n) =>
join(
import.meta.dirname,
n
.replaceAll(/\s*-\s+/g, '')
.replaceAll("'", '')
.replaceAll('\r', ''),
),
),
),
},
],
'import/no-unresolved': [
2,
{
ignore: ['@typescript-eslint/*'],
},
],
'unicorn/prefer-dom-node-append': 0,
'workspaces/no-absolute-imports': 2,
'workspaces/no-relative-imports': 2,
},
},
{
files: [
'packages/babel-plugin-fbtee/src/bin/*.tsx',
'packages/fbtee/babel-build.config.js',
'**/__tests__/**/*.tsx',
],
rules: {
'no-console': 0,
'workspaces/no-relative-imports': 0,
},
},
];