@shayanthenerd/eslint-config 0.30.1 → 0.30.3

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,10 +15,13 @@ 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",
21
23
  "zod-mini/prefer-enum-over-literal-union": "warn",
24
+ "zod-mini/prefer-map-set-size-over-min-max": "warn",
22
25
  "zod-mini/prefer-meta": "warn",
23
26
  "zod-mini/prefer-nullish": "warn",
24
27
  "zod-mini/prefer-tuple-over-array-length": "warn",
@@ -35,7 +38,7 @@ function getZodRules(options) {
35
38
  "zod/no-conflicting-checks": "error",
36
39
  "zod/no-duplicate-schema-methods": "error",
37
40
  "zod/no-empty-custom-schema": "error",
38
- "zod/no-native-enum": "warn",
41
+ "zod/no-native-enum": "error",
39
42
  "zod/no-number-schema-with-finite": "warn",
40
43
  "zod/no-number-schema-with-int": "warn",
41
44
  "zod/no-number-schema-with-is-finite": "warn",
@@ -51,10 +54,12 @@ function getZodRules(options) {
51
54
  "zod/no-unnecessary-readonly": "warn",
52
55
  "zod/prefer-enum-over-literal-union": "warn",
53
56
  "zod/prefer-loose-object": "warn",
57
+ "zod/prefer-map-set-size-over-min-max": "warn",
54
58
  "zod/prefer-meta": "warn",
55
59
  "zod/prefer-nullish": "warn",
56
60
  "zod/prefer-meta-last": "warn",
57
61
  "zod/prefer-strict-object": "warn",
62
+ "zod/prefer-string-length-over-min-max": "warn",
58
63
  "zod/prefer-top-level-string-formats": "warn",
59
64
  "zod/prefer-trim-before-string-length-checks": "error",
60
65
  "zod/prefer-tuple-over-array-length": "warn",