@shayanthenerd/eslint-config 0.29.2 → 0.29.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
@@ -645,6 +645,7 @@ _.vscode/settings.json_:
645
645
  message: string,
646
646
  value: true | string,
647
647
  })[],
648
+ templateMaxLineLength?: number,
648
649
  vForDelimiterStyle?: 'in' | 'of',
649
650
  overrides?: Overrides,
650
651
  },
@@ -222,6 +222,7 @@ const defaultOptions = {
222
222
  preferVBindTrueShorthand: "always",
223
223
  restrictedElements: [],
224
224
  restrictedStaticAttributes: [],
225
+ templateMaxLineLength: 130,
225
226
  vForDelimiterStyle: "in",
226
227
  overrides: {}
227
228
  },
@@ -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, allowedStyleAttributes, preferVBindTrueShorthand, componentNameCaseInTemplate, preferVBindSameNameShorthand, restrictedElements: userRestrictedElements, ignoredUndefinedComponents: userIgnoredUndefinedComponents, restrictedStaticAttributes: userRestrictedStaticAttributes } = isEnabled(vue) ? vue : defaultOptions.configs.vue;
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;
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;
@@ -207,7 +207,8 @@ function getVueRules(options) {
207
207
  "vue/max-len": ["warn", {
208
208
  tabWidth: indent,
209
209
  code: maxLineLength,
210
- template: Infinity,
210
+ template: templateMaxLineLength,
211
+ comments: templateMaxLineLength,
211
212
  ignoreUrls: true,
212
213
  ignoreStrings: true,
213
214
  ignoreComments: true,
@@ -59,7 +59,9 @@ interface StylisticOptions extends ConfigWithOverrides<ConfigRules> {
59
59
  */
60
60
  maxConsecutiveEmptyLines?: RuleOptions<'@stylistic/no-multiple-empty-lines'>['max'];
61
61
  /**
62
- * Maximum line length for the code. Strings, texts, and comments are ignored.
62
+ * Maximum line length for the code.
63
+ *
64
+ * Strings, texts, and comments are ignored.
63
65
  *
64
66
  * This is used by
65
67
  * - [vue/max-len](https://eslint.vuejs.org/rules/max-len)
@@ -206,6 +206,14 @@ interface VueOptions extends ConfigWithOverrides<ConfigRules> {
206
206
  * @see [vue/no-restricted-static-attribute](https://eslint.vuejs.org/rules/no-restricted-static-attribute)
207
207
  */
208
208
  restrictedStaticAttributes?: RuleOptions<'vue/no-restricted-static-attribute'>[];
209
+ /**
210
+ * Maximum line length for `<template>` blocks (including comments).
211
+ *
212
+ * @default 130
213
+ *
214
+ * @see [vue/max-len: `template` option](https://eslint.vuejs.org/rules/max-len.html#options)
215
+ */
216
+ templateMaxLineLength?: Exclude<RuleOptions<'vue/max-len'>, number>['template'];
209
217
  /**
210
218
  * The delimiter used in `v-for` directives.
211
219
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shayanthenerd/eslint-config",
3
- "version": "0.29.2",
3
+ "version": "0.29.3",
4
4
  "description": "A modern, flexible ESLint configuration for enforcing best practices and maintaining a consistent coding style",
5
5
  "keywords": [
6
6
  "eslint",