-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mjs
More file actions
96 lines (88 loc) · 3.69 KB
/
eslint.config.mjs
File metadata and controls
96 lines (88 loc) · 3.69 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
// @ts-check
import {
assertEnvironment,
moduleExport
} from '@-xun/symbiote/assets/eslint.config.mjs';
import { createDebugLogger } from 'rejoinder';
const debug = createDebugLogger({ namespace: 'symbiote:config:eslint' });
const config = await moduleExport({
derivedAliases: getEslintAliases(),
...(await assertEnvironment())
});
/* Add custom config objects here, such as those disabling certain rules */
config
.push
// ? Paths listed here are ignored by Eslint and related tooling.
// { ignores: [] },
// * Configs applying to both JavaScript & TypeScript files (all extensions)
// ? Keep in mind that JS files can use @ts-check and "become" TS files,
// ? hence the existence of this block. Logically, most rules should be
// ? loaded here.
// ...[
// { ...eslintPluginReactConfigs.flat.recommended, name: 'react:recommended' },
// // ? For react@>=17
// { ...eslintPluginReactConfigs.flat['jsx-runtime'], name: 'react:jsx-runtime' },
// {
// ...eslintPluginReactHooksConfigs['recommended-latest'],
// name: 'react-hooks:recommended-latest'
// },
// { ...eslintPluginJsxA11yFlatConfigs.recommended, name: 'jsx-a11y:recommended' }
// ].flatMap((configs) =>
// overwriteProperty(configs, 'files', [
// `**/*.{ts,cts,mts,tsx}`
// ])
// ),
// {
// rules: {
// 'unicorn/no-keyword-prefix': 'off',
// 'no-restricted-syntax': 'off'
// }
// }
();
export default config;
debug('exported config: %O', config);
function getEslintAliases() {
// ! These aliases are auto-generated by symbiote. Instead of modifying them
// ! directly, consider regenerating aliases across the entire project with:
// ! `npx symbiote project renovate --regenerate-assets --assets-preset ...`
return [
['multiverse+bidirectional-resolve:*', './packages/bidirectional-resolve/src/*'],
['multiverse+common:*', './packages/common/src/*'],
['multiverse+fs:*', './packages/fs/src/*'],
['multiverse+graph:*', './packages/graph/src/*'],
['multiverse+types:*', './packages/types/src/*'],
[
'multiverse+bidirectional-resolve',
'./packages/bidirectional-resolve/src/index.ts'
],
['multiverse+common', './packages/common/src/index.ts'],
['multiverse+fs', './packages/fs/src/index.ts'],
['multiverse+graph', './packages/graph/src/index.ts'],
['multiverse+types', './packages/types/src/index.ts'],
['rootverse+bidirectional-resolve:*', './packages/bidirectional-resolve/*'],
['rootverse+common:*', './packages/common/*'],
['rootverse+fs:*', './packages/fs/*'],
['rootverse+graph:*', './packages/graph/*'],
['rootverse+types:*', './packages/types/*'],
['rootverse:*', './*'],
['universe+bidirectional-resolve:*', './packages/bidirectional-resolve/src/*'],
['universe+common:*', './packages/common/src/*'],
['universe+fs:*', './packages/fs/src/*'],
['universe+graph:*', './packages/graph/src/*'],
['universe+types:*', './packages/types/src/*'],
['universe+bidirectional-resolve', './packages/bidirectional-resolve/src/index.ts'],
['universe+common', './packages/common/src/index.ts'],
['universe+fs', './packages/fs/src/index.ts'],
['universe+graph', './packages/graph/src/index.ts'],
['universe+types', './packages/types/src/index.ts'],
['universe:*', './src/*'],
['universe', './src/index.ts'],
['testverse+bidirectional-resolve:*', './packages/bidirectional-resolve/test/*'],
['testverse+common:*', './packages/common/test/*'],
['testverse+fs:*', './packages/fs/test/*'],
['testverse+graph:*', './packages/graph/test/*'],
['testverse+types:*', './packages/types/test/*'],
['testverse:*', './test/*'],
['typeverse:*', './types/*']
];
}