@dbtlr/tooling 0.1.1 → 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.
@@ -1 +1 @@
1
- {"version":3,"file":"vite-plus.d.mts","names":[],"sources":["../src/vite-plus.ts"],"mappings":";;;KAQK,UAAA;AAAA,KAEA,mBAAA;EAAA,SACM,SAAA;EAAA,SACA,SAAA;EAAA,SACA,YAAA;EAAA,SACA,WAAA;EAAA,SACA,OAAA;EAAA,SACA,IAAA,GAAO,UAAA;EAAA,SACP,KAAA,GAAQ,UAAA;EAAA,SACR,KAAA,GAAQ,UAAA;EAAA,SACR,SAAA,YAAqB,UAAA;AAAA;AAAA,KAsC3B,sBAAA;EAAA,SACM,IAAA,GAAO,UAAA;EAAA,SACP,IAAA,GAAO,mBAAA;EAAA,SACP,GAAA,GAAM,UAAA;EAAA,SACN,MAAA,GAAS,UAAA;AAAA;AAAA,cA4Gd,YAAA,GAAgB,OAAA,GAAS,sBAAA,KAA8B,UAsBzD;AAAA,cAEE,eAAA,GAAmB,OAAA,GAAS,sBAAA,KAA8B,UAO9D"}
1
+ {"version":3,"file":"vite-plus.d.mts","names":[],"sources":["../src/vite-plus.ts"],"mappings":";;;KAQK,UAAA;AAAA,KAEA,mBAAA;EAAA,SACM,SAAA;EAAA,SACA,SAAA;EAAA,SACA,YAAA;EAAA,SACA,WAAA;EAAA,SACA,OAAA;EAAA,SACA,IAAA,GAAO,UAAA;EAAA,SACP,KAAA,GAAQ,UAAA;EAAA,SACR,KAAA,GAAQ,UAAA;EAAA,SACR,SAAA,YAAqB,UAAA;AAAA;AAAA,KA8D3B,sBAAA;EAAA,SACM,IAAA,GAAO,UAAA;EAAA,SACP,IAAA,GAAO,mBAAA;EAAA,SACP,GAAA,GAAM,UAAA;EAAA,SACN,MAAA,GAAS,UAAA;AAAA;AAAA,cA+Gd,YAAA,GAAgB,OAAA,GAAS,sBAAA,KAA8B,UAsBzD;AAAA,cAEE,eAAA,GAAmB,OAAA,GAAS,sBAAA,KAA8B,UAO9D"}
@@ -6,6 +6,8 @@ const REACT_PLUGINS = [
6
6
  "jsx-a11y"
7
7
  ];
8
8
  const REACT_RULES = {
9
+ "react/jsx-max-depth": "off",
10
+ "react/jsx-props-no-spreading": "off",
9
11
  "react/react-in-jsx-scope": "off",
10
12
  "unicorn/filename-case": ["warn", { cases: {
11
13
  kebabCase: true,
@@ -14,6 +16,19 @@ const REACT_RULES = {
14
16
  };
15
17
  const NODE_PLUGINS = ["node"];
16
18
  const NODE_RULES = { "import/no-nodejs-modules": "off" };
19
+ const RELAXED_DEFAULTS = {
20
+ "id-length": "off",
21
+ "import/group-exports": "off",
22
+ "init-declarations": "off",
23
+ "max-params": "off",
24
+ "max-statements": "off",
25
+ "no-continue": "off",
26
+ "prefer-destructuring": "off",
27
+ "prefer-named-capture-group": "off",
28
+ "unicorn/catch-error-name": "off",
29
+ "unicorn/no-await-expression-member": "off",
30
+ "unicorn/numeric-separators-style": "off"
31
+ };
17
32
  const isWholeProject = (target) => target === true;
18
33
  const targetGlobs = (target) => Array.isArray(target) && target.length > 0 ? target : void 0;
19
34
  const scopedOverride = (globs, plugins, rules) => ({
@@ -98,6 +113,7 @@ const vitePlusLint = (options = {}) => {
98
113
  "vitest/prefer-importing-vitest-globals": "off",
99
114
  "vitest/prefer-to-be-falsy": "off",
100
115
  "vitest/prefer-to-be-truthy": "off",
116
+ ...RELAXED_DEFAULTS,
101
117
  ...nodeWhole ? NODE_RULES : {},
102
118
  ...reactWhole ? REACT_RULES : {},
103
119
  ...options.rules
@@ -1 +1 @@
1
- {"version":3,"file":"vite-plus.mjs","names":[],"sources":["../src/vite-plus.ts"],"sourcesContent":["import { compactObject } from './types.js';\nimport type { JsonObject } from './types.js';\n\n// A lint target — `node` or `react` — is a set of files the target applies to.\n// `true` means the whole project (config emitted at the top level); a list of\n// globs means just those files (config emitted as a scoped `overrides` fragment),\n// which is how a mixed-target monorepo's centralized root config addresses each\n// package. `false`/omitted/`[]` means the target is off.\ntype LintTarget = boolean | readonly string[];\n\ntype VitePlusLintOptions = {\n readonly typeAware?: boolean;\n readonly typeCheck?: boolean;\n readonly denyWarnings?: boolean;\n readonly maxWarnings?: number;\n readonly ignores?: readonly string[];\n readonly node?: LintTarget;\n readonly react?: LintTarget;\n readonly rules?: JsonObject;\n readonly overrides?: readonly JsonObject[];\n};\n\n// oxlint plugins enabled for a React target; the `react` plugin also carries the\n// rules-of-hooks / exhaustive-deps checks.\nconst REACT_PLUGINS = ['react', 'react-perf', 'jsx-a11y'] as const;\n\n// The rule tweaks a React target needs: the modern automatic JSX runtime (no\n// in-scope React import) and PascalCase component filenames.\nconst REACT_RULES: JsonObject = {\n 'react/react-in-jsx-scope': 'off',\n 'unicorn/filename-case': ['warn', { cases: { kebabCase: true, pascalCase: true } }],\n};\n\n// oxlint plugins enabled for a Node target.\nconst NODE_PLUGINS = ['node'] as const;\n\n// The rule a Node target needs: allow Node builtins (forbidden by the browser\n// baseline). Enabled alongside the `node` plugin. Consumed by both the\n// whole-project and glob-scoped node paths so they can't drift.\nconst NODE_RULES: JsonObject = {\n 'import/no-nodejs-modules': 'off',\n};\n\n// A target is \"whole project\" only when explicitly `true`.\nconst isWholeProject = (target: LintTarget | undefined): boolean => target === true;\n\n// Non-empty glob list → the target is scoped to those files; otherwise undefined.\nconst targetGlobs = (target: LintTarget | undefined): readonly string[] | undefined =>\n Array.isArray(target) && target.length > 0 ? target : undefined;\n\n// Build the scoped `overrides` fragment for a glob-targeted plugin set + rules.\nconst scopedOverride = (\n globs: readonly string[],\n plugins: readonly string[],\n rules: JsonObject,\n): JsonObject => ({ files: [...globs], plugins: [...plugins], rules: { ...rules } });\n\ntype VitePlusPackageOptions = {\n readonly pack?: JsonObject;\n readonly lint?: VitePlusLintOptions;\n readonly fmt?: JsonObject;\n readonly staged?: JsonObject | false;\n};\n\nconst vitePlusLint = (options: VitePlusLintOptions = {}): JsonObject => {\n const nodeWhole = isWholeProject(options.node);\n const reactWhole = isWholeProject(options.react);\n const nodeGlobs = targetGlobs(options.node);\n const reactGlobs = targetGlobs(options.react);\n\n // Glob-scoped targets become `overrides` fragments; they precede the standing\n // test-file override and any caller-supplied overrides.\n const targetOverrides: JsonObject[] = [\n ...(nodeGlobs ? [scopedOverride(nodeGlobs, NODE_PLUGINS, NODE_RULES)] : []),\n ...(reactGlobs ? [scopedOverride(reactGlobs, REACT_PLUGINS, REACT_RULES)] : []),\n ];\n\n return {\n categories: {\n correctness: 'error',\n nursery: 'off',\n pedantic: 'off',\n perf: 'error',\n restriction: 'off',\n style: 'warn',\n suspicious: 'error',\n },\n ignorePatterns: [\n 'node_modules',\n 'dist',\n 'build',\n 'coverage',\n '.turbo',\n '.vite',\n ...(options.ignores ?? []),\n ],\n // Strict by default: warnings fail, and type-aware lint + type checking run.\n // This is the house gate; opt out of any of them per-flag with `false`.\n options: compactObject({\n denyWarnings: options.denyWarnings ?? true,\n maxWarnings: options.maxWarnings,\n typeAware: options.typeAware ?? true,\n typeCheck: options.typeCheck ?? true,\n }),\n overrides: [\n ...targetOverrides,\n {\n files: [\n 'tests/**/*.ts',\n 'tests/**/*.tsx',\n '**/*.test.ts',\n '**/*.test.tsx',\n '**/*.spec.ts',\n '**/*.spec.tsx',\n ],\n rules: {\n 'max-statements': 'off',\n 'vitest/no-importing-vitest-globals': 'off',\n 'vitest/prefer-expect-assertions': 'off',\n 'vitest/prefer-importing-vitest-globals': 'off',\n },\n },\n ...(options.overrides ?? []),\n ],\n plugins: [\n 'typescript',\n 'import',\n 'eslint',\n 'unicorn',\n 'oxc',\n 'promise',\n 'vitest',\n // Whole-project targets enable plugins here; glob-scoped targets enable them\n // in their `overrides` fragment instead (see targetOverrides).\n ...(nodeWhole ? NODE_PLUGINS : []),\n ...(reactWhole ? REACT_PLUGINS : []),\n ],\n rules: {\n 'capitalized-comments': 'off',\n 'import/no-named-export': 'off',\n // Browser baseline forbids Node builtins; a whole-project node target lifts\n // this via NODE_RULES below, a glob-scoped one only inside its override.\n 'import/no-nodejs-modules': 'error',\n // Named exports are the house style (see import/no-named-export above), so\n // don't nudge single-export modules toward a default export.\n 'import/prefer-default-export': 'off',\n 'no-duplicate-imports': ['warn', { allowSeparateTypeImports: true }],\n 'no-magic-numbers': 'off',\n 'no-ternary': 'off',\n 'sort-imports': 'off',\n 'typescript/consistent-type-definitions': ['warn', 'type'],\n 'unicorn/no-null': 'off',\n // Ternaries are allowed (no-ternary off) but not forced; prefer-ternary would\n // rewrite else-if chains into nested ternaries, conflicting with unicorn/no-nested-ternary.\n 'unicorn/prefer-ternary': 'off',\n 'vitest/prefer-importing-vitest-globals': 'off',\n // Conflicts with vitest/prefer-strict-boolean-matchers; prefer strict toBe(true|false).\n // Disabled at base (not just in test files) so the conflict can't fire anywhere.\n 'vitest/prefer-to-be-falsy': 'off',\n 'vitest/prefer-to-be-truthy': 'off',\n // Whole-project targets only; glob-scoped rules live in their overrides.\n // Spread last so a whole-project node target overrides the baseline above.\n ...(nodeWhole ? NODE_RULES : {}),\n ...(reactWhole ? REACT_RULES : {}),\n ...options.rules,\n },\n };\n};\n\nconst vitePlusBase = (options: VitePlusPackageOptions = {}): JsonObject =>\n compactObject({\n fmt: {\n ignorePatterns: [\n 'pnpm-lock.yaml',\n 'bun.lock',\n // Generated by release-please/changesets — let the release tool own its\n // format instead of fighting it on every release PR.\n 'CHANGELOG.md',\n 'dist/**',\n 'build/**',\n 'node_modules/**',\n 'coverage/**',\n '.turbo/**',\n '.vite/**',\n ],\n singleQuote: true,\n sortImports: { ignoreCase: true },\n ...options.fmt,\n },\n lint: vitePlusLint(options.lint),\n staged: options.staged === false ? undefined : (options.staged ?? { '*': 'vp check --fix' }),\n });\n\nconst vitePlusPackage = (options: VitePlusPackageOptions = {}): JsonObject => ({\n ...vitePlusBase(options),\n pack: {\n dts: { tsgo: true },\n exports: true,\n ...options.pack,\n },\n});\n\nexport { vitePlusBase, vitePlusPackage };\nexport type { VitePlusLintOptions, VitePlusPackageOptions };\n"],"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F;IACA,OAAO;KACL,kBAAkB;KAClB,sCAAsC;KACtC,mCAAmC;KACnC,0CAA0C;IAC5C;GACF;GACA,GAAI,QAAQ,aAAa,CAAC;EAC5B;EACA,SAAS;GACP;GACA;GACA;GACA;GACA;GACA;GACA;GAGA,GAAI,YAAY,eAAe,CAAC;GAChC,GAAI,aAAa,gBAAgB,CAAC;EACpC;EACA,OAAO;GACL,wBAAwB;GACxB,0BAA0B;GAG1B,4BAA4B;GAG5B,gCAAgC;GAChC,wBAAwB,CAAC,QAAQ,EAAE,0BAA0B,KAAK,CAAC;GACnE,oBAAoB;GACpB,cAAc;GACd,gBAAgB;GAChB,0CAA0C,CAAC,QAAQ,MAAM;GACzD,mBAAmB;GAGnB,0BAA0B;GAC1B,0CAA0C;GAG1C,6BAA6B;GAC7B,8BAA8B;GAG9B,GAAI,YAAY,aAAa,CAAC;GAC9B,GAAI,aAAa,cAAc,CAAC;GAChC,GAAG,QAAQ;EACb;CACF;AACF;AAEA,MAAM,gBAAgB,UAAkC,CAAC,MACvD,cAAc;CACZ,KAAK;EACH,gBAAgB;GACd;GACA;GAGA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EACA,aAAa;EACb,aAAa,EAAE,YAAY,KAAK;EAChC,GAAG,QAAQ;CACb;CACA,MAAM,aAAa,QAAQ,IAAI;CAC/B,QAAQ,QAAQ,WAAW,QAAQ,KAAA,IAAa,QAAQ,UAAU,EAAE,KAAK,iBAAiB;AAC5F,CAAC;AAEH,MAAM,mBAAmB,UAAkC,CAAC,OAAmB;CAC7E,GAAG,aAAa,OAAO;CACvB,MAAM;EACJ,KAAK,EAAE,MAAM,KAAK;EAClB,SAAS;EACT,GAAG,QAAQ;CACb;AACF"}
1
+ {"version":3,"file":"vite-plus.mjs","names":[],"sources":["../src/vite-plus.ts"],"sourcesContent":["import { compactObject } from './types.js';\nimport type { JsonObject } from './types.js';\n\n// A lint target — `node` or `react` — is a set of files the target applies to.\n// `true` means the whole project (config emitted at the top level); a list of\n// globs means just those files (config emitted as a scoped `overrides` fragment),\n// which is how a mixed-target monorepo's centralized root config addresses each\n// package. `false`/omitted/`[]` means the target is off.\ntype LintTarget = boolean | readonly string[];\n\ntype VitePlusLintOptions = {\n readonly typeAware?: boolean;\n readonly typeCheck?: boolean;\n readonly denyWarnings?: boolean;\n readonly maxWarnings?: number;\n readonly ignores?: readonly string[];\n readonly node?: LintTarget;\n readonly react?: LintTarget;\n readonly rules?: JsonObject;\n readonly overrides?: readonly JsonObject[];\n};\n\n// oxlint plugins enabled for a React target; the `react` plugin also carries the\n// rules-of-hooks / exhaustive-deps checks.\nconst REACT_PLUGINS = ['react', 'react-perf', 'jsx-a11y'] as const;\n\n// The rule tweaks a React target needs: the modern automatic JSX runtime (no\n// in-scope React import), PascalCase component filenames, and two relaxed\n// defaults that are react-plugin rules (so they live here, only emitted when the\n// react plugin is loaded — both whole-project and glob-scoped).\nconst REACT_RULES: JsonObject = {\n 'react/jsx-max-depth': 'off',\n 'react/jsx-props-no-spreading': 'off',\n 'react/react-in-jsx-scope': 'off',\n 'unicorn/filename-case': ['warn', { cases: { kebabCase: true, pascalCase: true } }],\n};\n\n// oxlint plugins enabled for a Node target.\nconst NODE_PLUGINS = ['node'] as const;\n\n// The rule a Node target needs: allow Node builtins (forbidden by the browser\n// baseline). Enabled alongside the `node` plugin. Consumed by both the\n// whole-project and glob-scoped node paths so they can't drift.\nconst NODE_RULES: JsonObject = {\n 'import/no-nodejs-modules': 'off',\n};\n\n// Too-opinionated, runtime-agnostic rules turned off as house defaults,\n// dogfooded from real projects — they flag style preferences, not correctness.\n// Re-enable any per-project via `lint.rules`. (React-plugin relaxations live in\n// REACT_RULES so they only emit when the react plugin is loaded;\n// typescript/consistent-type-definitions stays on, pinned to `type`.) Keys\n// sorted for sort-keys; spread into the base rules so they don't interleave.\nconst RELAXED_DEFAULTS: JsonObject = {\n 'id-length': 'off',\n 'import/group-exports': 'off',\n 'init-declarations': 'off',\n 'max-params': 'off',\n 'max-statements': 'off',\n 'no-continue': 'off',\n 'prefer-destructuring': 'off',\n 'prefer-named-capture-group': 'off',\n 'unicorn/catch-error-name': 'off',\n 'unicorn/no-await-expression-member': 'off',\n 'unicorn/numeric-separators-style': 'off',\n};\n\n// A target is \"whole project\" only when explicitly `true`.\nconst isWholeProject = (target: LintTarget | undefined): boolean => target === true;\n\n// Non-empty glob list → the target is scoped to those files; otherwise undefined.\nconst targetGlobs = (target: LintTarget | undefined): readonly string[] | undefined =>\n Array.isArray(target) && target.length > 0 ? target : undefined;\n\n// Build the scoped `overrides` fragment for a glob-targeted plugin set + rules.\nconst scopedOverride = (\n globs: readonly string[],\n plugins: readonly string[],\n rules: JsonObject,\n): JsonObject => ({ files: [...globs], plugins: [...plugins], rules: { ...rules } });\n\ntype VitePlusPackageOptions = {\n readonly pack?: JsonObject;\n readonly lint?: VitePlusLintOptions;\n readonly fmt?: JsonObject;\n readonly staged?: JsonObject | false;\n};\n\nconst vitePlusLint = (options: VitePlusLintOptions = {}): JsonObject => {\n const nodeWhole = isWholeProject(options.node);\n const reactWhole = isWholeProject(options.react);\n const nodeGlobs = targetGlobs(options.node);\n const reactGlobs = targetGlobs(options.react);\n\n // Glob-scoped targets become `overrides` fragments; they precede the standing\n // test-file override and any caller-supplied overrides.\n const targetOverrides: JsonObject[] = [\n ...(nodeGlobs ? [scopedOverride(nodeGlobs, NODE_PLUGINS, NODE_RULES)] : []),\n ...(reactGlobs ? [scopedOverride(reactGlobs, REACT_PLUGINS, REACT_RULES)] : []),\n ];\n\n return {\n categories: {\n correctness: 'error',\n nursery: 'off',\n pedantic: 'off',\n perf: 'error',\n restriction: 'off',\n style: 'warn',\n suspicious: 'error',\n },\n ignorePatterns: [\n 'node_modules',\n 'dist',\n 'build',\n 'coverage',\n '.turbo',\n '.vite',\n ...(options.ignores ?? []),\n ],\n // Strict by default: warnings fail, and type-aware lint + type checking run.\n // This is the house gate; opt out of any of them per-flag with `false`.\n options: compactObject({\n denyWarnings: options.denyWarnings ?? true,\n maxWarnings: options.maxWarnings,\n typeAware: options.typeAware ?? true,\n typeCheck: options.typeCheck ?? true,\n }),\n overrides: [\n ...targetOverrides,\n {\n files: [\n 'tests/**/*.ts',\n 'tests/**/*.tsx',\n '**/*.test.ts',\n '**/*.test.tsx',\n '**/*.spec.ts',\n '**/*.spec.tsx',\n ],\n rules: {\n 'max-statements': 'off',\n 'vitest/no-importing-vitest-globals': 'off',\n 'vitest/prefer-expect-assertions': 'off',\n 'vitest/prefer-importing-vitest-globals': 'off',\n },\n },\n ...(options.overrides ?? []),\n ],\n plugins: [\n 'typescript',\n 'import',\n 'eslint',\n 'unicorn',\n 'oxc',\n 'promise',\n 'vitest',\n // Whole-project targets enable plugins here; glob-scoped targets enable them\n // in their `overrides` fragment instead (see targetOverrides).\n ...(nodeWhole ? NODE_PLUGINS : []),\n ...(reactWhole ? REACT_PLUGINS : []),\n ],\n rules: {\n 'capitalized-comments': 'off',\n 'import/no-named-export': 'off',\n // Browser baseline forbids Node builtins; a whole-project node target lifts\n // this via NODE_RULES below, a glob-scoped one only inside its override.\n 'import/no-nodejs-modules': 'error',\n // Named exports are the house style (see import/no-named-export above), so\n // don't nudge single-export modules toward a default export.\n 'import/prefer-default-export': 'off',\n 'no-duplicate-imports': ['warn', { allowSeparateTypeImports: true }],\n 'no-magic-numbers': 'off',\n 'no-ternary': 'off',\n 'sort-imports': 'off',\n 'typescript/consistent-type-definitions': ['warn', 'type'],\n 'unicorn/no-null': 'off',\n // Ternaries are allowed (no-ternary off) but not forced; prefer-ternary would\n // rewrite else-if chains into nested ternaries, conflicting with unicorn/no-nested-ternary.\n 'unicorn/prefer-ternary': 'off',\n 'vitest/prefer-importing-vitest-globals': 'off',\n // Conflicts with vitest/prefer-strict-boolean-matchers; prefer strict toBe(true|false).\n // Disabled at base (not just in test files) so the conflict can't fire anywhere.\n 'vitest/prefer-to-be-falsy': 'off',\n 'vitest/prefer-to-be-truthy': 'off',\n // Spread (not inline) so these stay grouped with their rationale and don't\n // have to interleave alphabetically with the keys above (sort-keys).\n ...RELAXED_DEFAULTS,\n // Whole-project targets only; glob-scoped rules live in their overrides.\n // Spread last so a whole-project node target overrides the baseline above.\n ...(nodeWhole ? NODE_RULES : {}),\n ...(reactWhole ? REACT_RULES : {}),\n ...options.rules,\n },\n };\n};\n\nconst vitePlusBase = (options: VitePlusPackageOptions = {}): JsonObject =>\n compactObject({\n fmt: {\n ignorePatterns: [\n 'pnpm-lock.yaml',\n 'bun.lock',\n // Generated by release-please/changesets — let the release tool own its\n // format instead of fighting it on every release PR.\n 'CHANGELOG.md',\n 'dist/**',\n 'build/**',\n 'node_modules/**',\n 'coverage/**',\n '.turbo/**',\n '.vite/**',\n ],\n singleQuote: true,\n sortImports: { ignoreCase: true },\n ...options.fmt,\n },\n lint: vitePlusLint(options.lint),\n staged: options.staged === false ? undefined : (options.staged ?? { '*': 'vp check --fix' }),\n });\n\nconst vitePlusPackage = (options: VitePlusPackageOptions = {}): JsonObject => ({\n ...vitePlusBase(options),\n pack: {\n dts: { tsgo: true },\n exports: true,\n ...options.pack,\n },\n});\n\nexport { vitePlusBase, vitePlusPackage };\nexport type { VitePlusLintOptions, VitePlusPackageOptions };\n"],"mappings":";;AAwBA,MAAM,gBAAgB;CAAC;CAAS;CAAc;AAAU;AAMxD,MAAM,cAA0B;CAC9B,uBAAuB;CACvB,gCAAgC;CAChC,4BAA4B;CAC5B,yBAAyB,CAAC,QAAQ,EAAE,OAAO;EAAE,WAAW;EAAM,YAAY;CAAK,EAAE,CAAC;AACpF;AAGA,MAAM,eAAe,CAAC,MAAM;AAK5B,MAAM,aAAyB,EAC7B,4BAA4B,MAC9B;AAQA,MAAM,mBAA+B;CACnC,aAAa;CACb,wBAAwB;CACxB,qBAAqB;CACrB,cAAc;CACd,kBAAkB;CAClB,eAAe;CACf,wBAAwB;CACxB,8BAA8B;CAC9B,4BAA4B;CAC5B,sCAAsC;CACtC,oCAAoC;AACtC;AAGA,MAAM,kBAAkB,WAA4C,WAAW;AAG/E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B,gCAAgC;GAChC,wBAAwB,CAAC,QAAQ,EAAE,0BAA0B,KAAK,CAAC;GACnE,oBAAoB;GACpB,cAAc;GACd,gBAAgB;GAChB,0CAA0C,CAAC,QAAQ,MAAM;GACzD,mBAAmB;GAGnB,0BAA0B;GAC1B,0CAA0C;GAG1C,6BAA6B;GAC7B,8BAA8B;GAG9B,GAAG;GAGH,GAAI,YAAY,aAAa,CAAC;GAC9B,GAAI,aAAa,cAAc,CAAC;GAChC,GAAG,QAAQ;EACb;CACF;AACF;AAEA,MAAM,gBAAgB,UAAkC,CAAC,MACvD,cAAc;CACZ,KAAK;EACH,gBAAgB;GACd;GACA;GAGA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EACA,aAAa;EACb,aAAa,EAAE,YAAY,KAAK;EAChC,GAAG,QAAQ;CACb;CACA,MAAM,aAAa,QAAQ,IAAI;CAC/B,QAAQ,QAAQ,WAAW,QAAQ,KAAA,IAAa,QAAQ,UAAU,EAAE,KAAK,iBAAiB;AAC5F,CAAC;AAEH,MAAM,mBAAmB,UAAkC,CAAC,OAAmB;CAC7E,GAAG,aAAa,OAAO;CACvB,MAAM;EACJ,KAAK,EAAE,MAAM,KAAK;EAClB,SAAS;EACT,GAAG,QAAQ;CACb;AACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dbtlr/tooling",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "description": "Shared TypeScript, Vitest, and Vite+ config for dbtlr projects — one toolingConfig() entry point.",
5
5
  "homepage": "https://github.com/dbtlr/ts-tooling#readme",
6
6
  "bugs": "https://github.com/dbtlr/ts-tooling/issues",
@@ -4,7 +4,6 @@
4
4
  "compilerOptions": {
5
5
  "module": "ESNext",
6
6
  "moduleResolution": "Bundler",
7
- "types": ["node"],
8
7
  "noEmit": true,
9
8
  "allowImportingTsExtensions": true,
10
9
  "resolveJsonModule": true,