@liangmi/vp-config 0.1.3 → 0.2.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
@@ -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: {
@@ -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,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@liangmi/vp-config",
3
- "version": "0.1.3",
3
+ "version": "0.2.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": {