@eienjs/eslint-config 1.8.0 → 1.8.2

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/run.mjs CHANGED
@@ -26,14 +26,11 @@ async function run(options = {}) {
26
26
  };
27
27
  if (!argSkipPrompt) {
28
28
  result = await p.group({
29
- extra: async ({ results }) => {
30
- const isArgExtraValid = argExtra?.length && argExtra.filter((element) => !extra.includes(element)).length === 0;
31
- if (!results.uncommittedConfirmed || isArgExtraValid) return;
32
- const message = argExtra ? `"${argExtra.toString()}" isn't a valid extra util. Please choose from below: ` : "Select a extra utils:";
33
- return p.multiselect({
34
- message: c.reset(message),
35
- options: extraOptions,
36
- required: false
29
+ uncommittedConfirmed: async () => {
30
+ if (isGitClean()) return true;
31
+ return p.confirm({
32
+ initialValue: false,
33
+ message: "There are uncommitted changes in the current repository, are you sure to continue?"
37
34
  });
38
35
  },
39
36
  frameworks: async ({ results }) => {
@@ -46,11 +43,14 @@ async function run(options = {}) {
46
43
  required: false
47
44
  });
48
45
  },
49
- uncommittedConfirmed: async () => {
50
- if (isGitClean()) return true;
51
- return p.confirm({
52
- initialValue: false,
53
- message: "There are uncommitted changes in the current repository, are you sure to continue?"
46
+ extra: async ({ results }) => {
47
+ const isArgExtraValid = argExtra?.length && argExtra.filter((element) => !extra.includes(element)).length === 0;
48
+ if (!results.uncommittedConfirmed || isArgExtraValid) return;
49
+ const message = argExtra ? `"${argExtra.toString()}" isn't a valid extra util. Please choose from below: ` : "Select a extra utils:";
50
+ return p.multiselect({
51
+ message: c.reset(message),
52
+ options: extraOptions,
53
+ required: false
54
54
  });
55
55
  },
56
56
  updateVscodeSettings: async ({ results }) => {
@@ -12,7 +12,11 @@ async function typescript(options = {}) {
12
12
  GLOB_VUE,
13
13
  ...componentExts.map((ext) => `**/*.${ext}`)
14
14
  ];
15
- const filesTypeAware = options.filesTypeAware ?? [GLOB_TS, GLOB_TSX];
15
+ const filesTypeAware = options.filesTypeAware ?? [
16
+ GLOB_TS,
17
+ GLOB_TSX,
18
+ GLOB_VUE
19
+ ];
16
20
  const ignoresTypeAware = options.ignoresTypeAware ?? [`${GLOB_MARKDOWN}/**`, GLOB_ASTRO_TS];
17
21
  const tsconfigPath = options.tsconfigPath ?? void 0;
18
22
  const isTypeAware = Boolean(tsconfigPath);
@@ -90,7 +90,7 @@ async function vue(options = {}) {
90
90
  "defineEmits",
91
91
  "defineSlots"
92
92
  ] }],
93
- "vue/define-props-declaration": ["error", "runtime"],
93
+ "vue/define-props-declaration": "error",
94
94
  "vue/dot-location": ["error", "property"],
95
95
  "vue/dot-notation": ["error", { allowKeywords: true }],
96
96
  "vue/eqeqeq": ["error", "smart"],
package/dist/package.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  //#region package.json
2
- var version = "1.8.0";
2
+ var version = "1.8.2";
3
3
 
4
4
  //#endregion
5
5
  export { version };
@@ -4862,7 +4862,7 @@ interface RuleOptions {
4862
4862
  * prefer dynamic import in mock
4863
4863
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-import-in-mock.md
4864
4864
  */
4865
- 'test/prefer-import-in-mock'?: Linter.RuleEntry<[]>;
4865
+ 'test/prefer-import-in-mock'?: Linter.RuleEntry<TestPreferImportInMock>;
4866
4866
  /**
4867
4867
  * enforce importing Vitest globals
4868
4868
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-importing-vitest-globals.md
@@ -4878,6 +4878,11 @@ interface RuleOptions {
4878
4878
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-mock-promise-shorthand.md
4879
4879
  */
4880
4880
  'test/prefer-mock-promise-shorthand'?: Linter.RuleEntry<[]>;
4881
+ /**
4882
+ * Prefer mock return shorthands
4883
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-mock-return-shorthand.md
4884
+ */
4885
+ 'test/prefer-mock-return-shorthand'?: Linter.RuleEntry<[]>;
4881
4886
  /**
4882
4887
  * enforce including a hint with external snapshots
4883
4888
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-snapshot-hint.md
@@ -14101,6 +14106,10 @@ type TestPreferExpectAssertions = [] | [{
14101
14106
  onlyFunctionsWithExpectInLoop?: boolean;
14102
14107
  onlyFunctionsWithExpectInCallback?: boolean;
14103
14108
  }];
14109
+ // ----- test/prefer-import-in-mock -----
14110
+ type TestPreferImportInMock = [] | [{
14111
+ fixable?: boolean;
14112
+ }];
14104
14113
  // ----- test/prefer-lowercase-title -----
14105
14114
  type TestPreferLowercaseTitle = [] | [{
14106
14115
  ignore?: ("describe" | "test" | "it")[];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@eienjs/eslint-config",
3
3
  "type": "module",
4
- "version": "1.8.0",
4
+ "version": "1.8.2",
5
5
  "description": "EienJS ESLint Config",
6
6
  "author": "Fernando Isidro <luffynando@gmail.com> (https://github.com/luffynando/)",
7
7
  "license": "MIT",
@@ -78,9 +78,9 @@
78
78
  "@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
79
79
  "@eslint/markdown": "^7.5.1",
80
80
  "@stylistic/eslint-plugin": "^5.6.1",
81
- "@typescript-eslint/eslint-plugin": "^8.50.0",
82
- "@typescript-eslint/parser": "^8.50.0",
83
- "@vitest/eslint-plugin": "^1.6.1",
81
+ "@typescript-eslint/eslint-plugin": "^8.50.1",
82
+ "@typescript-eslint/parser": "^8.50.1",
83
+ "@vitest/eslint-plugin": "^1.6.4",
84
84
  "ansis": "^4.2.0",
85
85
  "cac": "^6.7.14",
86
86
  "eslint-config-flat-gitignore": "^2.1.0",
@@ -131,7 +131,7 @@
131
131
  "np": "^10.2.0",
132
132
  "pnpm-workspace-yaml": "^1.4.3",
133
133
  "prettier-plugin-astro": "^0.14.1",
134
- "tsdown": "^0.18.2",
134
+ "tsdown": "^0.18.3",
135
135
  "tsx": "^4.21.0",
136
136
  "typescript": "^5.9.3"
137
137
  },