@michaelhelvey/vite-config 2.0.4 → 2.0.5

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/index.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { UserConfig } from "vite-plus";
2
2
  import { DummyRuleMap } from "vite-plus/lint";
3
3
  //#region src/rules.d.ts
4
- export declare const RULES: readonly [{
4
+ declare const RULES: readonly [{
5
5
  readonly name: "accessor-pairs";
6
6
  readonly source: "eslint";
7
7
  readonly category: "pedantic";
@@ -5929,7 +5929,7 @@ export declare const RULES: readonly [{
5929
5929
  * };
5930
5930
  * ```
5931
5931
  */
5932
- export type Rule = (typeof RULES)[number];
5932
+ type Rule = (typeof RULES)[number];
5933
5933
  /**
5934
5934
  * The plugin or tool that provides a given rule (e.g. `"eslint"`, `"oxc"`, `"typescript"`).
5935
5935
  *
@@ -5941,7 +5941,7 @@ export type Rule = (typeof RULES)[number];
5941
5941
  * const rules = ruleSelector(sources, ["correctness"]);
5942
5942
  * ```
5943
5943
  */
5944
- export type RuleSource = Rule["source"];
5944
+ type RuleSource = Rule["source"];
5945
5945
  /**
5946
5946
  * The category a rule falls under (e.g. `"correctness"`, `"perf"`, `"suspicious"`).
5947
5947
  *
@@ -5953,7 +5953,7 @@ export type RuleSource = Rule["source"];
5953
5953
  * const rules = ruleSelector(["eslint"], categories);
5954
5954
  * ```
5955
5955
  */
5956
- export type RuleCategory = Rule["category"];
5956
+ type RuleCategory = Rule["category"];
5957
5957
  /**
5958
5958
  * The name of a rule recognized by vite-plus's lint system.
5959
5959
  *
@@ -5964,7 +5964,7 @@ export type RuleCategory = Rule["category"];
5964
5964
  * const rule: RuleName = "no-console";
5965
5965
  * ```
5966
5966
  */
5967
- export type RuleName = keyof DummyRuleMap;
5967
+ type RuleName = keyof DummyRuleMap;
5968
5968
  type AllowWarnDeny = ("allow" | "off" | "warn" | "error" | "deny") | number;
5969
5969
  /**
5970
5970
  * Selects the union of a given set of sources and categories. For example, if `sources` is "eslint"
@@ -5988,7 +5988,7 @@ type AllowWarnDeny = ("allow" | "off" | "warn" | "error" | "deny") | number;
5988
5988
  * const testRules = ruleSelector(["typescript"], ["suspicious"], "off");
5989
5989
  * ```
5990
5990
  */
5991
- export declare const ruleSelector: (sources: RuleSource[], categories: RuleCategory[], setting?: AllowWarnDeny) => DummyRuleMap;
5991
+ declare const ruleSelector: (sources: RuleSource[], categories: RuleCategory[], setting?: AllowWarnDeny) => DummyRuleMap;
5992
5992
  /**
5993
5993
  * Glob patterns for common file categories, intended to be used as `files` values
5994
5994
  * inside `lint.overrides`.
@@ -6008,7 +6008,7 @@ export declare const ruleSelector: (sources: RuleSource[], categories: RuleCateg
6008
6008
  * });
6009
6009
  * ```
6010
6010
  */
6011
- export declare const FileTypes: {
6011
+ declare const FileTypes: {
6012
6012
  JS_SOURCE: string[];
6013
6013
  REACT_SOURCE: string[];
6014
6014
  TEST_SOURCE: string[];
@@ -6032,6 +6032,7 @@ export declare const FileTypes: {
6032
6032
  * });
6033
6033
  * ```
6034
6034
  */
6035
- export declare const defineConfig: (overrides?: UserConfig) => Promise<UserConfig>;
6035
+ declare const defineConfig: (overrides?: UserConfig) => Promise<UserConfig>;
6036
6036
  //#endregion
6037
+ export { FileTypes, RULES, Rule, RuleCategory, RuleName, RuleSource, defineConfig, ruleSelector };
6037
6038
  //# sourceMappingURL=index.d.mts.map
package/dist/index.mjs CHANGED
@@ -6873,7 +6873,7 @@ const FileTypes = {
6873
6873
  * ```
6874
6874
  */
6875
6875
  const defineConfig = async (overrides) => {
6876
- const base = {
6876
+ return merge({
6877
6877
  test: {
6878
6878
  passWithNoTests: true,
6879
6879
  unstubGlobals: true,
@@ -6950,7 +6950,7 @@ const defineConfig = async (overrides) => {
6950
6950
  sortImports: {
6951
6951
  customGroups: [
6952
6952
  {
6953
- groupName: "builtins",
6953
+ groupName: "builtin",
6954
6954
  selector: "builtin"
6955
6955
  },
6956
6956
  {
@@ -6974,8 +6974,7 @@ const defineConfig = async (overrides) => {
6974
6974
  useTabs: false
6975
6975
  },
6976
6976
  staged: { "*": "vp check --fix" }
6977
- };
6978
- return merge(base, overrides ?? {});
6977
+ }, overrides ?? {});
6979
6978
  };
6980
6979
  //#endregion
6981
6980
  export { FileTypes, RULES, defineConfig, ruleSelector };