@2030/eslint-config 0.0.7 → 1.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js ADDED
@@ -0,0 +1,584 @@
1
+ // src/cli/index.ts
2
+ import process5 from "node:process";
3
+ import c6 from "picocolors";
4
+ import { hideBin } from "yargs/helpers";
5
+ import yargs from "yargs";
6
+ import * as p5 from "@clack/prompts";
7
+
8
+ // src/cli/run.ts
9
+ import fs3 from "node:fs";
10
+ import path4 from "node:path";
11
+ import process4 from "node:process";
12
+ import c5 from "picocolors";
13
+ import * as p4 from "@clack/prompts";
14
+
15
+ // src/cli/constants.ts
16
+ import c from "picocolors";
17
+
18
+ // package.json
19
+ var package_default = {
20
+ name: "@2030/eslint-config",
21
+ type: "module",
22
+ version: "1.0.0-beta.1",
23
+ description: "Shareable ESLint config for conventional coding style",
24
+ author: "Dai Jun <zijun2030@163.com>",
25
+ license: "MIT",
26
+ homepage: "https://github.com/Jun2030/eslint-config",
27
+ keywords: [
28
+ "eslint-config"
29
+ ],
30
+ exports: {
31
+ ".": {
32
+ import: "./dist/index.js",
33
+ require: "./dist/index.cjs"
34
+ }
35
+ },
36
+ main: "./dist/index.js",
37
+ types: "./dist/index.d.ts",
38
+ bin: "./bin/index.js",
39
+ files: [
40
+ "bin",
41
+ "dist"
42
+ ],
43
+ scripts: {
44
+ build: "nr typegen && tsup --format esm,cjs --clean --dts",
45
+ stub: "tsup --format esm",
46
+ dev: "npx @eslint/config-inspector --config eslint.config.ts",
47
+ "build:inspector": "pnpm build && npx @eslint/config-inspector build",
48
+ watch: "tsup --format esm,cjs --watch",
49
+ lint: "eslint --flag unstable_ts_config .",
50
+ typegen: "esno scripts/typegen.ts",
51
+ prepack: "nr build",
52
+ release: "bumpp && pnpm publish",
53
+ test: "vitest",
54
+ typecheck: "tsc --noEmit",
55
+ prepare: "simple-git-hooks"
56
+ },
57
+ peerDependencies: {
58
+ "@eslint-react/eslint-plugin": "^1.12.1",
59
+ "@prettier/plugin-xml": "^3.4.1",
60
+ "@unocss/eslint-plugin": "^0.62.3",
61
+ "astro-eslint-parser": "^1.0.2",
62
+ eslint: "^9.9.1",
63
+ "eslint-plugin-astro": "^1.2.3",
64
+ "eslint-plugin-format": "^0.1.2",
65
+ "eslint-plugin-react-hooks": "^4.6.2",
66
+ "eslint-plugin-react-refresh": "^0.4.11",
67
+ "eslint-plugin-solid": "^0.14.2",
68
+ "eslint-plugin-svelte": "^2.43.0",
69
+ "prettier-plugin-astro": "^0.14.1",
70
+ "prettier-plugin-slidev": "^1.0.5",
71
+ "svelte-eslint-parser": "^0.41.0"
72
+ },
73
+ peerDependenciesMeta: {
74
+ "@eslint-react/eslint-plugin": {
75
+ optional: true
76
+ },
77
+ "@prettier/plugin-xml": {
78
+ optional: true
79
+ },
80
+ "@unocss/eslint-plugin": {
81
+ optional: true
82
+ },
83
+ "astro-eslint-parser": {
84
+ optional: true
85
+ },
86
+ "eslint-plugin-astro": {
87
+ optional: true
88
+ },
89
+ "eslint-plugin-format": {
90
+ optional: true
91
+ },
92
+ "eslint-plugin-react-hooks": {
93
+ optional: true
94
+ },
95
+ "eslint-plugin-react-refresh": {
96
+ optional: true
97
+ },
98
+ "eslint-plugin-solid": {
99
+ optional: true
100
+ },
101
+ "eslint-plugin-svelte": {
102
+ optional: true
103
+ },
104
+ "prettier-plugin-astro": {
105
+ optional: true
106
+ },
107
+ "prettier-plugin-slidev": {
108
+ optional: true
109
+ },
110
+ "svelte-eslint-parser": {
111
+ optional: true
112
+ }
113
+ },
114
+ dependencies: {
115
+ "@antfu/install-pkg": "^0.4.1",
116
+ "@clack/prompts": "^0.7.0",
117
+ "@eslint-community/eslint-plugin-eslint-comments": "^4.4.0",
118
+ "@stylistic/eslint-plugin": "^2.6.4",
119
+ "@typescript-eslint/eslint-plugin": "^8.3.0",
120
+ "@typescript-eslint/parser": "^8.3.0",
121
+ "@vitest/eslint-plugin": "^1.0.5",
122
+ "eslint-config-flat-gitignore": "^0.1.8",
123
+ "eslint-flat-config-utils": "^0.3.1",
124
+ "eslint-merge-processors": "^0.1.0",
125
+ "eslint-plugin-antfu": "^2.3.6",
126
+ "eslint-plugin-command": "^0.2.3",
127
+ "eslint-plugin-import-x": "^4.0.0",
128
+ "eslint-plugin-jsdoc": "^50.2.2",
129
+ "eslint-plugin-jsonc": "^2.16.0",
130
+ "eslint-plugin-markdown": "^5.1.0",
131
+ "eslint-plugin-n": "^17.10.2",
132
+ "eslint-plugin-no-only-tests": "^3.3.0",
133
+ "eslint-plugin-perfectionist": "^3.2.0",
134
+ "eslint-plugin-regexp": "^2.6.0",
135
+ "eslint-plugin-toml": "^0.11.1",
136
+ "eslint-plugin-unicorn": "^55.0.0",
137
+ "eslint-plugin-unused-imports": "^4.1.3",
138
+ "eslint-plugin-vue": "^9.27.0",
139
+ "eslint-plugin-yml": "^1.14.0",
140
+ "eslint-processor-vue-blocks": "^0.1.2",
141
+ globals: "^15.9.0",
142
+ "jsonc-eslint-parser": "^2.4.0",
143
+ "local-pkg": "^0.5.0",
144
+ "parse-gitignore": "^2.0.0",
145
+ picocolors: "^1.0.1",
146
+ "toml-eslint-parser": "^0.10.0",
147
+ "vue-eslint-parser": "^9.4.3",
148
+ "yaml-eslint-parser": "^1.2.3",
149
+ yargs: "^17.7.2"
150
+ },
151
+ devDependencies: {
152
+ "@2030/eslint-config": "workspace:*",
153
+ "@antfu/ni": "^0.22.4",
154
+ "@eslint-react/eslint-plugin": "^1.12.1",
155
+ "@eslint/config-inspector": "^0.5.4",
156
+ "@prettier/plugin-xml": "^3.4.1",
157
+ "@stylistic/eslint-plugin-migrate": "^2.6.4",
158
+ "@types/eslint": "^9.6.1",
159
+ "@types/fs-extra": "^11.0.4",
160
+ "@types/node": "^22.5.0",
161
+ "@types/prompts": "^2.4.9",
162
+ "@types/yargs": "^17.0.33",
163
+ "@unocss/eslint-plugin": "^0.62.3",
164
+ "astro-eslint-parser": "^1.0.2",
165
+ bumpp: "^9.5.2",
166
+ eslint: "^9.9.1",
167
+ "eslint-plugin-astro": "^1.2.3",
168
+ "eslint-plugin-format": "^0.1.2",
169
+ "eslint-plugin-react-hooks": "^4.6.2",
170
+ "eslint-plugin-react-refresh": "^0.4.11",
171
+ "eslint-plugin-solid": "^0.14.2",
172
+ "eslint-plugin-svelte": "^2.43.0",
173
+ "eslint-typegen": "^0.3.1",
174
+ esno: "^4.7.0",
175
+ execa: "^9.3.1",
176
+ "fast-glob": "^3.3.2",
177
+ "fs-extra": "^11.2.0",
178
+ jiti: "^1.21.6",
179
+ "lint-staged": "^15.2.9",
180
+ "prettier-plugin-astro": "^0.14.1",
181
+ "prettier-plugin-slidev": "^1.0.5",
182
+ rimraf: "^6.0.1",
183
+ "simple-git-hooks": "^2.11.1",
184
+ svelte: "^4.2.19",
185
+ "svelte-eslint-parser": "^0.41.0",
186
+ tsup: "^8.2.4",
187
+ tsx: "^4.18.0",
188
+ typescript: "^5.5.4",
189
+ vitest: "^2.0.5",
190
+ vue: "^3.4.38"
191
+ },
192
+ resolutions: {
193
+ "@eslint-community/eslint-utils": "^4.4.0",
194
+ "@typescript-eslint/utils": "^8.3.0",
195
+ eslint: "^9.9.1",
196
+ tsx: "^4.18.0"
197
+ },
198
+ "simple-git-hooks": {
199
+ "pre-commit": "npx lint-staged"
200
+ },
201
+ "lint-staged": {
202
+ "*": "eslint --flag unstable_ts_config --fix"
203
+ }
204
+ };
205
+
206
+ // src/cli/constants.ts
207
+ var vscodeSettingsString = `
208
+ // Disable the default formatter, use eslint instead
209
+ "prettier.enable": false,
210
+ "editor.formatOnSave": false,
211
+
212
+ // Auto fix
213
+ "editor.codeActionsOnSave": {
214
+ "source.fixAll.eslint": "explicit",
215
+ "source.organizeImports": "never"
216
+ },
217
+
218
+ // Silent the stylistic rules in you IDE, but still auto fix them
219
+ "eslint.rules.customizations": [
220
+ { "rule": "style/*", "severity": "off", "fixable": true },
221
+ { "rule": "format/*", "severity": "off", "fixable": true },
222
+ { "rule": "*-indent", "severity": "off", "fixable": true },
223
+ { "rule": "*-spacing", "severity": "off", "fixable": true },
224
+ { "rule": "*-spaces", "severity": "off", "fixable": true },
225
+ { "rule": "*-order", "severity": "off", "fixable": true },
226
+ { "rule": "*-dangle", "severity": "off", "fixable": true },
227
+ { "rule": "*-newline", "severity": "off", "fixable": true },
228
+ { "rule": "*quotes", "severity": "off", "fixable": true },
229
+ { "rule": "*semi", "severity": "off", "fixable": true }
230
+ ],
231
+
232
+ // Enable eslint for all supported languages
233
+ "eslint.validate": [
234
+ "javascript",
235
+ "javascriptreact",
236
+ "typescript",
237
+ "typescriptreact",
238
+ "vue",
239
+ "html",
240
+ "markdown",
241
+ "json",
242
+ "jsonc",
243
+ "yaml",
244
+ "toml",
245
+ "xml",
246
+ "gql",
247
+ "graphql",
248
+ "astro",
249
+ "css",
250
+ "less",
251
+ "scss",
252
+ "pcss",
253
+ "postcss"
254
+ ]
255
+ `;
256
+ var frameworkOptions = [
257
+ {
258
+ label: c.green("Vue"),
259
+ value: "vue"
260
+ },
261
+ {
262
+ label: c.cyan("React"),
263
+ value: "react"
264
+ },
265
+ {
266
+ label: c.red("Svelte"),
267
+ value: "svelte"
268
+ },
269
+ {
270
+ label: c.magenta("Astro"),
271
+ value: "astro"
272
+ },
273
+ {
274
+ label: c.cyan("Solid"),
275
+ value: "solid"
276
+ },
277
+ {
278
+ label: c.blue("Slidev"),
279
+ value: "slidev"
280
+ }
281
+ ];
282
+ var frameworks = frameworkOptions.map(({ value }) => value);
283
+ var extraOptions = [
284
+ {
285
+ hint: "Use external formatters (Prettier and/or dprint) to format files that ESLint cannot handle yet (.css, .html, etc)",
286
+ label: c.red("Formatter"),
287
+ value: "formatter"
288
+ },
289
+ {
290
+ label: c.cyan("UnoCSS"),
291
+ value: "unocss"
292
+ }
293
+ ];
294
+ var extra = extraOptions.map(({ value }) => value);
295
+ var dependenciesMap = {
296
+ astro: [
297
+ "eslint-plugin-astro",
298
+ "astro-eslint-parser"
299
+ ],
300
+ react: [
301
+ "@eslint-react/eslint-plugin",
302
+ "eslint-plugin-react-hooks",
303
+ "eslint-plugin-react-refresh"
304
+ ],
305
+ slidev: [
306
+ "prettier-plugin-slidev"
307
+ ],
308
+ solid: [
309
+ "eslint-plugin-solid"
310
+ ],
311
+ svelte: [
312
+ "eslint-plugin-svelte",
313
+ "svelte-eslint-parser"
314
+ ],
315
+ vue: []
316
+ };
317
+
318
+ // src/cli/utils.ts
319
+ import { execSync } from "node:child_process";
320
+ function isGitClean() {
321
+ try {
322
+ execSync("git diff-index --quiet HEAD --");
323
+ return true;
324
+ } catch {
325
+ return false;
326
+ }
327
+ }
328
+ function getEslintConfigContent(mainConfig, additionalConfigs) {
329
+ return `
330
+ import jun from '@2030/eslint-config'
331
+
332
+ export default jun({
333
+ ${mainConfig}
334
+ }${additionalConfigs?.map((config) => `,{
335
+ ${config}
336
+ }`)})
337
+ `.trimStart();
338
+ }
339
+
340
+ // src/cli/stages/update-package-json.ts
341
+ import path from "node:path";
342
+ import fsp from "node:fs/promises";
343
+ import process from "node:process";
344
+ import c2 from "picocolors";
345
+ import * as p from "@clack/prompts";
346
+ async function updatePackageJson(result) {
347
+ const cwd = process.cwd();
348
+ const pathPackageJSON = path.join(cwd, "package.json");
349
+ p.log.step(c2.cyan(`Bumping @2030/eslint-config to v${package_default.version}`));
350
+ const pkgContent = await fsp.readFile(pathPackageJSON, "utf-8");
351
+ const pkg = JSON.parse(pkgContent);
352
+ pkg.devDependencies ??= {};
353
+ pkg.devDependencies["@2030/eslint-config"] = `^${package_default.version}`;
354
+ pkg.devDependencies.eslint ??= package_default.devDependencies.eslint.replace("npm:eslint-ts-patch@", "").replace(/-\d+$/, "");
355
+ const addedPackages = [];
356
+ if (result.extra.length) {
357
+ result.extra.forEach((item) => {
358
+ switch (item) {
359
+ case "formatter":
360
+ [
361
+ "eslint-plugin-format",
362
+ result.frameworks.includes("astro") ? "prettier-plugin-astro" : null
363
+ ].forEach((f) => {
364
+ if (!f)
365
+ return;
366
+ pkg.devDependencies[f] = package_default.devDependencies[f];
367
+ addedPackages.push(f);
368
+ });
369
+ break;
370
+ case "unocss":
371
+ [
372
+ "@unocss/eslint-plugin"
373
+ ].forEach((f) => {
374
+ pkg.devDependencies[f] = package_default.devDependencies[f];
375
+ addedPackages.push(f);
376
+ });
377
+ break;
378
+ }
379
+ });
380
+ }
381
+ for (const framework of result.frameworks) {
382
+ const deps = dependenciesMap[framework];
383
+ if (deps) {
384
+ deps.forEach((f) => {
385
+ pkg.devDependencies[f] = package_default.devDependencies[f];
386
+ addedPackages.push(f);
387
+ });
388
+ }
389
+ }
390
+ if (addedPackages.length)
391
+ p.note(`${c2.dim(addedPackages.join(", "))}`, "Added packages");
392
+ await fsp.writeFile(pathPackageJSON, JSON.stringify(pkg, null, 2));
393
+ p.log.success(c2.green(`Changes wrote to package.json`));
394
+ }
395
+
396
+ // src/cli/stages/update-eslint-files.ts
397
+ import fs from "node:fs";
398
+ import fsp2 from "node:fs/promises";
399
+ import process2 from "node:process";
400
+ import path2 from "node:path";
401
+ import c3 from "picocolors";
402
+ import * as p2 from "@clack/prompts";
403
+ import parse from "parse-gitignore";
404
+ async function updateEslintFiles(result) {
405
+ const cwd = process2.cwd();
406
+ const pathESLintIgnore = path2.join(cwd, ".eslintignore");
407
+ const pathPackageJSON = path2.join(cwd, "package.json");
408
+ const pkgContent = await fsp2.readFile(pathPackageJSON, "utf-8");
409
+ const pkg = JSON.parse(pkgContent);
410
+ const configFileName = pkg.type === "module" ? "eslint.config.js" : "eslint.config.mjs";
411
+ const pathFlatConfig = path2.join(cwd, configFileName);
412
+ const eslintIgnores = [];
413
+ if (fs.existsSync(pathESLintIgnore)) {
414
+ p2.log.step(c3.cyan(`Migrating existing .eslintignore`));
415
+ const content = await fsp2.readFile(pathESLintIgnore, "utf-8");
416
+ const parsed = parse(content);
417
+ const globs = parsed.globs();
418
+ for (const glob of globs) {
419
+ if (glob.type === "ignore")
420
+ eslintIgnores.push(...glob.patterns);
421
+ else if (glob.type === "unignore")
422
+ eslintIgnores.push(...glob.patterns.map((pattern) => `!${pattern}`));
423
+ }
424
+ }
425
+ const configLines = [];
426
+ if (eslintIgnores.length)
427
+ configLines.push(`ignores: ${JSON.stringify(eslintIgnores)},`);
428
+ if (result.extra.includes("formatter"))
429
+ configLines.push(`formatters: true,`);
430
+ if (result.extra.includes("unocss"))
431
+ configLines.push(`unocss: true,`);
432
+ for (const framework of result.frameworks)
433
+ configLines.push(`${framework}: true,`);
434
+ const mainConfig = configLines.map((i) => ` ${i}`).join("\n");
435
+ const additionalConfig = [];
436
+ const eslintConfigContent = getEslintConfigContent(mainConfig, additionalConfig);
437
+ await fsp2.writeFile(pathFlatConfig, eslintConfigContent);
438
+ p2.log.success(c3.green(`Created ${configFileName}`));
439
+ const files = fs.readdirSync(cwd);
440
+ const legacyConfig = [];
441
+ files.forEach((file) => {
442
+ if (/eslint|prettier/.test(file) && !/eslint\.config\./.test(file))
443
+ legacyConfig.push(file);
444
+ });
445
+ if (legacyConfig.length)
446
+ p2.note(`${c3.dim(legacyConfig.join(", "))}`, "You can now remove those files manually");
447
+ }
448
+
449
+ // src/cli/stages/update-vscode-settings.ts
450
+ import path3 from "node:path";
451
+ import fsp3 from "node:fs/promises";
452
+ import fs2 from "node:fs";
453
+ import process3 from "node:process";
454
+ import c4 from "picocolors";
455
+ import * as p3 from "@clack/prompts";
456
+ async function updateVscodeSettings(result) {
457
+ const cwd = process3.cwd();
458
+ if (!result.updateVscodeSettings)
459
+ return;
460
+ const dotVscodePath = path3.join(cwd, ".vscode");
461
+ const settingsPath = path3.join(dotVscodePath, "settings.json");
462
+ if (!fs2.existsSync(dotVscodePath))
463
+ await fsp3.mkdir(dotVscodePath, { recursive: true });
464
+ if (!fs2.existsSync(settingsPath)) {
465
+ await fsp3.writeFile(settingsPath, `{${vscodeSettingsString}}
466
+ `, "utf-8");
467
+ p3.log.success(c4.green(`Created .vscode/settings.json`));
468
+ } else {
469
+ let settingsContent = await fsp3.readFile(settingsPath, "utf8");
470
+ settingsContent = settingsContent.trim().replace(/\s*\}$/, "");
471
+ settingsContent += settingsContent.endsWith(",") || settingsContent.endsWith("{") ? "" : ",";
472
+ settingsContent += `${vscodeSettingsString}}
473
+ `;
474
+ await fsp3.writeFile(settingsPath, settingsContent, "utf-8");
475
+ p3.log.success(c4.green(`Updated .vscode/settings.json`));
476
+ }
477
+ }
478
+
479
+ // src/cli/run.ts
480
+ async function run(options = {}) {
481
+ const argSkipPrompt = !!process4.env.SKIP_PROMPT || options.yes;
482
+ const argTemplate = options.frameworks?.map((m) => m.trim());
483
+ const argExtra = options.extra?.map((m) => m.trim());
484
+ if (fs3.existsSync(path4.join(process4.cwd(), "eslint.config.js"))) {
485
+ p4.log.warn(c5.yellow(`eslint.config.js already exists, migration wizard exited.`));
486
+ return process4.exit(1);
487
+ }
488
+ let result = {
489
+ extra: argExtra ?? [],
490
+ frameworks: argTemplate ?? [],
491
+ uncommittedConfirmed: false,
492
+ updateVscodeSettings: true
493
+ };
494
+ if (!argSkipPrompt) {
495
+ result = await p4.group({
496
+ uncommittedConfirmed: () => {
497
+ if (argSkipPrompt || isGitClean())
498
+ return Promise.resolve(true);
499
+ return p4.confirm({
500
+ initialValue: false,
501
+ message: "There are uncommitted changes in the current repository, are you sure to continue?"
502
+ });
503
+ },
504
+ frameworks: ({ results }) => {
505
+ const isArgTemplateValid = typeof argTemplate === "string" && !!frameworks.includes(argTemplate);
506
+ if (!results.uncommittedConfirmed || isArgTemplateValid)
507
+ return;
508
+ const message = !isArgTemplateValid && argTemplate ? `"${argTemplate}" isn't a valid template. Please choose from below: ` : "Select a framework:";
509
+ return p4.multiselect({
510
+ message: c5.reset(message),
511
+ options: frameworkOptions,
512
+ required: false
513
+ });
514
+ },
515
+ extra: ({ results }) => {
516
+ const isArgExtraValid = argExtra?.length && !argExtra.filter((element) => !extra.includes(element)).length;
517
+ if (!results.uncommittedConfirmed || isArgExtraValid)
518
+ return;
519
+ const message = !isArgExtraValid && argExtra ? `"${argExtra}" isn't a valid extra util. Please choose from below: ` : "Select a extra utils:";
520
+ return p4.multiselect({
521
+ message: c5.reset(message),
522
+ options: extraOptions,
523
+ required: false
524
+ });
525
+ },
526
+ updateVscodeSettings: ({ results }) => {
527
+ if (!results.uncommittedConfirmed)
528
+ return;
529
+ return p4.confirm({
530
+ initialValue: true,
531
+ message: "Update .vscode/settings.json for better VS Code experience?"
532
+ });
533
+ }
534
+ }, {
535
+ onCancel: () => {
536
+ p4.cancel("Operation cancelled.");
537
+ process4.exit(0);
538
+ }
539
+ });
540
+ if (!result.uncommittedConfirmed)
541
+ return process4.exit(1);
542
+ }
543
+ await updatePackageJson(result);
544
+ await updateEslintFiles(result);
545
+ await updateVscodeSettings(result);
546
+ p4.log.success(c5.green(`Setup completed`));
547
+ p4.outro(`Now you can update the dependencies and run ${c5.blue("eslint . --fix")}
548
+ `);
549
+ }
550
+
551
+ // src/cli/index.ts
552
+ function header() {
553
+ console.log("\n");
554
+ p5.intro(`${c6.green(`@2030/eslint-config `)}${c6.dim(`v${package_default.version}`)}`);
555
+ }
556
+ var instance = yargs(hideBin(process5.argv)).scriptName("@2030/eslint-config").usage("").command(
557
+ "*",
558
+ "Run the initialization or migration",
559
+ (args) => args.option("yes", {
560
+ alias: "y",
561
+ description: "Skip prompts and use default values",
562
+ type: "boolean"
563
+ }).option("template", {
564
+ alias: "t",
565
+ description: "Use the framework template for optimal customization: vue / react / svelte / astro",
566
+ type: "string"
567
+ }).option("extra", {
568
+ alias: "e",
569
+ array: true,
570
+ description: "Use the extra utils: formatter / perfectionist / unocss",
571
+ type: "string"
572
+ }).help(),
573
+ async (args) => {
574
+ header();
575
+ try {
576
+ await run(args);
577
+ } catch (error) {
578
+ p5.log.error(c6.inverse(c6.red(" Failed to migrate ")));
579
+ p5.log.error(c6.red(`\u2718 ${String(error)}`));
580
+ process5.exit(1);
581
+ }
582
+ }
583
+ ).showHelpOnFail(false).alias("h", "help").version("version", package_default.version).alias("v", "version");
584
+ instance.help().argv;