-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathconfig-factories.ts
More file actions
91 lines (89 loc) · 2.14 KB
/
Copy pathconfig-factories.ts
File metadata and controls
91 lines (89 loc) · 2.14 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
import {
comments,
e18e,
eslintPlugin,
flawless,
gitignore,
ignores,
imports,
javascript,
jsdoc,
jsonc,
markdown,
naming,
node,
oxfmt,
packageJson,
perfectionist,
pnpm,
projectStructure,
promise,
react,
roblox,
smallRules,
sonarjs,
spelling,
stylistic,
test,
toml,
typescript,
unicorn,
yaml,
} from "../src/index.ts";
import type { Awaitable, TypedFlatConfigItem } from "../src/types.ts";
/**
* Every config module, with every optional feature turned on, in the order the
* factory composes them.
*
* The generators enumerate the modules rather than a hand-written package list
* so a newly registered plugin cannot escape them. Sharing one list keeps that
* promise: a module added here reaches both the rule-type generator and the
* type-aware snapshot generator. Added to only one of two lists, it would have
* silently sent its plugin back through the runtime scan that the lazy
* registration exists to avoid.
*
* Composed at module scope, not behind thunks: each generator consumes it once,
* immediately, and a thunk per entry buys nothing.
*/
/**
* Node major version every generator targets.
*
* `nodeMajor` otherwise defaults to the running Node version, which would make
* committed generated output depend on who ran `pnpm gen`. The ceiling keeps
* every version-gated rule in view, the safe direction for a list of rules the
* preset can name. Any generator that boots the factory must pass this, or its
* output will disagree with the configs below.
*/
export const GENERATOR_NODE_MAJOR = Number.MAX_SAFE_INTEGER;
export const PRESET_CONFIGS: Array<Awaitable<Array<TypedFlatConfigItem>>> = [
comments(),
e18e({ nodeMajor: GENERATOR_NODE_MAJOR }),
eslintPlugin(),
flawless(),
gitignore(),
ignores(),
imports(),
javascript(),
jsdoc(),
jsonc(),
markdown(),
naming(),
node(),
oxfmt(),
packageJson(),
perfectionist(),
pnpm({ isInEditor: false }),
projectStructure(),
promise(),
react({ testing: true }),
roblox(),
smallRules(),
sonarjs({ isInEditor: false }),
spelling(),
stylistic(),
test({ jest: { extended: true }, vitest: true }),
toml(),
typescript({ erasableOnly: true }),
unicorn(),
yaml(),
];