@liangmi/vp-config 0.1.3 → 0.3.0

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/README.md CHANGED
@@ -47,7 +47,7 @@ We provide four config categories for different kinds of projects.
47
47
 
48
48
  The `website` category is experimental and its defaults may change before the package reaches a stable release. React and browser linting are available, but Vue template linting is still waiting for [better Vue support in Oxlint](https://github.com/oxc-project/oxc/issues/15761).
49
49
 
50
- For monorepos, different presets should be used in combination. We should use `base` the workspace root, and use other categories as needed.
50
+ For monorepos, [Vite+ do not support nested `lint`/`fmt` config for now](https://github.com/voidzero-dev/vite-plus/issues/997). In the future, different presets should be used in combination. We should use `base` the workspace root, and use other categories as needed.
51
51
 
52
52
  ### Customizable
53
53
 
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { c as writeRuntimeInfo } from "./info-CHtwxjhy.mjs";
1
+ import { c as writeRuntimeInfo } from "./info-XwsgbUrs.mjs";
2
2
  import { defineConfig, mergeConfig } from "vite-plus";
3
3
  //#region src/base/fmt.ts
4
4
  const fmtBase = {
@@ -52,6 +52,7 @@ const componentOverride = {
52
52
  "react/jsx-props-no-spreading": "off"
53
53
  }
54
54
  };
55
+ const tuiOverride = mergeConfig(cliOverride, componentOverride);
55
56
  //#endregion
56
57
  //#region src/base/lint.ts
57
58
  const suspicious = {
@@ -249,6 +250,7 @@ const lintBase = {
249
250
  reportUnusedDisableDirectives: "warn",
250
251
  respectEslintDisableDirectives: false
251
252
  },
253
+ ignorePatterns: ["bin/**"],
252
254
  overrides: [
253
255
  {
254
256
  env: {
@@ -297,7 +299,7 @@ const lintBase = {
297
299
  //#region src/base/run.ts
298
300
  const lintInput = [
299
301
  { auto: true },
300
- "!node_modules/.vp-config/info.json",
302
+ "!**/node_modules/.vp-config/info.json",
301
303
  "index.html"
302
304
  ];
303
305
  const runBase = {
@@ -344,10 +346,7 @@ const fmtWebsite = {
344
346
  //#region src/cli/index.ts
345
347
  const cliConfig = {
346
348
  fmt: fmtWebsite,
347
- lint: mergeConfig(lintBase, mergeConfig(mergeConfig(cliOverride, componentOverride), { overrides: [{
348
- rules: { "import/no-unassigned-import": "off" },
349
- files: ["bin/**"]
350
- }] })),
349
+ lint: mergeConfig(lintBase, tuiOverride),
351
350
  pack: {
352
351
  dts: false,
353
352
  minify: true,
@@ -417,7 +416,15 @@ function isStagedObjectConfig(config) {
417
416
  //#region src/lib/index.ts
418
417
  const libConfig = {
419
418
  fmt: fmtBase,
420
- lint: mergeConfig(lintBase, {}),
419
+ lint: mergeConfig(lintBase, { overrides: [{
420
+ files: [
421
+ "cli.*",
422
+ "**/cli/**",
423
+ "tui.*",
424
+ "**/tui/**"
425
+ ],
426
+ ...tuiOverride
427
+ }] }),
421
428
  pack: {
422
429
  fixedExtension: true,
423
430
  exports: true,
@@ -105,7 +105,7 @@ function createRuntimeInfo(configFile, input, createdNodeModules) {
105
105
  cleanup: { createdNodeModules }
106
106
  };
107
107
  }
108
- const vitePlusConfigKeys = new Set([
108
+ const vitePlusConfigKeys = /* @__PURE__ */ new Set([
109
109
  "create",
110
110
  "fmt",
111
111
  "lint",
@@ -1,4 +1,4 @@
1
- import { a as isProject, c as writeRuntimeInfo, d as projectConfigNames, f as rootConfigNames, i as isLibProject, l as packageName, n as ensureRuntimeInfo, o as isWebsiteProject, p as viteConfigNames, r as getInfoPath, s as readRuntimeInfo, t as cleanupRuntimeInfo, u as pluginName } from "../info-CHtwxjhy.mjs";
1
+ import { a as isProject, c as writeRuntimeInfo, d as projectConfigNames, f as rootConfigNames, i as isLibProject, l as packageName, n as ensureRuntimeInfo, o as isWebsiteProject, p as viteConfigNames, r as getInfoPath, s as readRuntimeInfo, t as cleanupRuntimeInfo, u as pluginName } from "../info-XwsgbUrs.mjs";
2
2
  import { existsSync } from "node:fs";
3
3
  import { basename, dirname, join } from "node:path";
4
4
  import { definePlugin, defineRule } from "@oxlint/plugins";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@liangmi/vp-config",
3
- "version": "0.1.3",
3
+ "version": "0.3.0",
4
4
  "description": "Liang's JavaScript development toolchain config with Vite+.",
5
5
  "homepage": "https://github.com/liangmiQwQ/vp-config#readme",
6
6
  "bugs": {
@@ -25,11 +25,11 @@
25
25
  "access": "public"
26
26
  },
27
27
  "devDependencies": {
28
- "@types/node": "^26.0.0",
29
- "@typescript/native-preview": "7.0.0-dev.20260620.1",
28
+ "@types/node": "^26.1.0",
29
+ "@typescript/native-preview": "7.0.0-dev.20260702.3",
30
30
  "bumpp": "^11.1.0",
31
31
  "typescript": "^6.0.3",
32
- "vite-plus": "^0.2.1"
32
+ "vite-plus": "^0.2.2"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "@oxlint/plugins": "1.61.0",