@shayanthenerd/eslint-config 0.30.1 → 0.30.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/README.md CHANGED
@@ -705,6 +705,7 @@ For file types that ESLint Stylistic does not handle—such as CSS, JSON, YAML,
705
705
  })[],
706
706
  templateMaxLineLength?: number,
707
707
  vForDelimiterStyle?: 'in' | 'of',
708
+ vOnHandlerStyle?: 'inline' | 'inline-function' | ['method', 'inline' | 'inline-function'],
708
709
  overrides?: Overrides,
709
710
  },
710
711
  zod?: boolean | {
@@ -224,6 +224,7 @@ const defaultOptions = {
224
224
  restrictedStaticAttributes: [],
225
225
  templateMaxLineLength: 130,
226
226
  vForDelimiterStyle: "in",
227
+ vOnHandlerStyle: "inline",
227
228
  overrides: {}
228
229
  },
229
230
  zod: {
@@ -7,7 +7,7 @@ import { getRestrictedVueElements } from "../helpers/vue/getRestrictedVueElement
7
7
  function getVueRules(options) {
8
8
  const { typescript, stylistic, vue, nuxt } = options.configs;
9
9
  const { indent, trailingComma, maxLineLength, maxAttributesPerLine, maxConsecutiveEmptyLines, selfCloseVoidHtmlElements } = isEnabled(stylistic) ? stylistic : defaultOptions.configs.stylistic;
10
- const { blockLang, blocksOrder, macrosOrder, attributesOrder, destructureProps, vForDelimiterStyle, attributeHyphenation, templateMaxLineLength, allowedStyleAttributes, preferVBindTrueShorthand, componentNameCaseInTemplate, preferVBindSameNameShorthand, restrictedElements: userRestrictedElements, ignoredUndefinedComponents: userIgnoredUndefinedComponents, restrictedStaticAttributes: userRestrictedStaticAttributes } = isEnabled(vue) ? vue : defaultOptions.configs.vue;
10
+ const { blockLang, blocksOrder, macrosOrder, attributesOrder, vOnHandlerStyle, destructureProps, vForDelimiterStyle, attributeHyphenation, templateMaxLineLength, allowedStyleAttributes, preferVBindTrueShorthand, componentNameCaseInTemplate, preferVBindSameNameShorthand, restrictedElements: userRestrictedElements, ignoredUndefinedComponents: userIgnoredUndefinedComponents, restrictedStaticAttributes: userRestrictedStaticAttributes } = isEnabled(vue) ? vue : defaultOptions.configs.vue;
11
11
  const { imageComponents: userImageComponents, anchorComponents: userAnchorComponents, accessibleChildComponents: userAccessibleChildComponents } = isEnabled(vue) && isEnabled(vue.accessibility) ? vue.accessibility : defaultOptions.configs.vue.accessibility;
12
12
  const isNuxtEnabled = isEnabled(nuxt);
13
13
  const isNuxtImageEnabled = isNuxtEnabled ? nuxt.image : void 0;
@@ -399,7 +399,8 @@ function getVueRules(options) {
399
399
  "vue/require-typed-object-prop": isScriptLangTS ? "error" : "off",
400
400
  "vue/require-typed-ref": isScriptLangTS ? "error" : "off",
401
401
  "vue/slot-name-casing": "warn",
402
- "vue/v-for-delimiter-style": ["warn", vForDelimiterStyle]
402
+ "vue/v-for-delimiter-style": ["warn", vForDelimiterStyle],
403
+ "vue/v-on-handler-style": ["warn", vOnHandlerStyle]
403
404
  };
404
405
  if (isEnabled(stylistic)) vueRules["@stylistic/max-len"] = "off";
405
406
  const isVueAccessibilityEnabled = isEnabled(vue) && isEnabled(vue.accessibility);
@@ -15,6 +15,8 @@ function getZodRules(options) {
15
15
  "zod-mini/no-conflicting-checks": "warn",
16
16
  "zod-mini/no-duplicate-schema-methods": "error",
17
17
  "zod-mini/no-empty-custom-schema": "error",
18
+ "zod-mini/no-native-enum": "error",
19
+ "zod-mini/no-promise-schema": "error",
18
20
  "zod-mini/no-throw-in-refine": "error",
19
21
  "zod-mini/no-transform-in-record-key": "error",
20
22
  "zod-mini/no-unnecessary-readonly": "warn",
@@ -35,7 +37,7 @@ function getZodRules(options) {
35
37
  "zod/no-conflicting-checks": "error",
36
38
  "zod/no-duplicate-schema-methods": "error",
37
39
  "zod/no-empty-custom-schema": "error",
38
- "zod/no-native-enum": "warn",
40
+ "zod/no-native-enum": "error",
39
41
  "zod/no-number-schema-with-finite": "warn",
40
42
  "zod/no-number-schema-with-int": "warn",
41
43
  "zod/no-number-schema-with-is-finite": "warn",
@@ -55,6 +57,7 @@ function getZodRules(options) {
55
57
  "zod/prefer-nullish": "warn",
56
58
  "zod/prefer-meta-last": "warn",
57
59
  "zod/prefer-strict-object": "warn",
60
+ "zod/prefer-string-length-over-min-max": "warn",
58
61
  "zod/prefer-top-level-string-formats": "warn",
59
62
  "zod/prefer-trim-before-string-length-checks": "error",
60
63
  "zod/prefer-tuple-over-array-length": "warn",
@@ -9825,6 +9825,16 @@ interface ESLintSchema {
9825
9825
  * @see https://github.com/marcalexiei/eslint-zod/blob/HEAD/plugins/eslint-plugin-zod-mini/docs/rules/no-empty-custom-schema.md
9826
9826
  */
9827
9827
  'zod-mini/no-empty-custom-schema'?: Linter.RuleEntry<[]>;
9828
+ /**
9829
+ * Disallow deprecated `z.nativeEnum()` in favor of `z.enum()`.
9830
+ * @see https://github.com/marcalexiei/eslint-zod/blob/HEAD/plugins/eslint-plugin-zod-mini/docs/rules/no-native-enum.md
9831
+ */
9832
+ 'zod-mini/no-native-enum'?: Linter.RuleEntry<[]>;
9833
+ /**
9834
+ * Disallow deprecated `z.promise()` schemas.
9835
+ * @see https://github.com/marcalexiei/eslint-zod/blob/HEAD/plugins/eslint-plugin-zod-mini/docs/rules/no-promise-schema.md
9836
+ */
9837
+ 'zod-mini/no-promise-schema'?: Linter.RuleEntry<[]>;
9828
9838
  /**
9829
9839
  * Disallow throwing errors directly inside Zod Mini refine callbacks
9830
9840
  * @see https://github.com/marcalexiei/eslint-zod/blob/HEAD/plugins/eslint-plugin-zod-mini/docs/rules/no-throw-in-refine.md
@@ -9860,6 +9870,11 @@ interface ESLintSchema {
9860
9870
  * @see https://github.com/marcalexiei/eslint-zod/blob/HEAD/plugins/eslint-plugin-zod-mini/docs/rules/prefer-nullish.md
9861
9871
  */
9862
9872
  'zod-mini/prefer-nullish'?: Linter.RuleEntry<[]>;
9873
+ /**
9874
+ * Prefer `z.length(n)` over `z.minLength(n)` and `z.maxLength(n)` with the same value on a string schema
9875
+ * @see https://github.com/marcalexiei/eslint-zod/blob/HEAD/plugins/eslint-plugin-zod-mini/docs/rules/prefer-string-length-over-min-max.md
9876
+ */
9877
+ 'zod-mini/prefer-string-length-over-min-max'?: Linter.RuleEntry<[]>;
9863
9878
  /**
9864
9879
  * Prefer `z.tuple()` over a length-constrained `z.array()` so the length is preserved in the inferred type.
9865
9880
  * @see https://github.com/marcalexiei/eslint-zod/blob/HEAD/plugins/eslint-plugin-zod-mini/docs/rules/prefer-tuple-over-array-length.md
@@ -10046,6 +10061,11 @@ interface ESLintSchema {
10046
10061
  * @see https://github.com/marcalexiei/eslint-zod/blob/HEAD/plugins/eslint-plugin-zod/docs/rules/prefer-strict-object.md
10047
10062
  */
10048
10063
  'zod/prefer-strict-object'?: Linter.RuleEntry<[]>;
10064
+ /**
10065
+ * Prefer `.length(n)` over `.min(n).max(n)` with the same value on a string schema
10066
+ * @see https://github.com/marcalexiei/eslint-zod/blob/HEAD/plugins/eslint-plugin-zod/docs/rules/prefer-string-length-over-min-max.md
10067
+ */
10068
+ 'zod/prefer-string-length-over-min-max'?: Linter.RuleEntry<[]>;
10049
10069
  /**
10050
10070
  * Enforce `z.string().trim()` to prevent accidental leading/trailing whitespace
10051
10071
  * @see https://github.com/marcalexiei/eslint-zod/blob/HEAD/plugins/eslint-plugin-zod/docs/rules/prefer-string-schema-with-trim.md
@@ -222,15 +222,16 @@ interface VueOptions extends ConfigWithOverrides<ConfigRules> {
222
222
  * @see [vue/v-for-delimiter-style](https://eslint.vuejs.org/rules/v-for-delimiter-style)
223
223
  */
224
224
  vForDelimiterStyle?: RuleOptions<'vue/v-for-delimiter-style'>;
225
- /* https://github.com/vuejs/eslint-plugin-vue/issues/2571 */
226
- // /**
227
- // * Enforce a consistent handler style in `v-on` directives.
228
- // *
229
- // * @default ['method', 'inline-function']
230
- // *
231
- // * @see [vue/v-on-handler-style](https://eslint.vuejs.org/rules/v-on-handler-style)
232
- // */
233
- // vOnHandlerStyle?: RuleOptions<'vue/v-on-handler-style'>,
225
+ /**
226
+ * Enforce a consistent handler style in `v-on` directives.
227
+ *
228
+ * **Important:** The `'inline'` option works reliably, but this rule has [known issues](https://github.com/vuejs/eslint-plugin-vue/issues/2571) and other options may not work as expected.
229
+ *
230
+ * @default 'inline'
231
+ *
232
+ * @see [vue/v-on-handler-style](https://eslint.vuejs.org/rules/v-on-handler-style)
233
+ */
234
+ vOnHandlerStyle?: RuleOptions<'vue/v-on-handler-style'>;
234
235
  }
235
236
  //#endregion
236
237
  export type { VueOptions };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shayanthenerd/eslint-config",
3
- "version": "0.30.1",
3
+ "version": "0.30.2",
4
4
  "description": "A modern, flexible ESLint configuration for enforcing best practices and maintaining a consistent coding style",
5
5
  "keywords": [
6
6
  "eslint",
@@ -84,20 +84,20 @@
84
84
  "eslint-plugin-unicorn": "73.0.0",
85
85
  "eslint-plugin-vue": "10.10.0",
86
86
  "eslint-plugin-vuejs-accessibility": "2.6.0",
87
- "eslint-plugin-zod": "4.9.1",
88
- "eslint-plugin-zod-mini": "1.6.1",
87
+ "eslint-plugin-zod": "4.10.0",
88
+ "eslint-plugin-zod-mini": "1.7.0",
89
89
  "globals": "17.11.0",
90
90
  "local-pkg": "1.2.1",
91
91
  "nuxt-link-checker": "5.3.0",
92
92
  "tailwind-csstree": "0.3.3",
93
- "typescript-eslint": "8.67.0"
93
+ "typescript-eslint": "8.68.0"
94
94
  },
95
95
  "devDependencies": {
96
96
  "@arethetypeswrong/cli": "0.18.5",
97
97
  "@eslint/config-inspector": "3.3.0",
98
98
  "@types/eslint-plugin-jsx-a11y": "6.10.1",
99
- "@types/node": "26.2.0",
100
- "eslint": "10.9.0",
99
+ "@types/node": "26.3.0",
100
+ "eslint": "10.9.1",
101
101
  "eslint-typegen": "2.3.1",
102
102
  "nano-staged": "1.0.2",
103
103
  "prettier": "3.9.6",
@@ -118,7 +118,7 @@
118
118
  "devEngines": {
119
119
  "packageManager": {
120
120
  "name": "pnpm",
121
- "version": "11.22.0",
121
+ "version": "11.23.0",
122
122
  "onFail": "warn"
123
123
  },
124
124
  "runtime": {