@open-xchange/linter-presets 1.27.1 → 1.28.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## `1.28.0` – 2026-Aug-04
4
+
5
+ - changed: (StyleLint) drop unmaintained `stylelint-plugin-license-header`, replace with local rule `license-header/header`
6
+
3
7
  ## `1.27.1` – 2026-Aug-03
4
8
 
5
9
  - fixed: (StyleLint) exclude Vue files from license header plugin
@@ -1,6 +1,76 @@
1
1
  import { t as PathResolver } from "../resolver-Nkg5OKUN.mjs";
2
- import licensePlugin from "stylelint-plugin-license-header";
3
2
  import stylisticPlugin from "@stylistic/stylelint-plugin";
3
+ import { readFile } from "node:fs/promises";
4
+ import stylelint from "stylelint";
5
+ //#region src/stylelint/rules/license-header.ts
6
+ const { createPlugin, utils: { ruleMessages, validateOptions, report } } = stylelint;
7
+ const ruleName = "license-header/header";
8
+ const messages = ruleMessages(ruleName, {
9
+ rejectedMissing: "Missing license header",
10
+ rejectedInvalid: "Invalid license header"
11
+ });
12
+ const meta = {
13
+ url: "https://gitlab.open-xchange.com/fspd/commons/plugins/-/blob/main/packages/linter-presets/docs/stylelint/README.md",
14
+ fixable: true
15
+ };
16
+ const promiseCache = /* @__PURE__ */ new Map();
17
+ /**
18
+ * Reads the license header file once per file path.
19
+ *
20
+ * @param path
21
+ * The path to the license header file.
22
+ *
23
+ * @returns
24
+ * A promise that will resolve with the contents of the license header file.
25
+ */
26
+ const readLicenseHeaderOnce = async (path) => {
27
+ let promise = promiseCache.get(path);
28
+ if (!promise) {
29
+ promise = readFile(path, "utf-8");
30
+ promiseCache.set(path, promise);
31
+ }
32
+ return await promise;
33
+ };
34
+ /**
35
+ * Implementation of the linter rule.
36
+ *
37
+ * @param primary
38
+ * The path to the license header file.
39
+ *
40
+ * @returns
41
+ * The callback function for the linter.
42
+ */
43
+ const ruleFunc = (primary) => async (root, result) => {
44
+ if (!validateOptions(result, ruleName, {
45
+ actual: primary,
46
+ possible: (path) => typeof path === "string" && path.length > 0
47
+ })) return;
48
+ let comment;
49
+ root.walkComments((node) => {
50
+ if (node.parent === root) comment = node;
51
+ return false;
52
+ });
53
+ const license = await readLicenseHeaderOnce(primary);
54
+ if (comment) {
55
+ const stripped = license.trim().replace(/^\/\*|\*\/$/g, "").trim();
56
+ if (comment.text === stripped) return;
57
+ }
58
+ report({
59
+ ruleName,
60
+ result,
61
+ message: comment ? messages.rejectedInvalid : messages.rejectedMissing,
62
+ node: comment ?? root,
63
+ fix: () => {
64
+ root.prepend(license);
65
+ }
66
+ });
67
+ };
68
+ var license_header_default = createPlugin(ruleName, Object.assign(ruleFunc, {
69
+ meta,
70
+ ruleName,
71
+ messages
72
+ }));
73
+ //#endregion
4
74
  //#region src/stylelint/index.ts
5
75
  /**
6
76
  * Generates a StyleLint configuration object targeting the source files in the
@@ -65,8 +135,8 @@ function defineConfig(options) {
65
135
  });
66
136
  if (options.license) overrides.push({
67
137
  files: ["**/*.{css,scss,less}"],
68
- plugins: [licensePlugin],
69
- rules: { "plugin/license-header": [true, { license: resolver.path(options.license) }] }
138
+ plugins: [license_header_default],
139
+ rules: { "license-header/header": resolver.path(options.license) }
70
140
  });
71
141
  if (options.vue?.rules) overrides.push({
72
142
  files: ["**/*.vue"],
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../../src/stylelint/index.ts"],"sourcesContent":["\nimport type { Config, ConfigRuleSettings, Plugin } from 'stylelint'\nimport licensePlugin from 'stylelint-plugin-license-header'\nimport stylisticPlugin from '@stylistic/stylelint-plugin'\n\nimport { PathResolver } from '@/utils/resolver.ts'\n\n// types ======================================================================\n\n/**\n * Configuration for multiple rules.\n */\nexport type RuleRecord = Record<string, ConfigRuleSettings<unknown, object>>\n\n// ----------------------------------------------------------------------------\n\n/**\n * Configuration options for StyleLint code style rules.\n */\nexport interface StylisticOptions {\n\n /**\n * Default indentation size (number of space characters).\n *\n * @default 2\n */\n indent?: number\n\n /**\n * The type of the string delimiter character.\n *\n * @default 'single'\n */\n quotes?: 'single' | 'double' | 'off'\n}\n\n// ----------------------------------------------------------------------------\n\n/**\n * Configuration options for linting vue files.\n */\nexport interface VueOptions {\n\n /**\n * The language parser plugin to be used.\n *\n * @default 'css'\n */\n lang?: 'css' | 'scss'\n\n /**\n * Additional linter rules to be added to the global configuration.\n */\n rules?: RuleRecord\n}\n\n// ----------------------------------------------------------------------------\n\n/**\n * Configuration options for linting the entire project with StyleLint.\n */\nexport interface ProjectOptions {\n\n /**\n * The URL of the project root containing the StyleLint configuration file.\n * Should usually be set to `import.meta.url`.\n */\n root: string\n\n /**\n * Glob patterns for all files to be ignored by StyleLint (the patterns must\n * match files, plain directory names are not supported).\n */\n ignores?: string[]\n\n /**\n * Path to the template file containing the license header to be used in all\n * source files. May be a path relative to the project root.\n */\n license?: string\n\n /**\n * Configuration options for code style.\n */\n stylistic?: StylisticOptions\n\n /**\n * Options for linting styles in Vue files.\n */\n vue?: VueOptions\n\n /**\n * Additional linter rules to be added to the global configuration.\n */\n rules?: RuleRecord\n}\n\n// functions ==================================================================\n\n/**\n * Generates a StyleLint configuration object targeting the source files in the\n * entire project.\n *\n * @param options\n * Plugin configuration options.\n *\n * @returns\n * The configuration object to be exported from `stylelint.config.js`.\n */\nexport function defineConfig(options: ProjectOptions): Config {\n\n const ignoreFiles: string[] = [\n 'node_modules/**/*',\n 'dist/**/*',\n 'output/**/*',\n 'coverage/**/*', // Vitest\n '.nuxt/**/*', // NuxtJS\n '.output/**/*', // NuxtJS\n ...(options.ignores ?? []),\n ]\n\n // resolve stylistic configuration options\n const stylistic: StylisticOptions = {\n indent: 2,\n quotes: 'single',\n ...options.stylistic,\n }\n\n // the resolver for relative file paths\n const resolver = new PathResolver(options.root)\n\n // all plugins to be loaded\n const plugins: Plugin[] = []\n\n // custom overrides\n const overrides: Config['overrides'] = []\n\n // custom rules, grouped by language type\n const rules: Record<string, RuleRecord> = {\n base: {\n 'at-rule-empty-line-before': null,\n 'color-function-notation': ['modern', { ignore: ['with-var-inside'] }],\n 'color-hex-length': null,\n 'comment-empty-line-before': null,\n 'custom-property-empty-line-before': null,\n 'declaration-block-no-redundant-longhand-properties': [true, { ignoreShorthands: ['inset'] }], // Safari does not support 'inset'\n 'declaration-block-single-line-max-declarations': null,\n 'declaration-empty-line-before': null,\n 'function-url-no-scheme-relative': true,\n 'function-url-scheme-allowed-list': ['data'],\n 'media-feature-range-notation': 'prefix', // Safari 16.3 does not work with this notation\n 'no-descending-specificity': null,\n 'no-unknown-animations': true,\n 'rule-empty-line-before': null,\n 'shorthand-property-no-redundant-values': [true, { ignore: ['four-into-three-edge-values'] }],\n },\n scss: {\n 'scss/dollar-variable-empty-line-before': null,\n 'scss/double-slash-comment-empty-line-before': null,\n },\n less: {},\n }\n\n // @stylistic plugin\n plugins.push(stylisticPlugin)\n Object.assign(rules.base, {\n '@stylistic/declaration-colon-newline-after': null,\n '@stylistic/indentation': [stylistic.indent, { ignore: ['inside-parens'] }],\n '@stylistic/max-line-length': null,\n '@stylistic/no-empty-first-line': null,\n '@stylistic/selector-list-comma-newline-after': null,\n '@stylistic/string-quotes': (stylistic.quotes === 'off') ? null : [stylistic.quotes, { avoidEscape: true }],\n })\n\n // license-header plugin\n if (options.license) {\n overrides.push({\n files: ['**/*.{css,scss,less}'], // not for Vue files\n plugins: [licensePlugin],\n rules: {\n 'plugin/license-header': [true, { license: resolver.path(options.license) }],\n },\n })\n }\n\n // '.vue' files\n if (options.vue?.rules) {\n overrides.push({\n files: ['**/*.vue'],\n rules: options.vue.rules,\n })\n }\n\n // distribute custom rules by language type\n if (options.rules) {\n for (const [name, rule] of Object.entries(options.rules)) {\n const key = name.split('/')[0];\n (rules[key] ?? rules.base)[name] = rule\n }\n }\n\n return {\n\n // ignore certain files and folders\n ignoreFiles,\n\n // language plugins\n plugins,\n\n // add recommended configurations\n extends: [\n '@stylistic/stylelint-config',\n (options.vue?.lang === 'scss') ? 'stylelint-config-standard-vue/scss' : 'stylelint-config-standard-vue',\n ],\n\n // rules for all language types\n rules: rules.base,\n\n // check inline directives\n reportDescriptionlessDisables: null,\n reportInvalidScopeDisables: true,\n reportNeedlessDisables: true,\n reportUnscopedDisables: true,\n\n // overrides for custom languages\n overrides: [\n\n // '.scss' files\n {\n files: ['**/*.scss'],\n extends: ['stylelint-config-standard-scss'],\n rules: rules.scss,\n },\n\n // '.less' files\n {\n files: ['**/*.less'],\n extends: ['stylelint-config-standard-less'],\n rules: rules.less,\n },\n\n ...overrides,\n ],\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AA6GA,SAAgB,aAAa,SAAiC;CAE5D,MAAM,cAAwB;EAC5B;EACA;EACA;EACA;EACA;EACA;EACA,GAAI,QAAQ,WAAW,CAAC;CAC1B;CAGA,MAAM,YAA8B;EAClC,QAAQ;EACR,QAAQ;EACR,GAAG,QAAQ;CACb;CAGA,MAAM,WAAW,IAAI,aAAa,QAAQ,IAAI;CAG9C,MAAM,UAAoB,CAAC;CAG3B,MAAM,YAAiC,CAAC;CAGxC,MAAM,QAAoC;EACxC,MAAM;GACJ,6BAA6B;GAC7B,2BAA2B,CAAC,UAAU,EAAE,QAAQ,CAAC,iBAAiB,EAAE,CAAC;GACrE,oBAAoB;GACpB,6BAA6B;GAC7B,qCAAqC;GACrC,sDAAsD,CAAC,MAAM,EAAE,kBAAkB,CAAC,OAAO,EAAE,CAAC;GAC5F,kDAAkD;GAClD,iCAAiC;GACjC,mCAAmC;GACnC,oCAAoC,CAAC,MAAM;GAC3C,gCAAgC;GAChC,6BAA6B;GAC7B,yBAAyB;GACzB,0BAA0B;GAC1B,0CAA0C,CAAC,MAAM,EAAE,QAAQ,CAAC,6BAA6B,EAAE,CAAC;EAC9F;EACA,MAAM;GACJ,0CAA0C;GAC1C,+CAA+C;EACjD;EACA,MAAM,CAAC;CACT;CAGA,QAAQ,KAAK,eAAe;CAC5B,OAAO,OAAO,MAAM,MAAM;EACxB,8CAA8C;EAC9C,0BAA0B,CAAC,UAAU,QAAQ,EAAE,QAAQ,CAAC,eAAe,EAAE,CAAC;EAC1E,8BAA8B;EAC9B,kCAAkC;EAClC,gDAAgD;EAChD,4BAA6B,UAAU,WAAW,QAAS,OAAO,CAAC,UAAU,QAAQ,EAAE,aAAa,KAAK,CAAC;CAC5G,CAAC;CAGD,IAAI,QAAQ,SACV,UAAU,KAAK;EACb,OAAO,CAAC,sBAAsB;EAC9B,SAAS,CAAC,aAAa;EACvB,OAAO,EACL,yBAAyB,CAAC,MAAM,EAAE,SAAS,SAAS,KAAK,QAAQ,OAAO,EAAE,CAAC,EAC7E;CACF,CAAC;CAIH,IAAI,QAAQ,KAAK,OACf,UAAU,KAAK;EACb,OAAO,CAAC,UAAU;EAClB,OAAO,QAAQ,IAAI;CACrB,CAAC;CAIH,IAAI,QAAQ,OACV,KAAK,MAAM,CAAC,MAAM,SAAS,OAAO,QAAQ,QAAQ,KAAK,GAAG;EACxD,MAAM,MAAM,KAAK,MAAM,GAAG,CAAC,CAAC;EAC5B,CAAC,MAAM,QAAQ,MAAM,KAAA,CAAM,QAAQ;CACrC;CAGF,OAAO;EAGL;EAGA;EAGA,SAAS,CACP,+BACC,QAAQ,KAAK,SAAS,SAAU,uCAAuC,+BAC1E;EAGA,OAAO,MAAM;EAGb,+BAA+B;EAC/B,4BAA4B;EAC5B,wBAAwB;EACxB,wBAAwB;EAGxB,WAAW;GAGT;IACE,OAAO,CAAC,WAAW;IACnB,SAAS,CAAC,gCAAgC;IAC1C,OAAO,MAAM;GACf;GAGA;IACE,OAAO,CAAC,WAAW;IACnB,SAAS,CAAC,gCAAgC;IAC1C,OAAO,MAAM;GACf;GAEA,GAAG;EACL;CACF;AACF"}
1
+ {"version":3,"file":"index.mjs","names":["licensePlugin"],"sources":["../../src/stylelint/rules/license-header.ts","../../src/stylelint/index.ts"],"sourcesContent":["\nimport { readFile } from 'node:fs/promises'\nimport stylelint from 'stylelint'\n\nconst { createPlugin, utils: { ruleMessages, validateOptions, report } } = stylelint\n\n// types ======================================================================\n\ntype RuleMeta = stylelint.RuleMeta\ntype RuleFunction = stylelint.RuleBase<string, unknown>\n\n// constants ==================================================================\n\nconst ruleName = 'license-header/header'\n\nconst messages = ruleMessages(ruleName, {\n rejectedMissing: 'Missing license header',\n rejectedInvalid: 'Invalid license header',\n})\n\nconst meta: RuleMeta = {\n url: 'https://gitlab.open-xchange.com/fspd/commons/plugins/-/blob/main/packages/linter-presets/docs/stylelint/README.md',\n fixable: true,\n}\n\n// functions ==================================================================\n\nconst promiseCache = new Map<string, Promise<string>>()\n\n/**\n * Reads the license header file once per file path.\n *\n * @param path\n * The path to the license header file.\n *\n * @returns\n * A promise that will resolve with the contents of the license header file.\n */\nconst readLicenseHeaderOnce = async (path: string): Promise<string> => {\n let promise = promiseCache.get(path)\n if (!promise) {\n promise = readFile(path, 'utf-8')\n promiseCache.set(path, promise)\n }\n return await promise\n}\n\n/**\n * Implementation of the linter rule.\n *\n * @param primary\n * The path to the license header file.\n *\n * @returns\n * The callback function for the linter.\n */\nconst ruleFunc: RuleFunction = (primary) => async (root, result) => {\n\n // validate rule options\n if (!validateOptions(result, ruleName, {\n actual: primary,\n possible: path => (typeof path === 'string') && (path.length > 0),\n })) return\n\n // find the first comment in the linted file\n type Comment = Parameters<Parameters<typeof root.walkComments>[0]>[0]\n let comment: Comment | undefined\n root.walkComments(node => {\n if (node.parent === root) comment = node // must be a top-level comment\n return false // always stop iteration after first comment\n })\n\n // read the license header file\n const license = await readLicenseHeaderOnce(primary)\n\n // exit successfully if comment found and matches the license header file\n if (comment) {\n // strip block comment markers for comparison\n const stripped = license.trim().replace(/^\\/\\*|\\*\\/$/g, '').trim()\n if (comment.text === stripped) return\n }\n\n // report missing or mismatching comment\n report({\n ruleName,\n result,\n message: comment ? messages.rejectedInvalid : messages.rejectedMissing,\n node: comment ?? root,\n fix: () => { root.prepend(license) },\n })\n}\n\n// exports ====================================================================\n\nexport default createPlugin(ruleName, Object.assign(ruleFunc, { meta, ruleName, messages }))\n","\nimport type { Config, ConfigRuleSettings, Plugin } from 'stylelint'\nimport stylisticPlugin from '@stylistic/stylelint-plugin'\nimport licensePlugin from '@/stylelint/rules/license-header.ts'\n\nimport { PathResolver } from '@/utils/resolver.ts'\n\n// types ======================================================================\n\n/**\n * Configuration for multiple rules.\n */\nexport type RuleRecord = Record<string, ConfigRuleSettings<unknown, object>>\n\n// ----------------------------------------------------------------------------\n\n/**\n * Configuration options for StyleLint code style rules.\n */\nexport interface StylisticOptions {\n\n /**\n * Default indentation size (number of space characters).\n *\n * @default 2\n */\n indent?: number\n\n /**\n * The type of the string delimiter character.\n *\n * @default 'single'\n */\n quotes?: 'single' | 'double' | 'off'\n}\n\n// ----------------------------------------------------------------------------\n\n/**\n * Configuration options for linting vue files.\n */\nexport interface VueOptions {\n\n /**\n * The language parser plugin to be used.\n *\n * @default 'css'\n */\n lang?: 'css' | 'scss'\n\n /**\n * Additional linter rules to be added to the global configuration.\n */\n rules?: RuleRecord\n}\n\n// ----------------------------------------------------------------------------\n\n/**\n * Configuration options for linting the entire project with StyleLint.\n */\nexport interface ProjectOptions {\n\n /**\n * The URL of the project root containing the StyleLint configuration file.\n * Should usually be set to `import.meta.url`.\n */\n root: string\n\n /**\n * Glob patterns for all files to be ignored by StyleLint (the patterns must\n * match files, plain directory names are not supported).\n */\n ignores?: string[]\n\n /**\n * Path to the template file containing the license header to be used in all\n * source files. May be a path relative to the project root.\n */\n license?: string\n\n /**\n * Configuration options for code style.\n */\n stylistic?: StylisticOptions\n\n /**\n * Options for linting styles in Vue files.\n */\n vue?: VueOptions\n\n /**\n * Additional linter rules to be added to the global configuration.\n */\n rules?: RuleRecord\n}\n\n// functions ==================================================================\n\n/**\n * Generates a StyleLint configuration object targeting the source files in the\n * entire project.\n *\n * @param options\n * Plugin configuration options.\n *\n * @returns\n * The configuration object to be exported from `stylelint.config.js`.\n */\nexport function defineConfig(options: ProjectOptions): Config {\n\n const ignoreFiles: string[] = [\n 'node_modules/**/*',\n 'dist/**/*',\n 'output/**/*',\n 'coverage/**/*', // Vitest\n '.nuxt/**/*', // NuxtJS\n '.output/**/*', // NuxtJS\n ...(options.ignores ?? []),\n ]\n\n // resolve stylistic configuration options\n const stylistic: StylisticOptions = {\n indent: 2,\n quotes: 'single',\n ...options.stylistic,\n }\n\n // the resolver for relative file paths\n const resolver = new PathResolver(options.root)\n\n // all plugins to be loaded\n const plugins: Plugin[] = []\n\n // custom overrides\n const overrides: Config['overrides'] = []\n\n // custom rules, grouped by language type\n const rules: Record<string, RuleRecord> = {\n base: {\n 'at-rule-empty-line-before': null,\n 'color-function-notation': ['modern', { ignore: ['with-var-inside'] }],\n 'color-hex-length': null,\n 'comment-empty-line-before': null,\n 'custom-property-empty-line-before': null,\n 'declaration-block-no-redundant-longhand-properties': [true, { ignoreShorthands: ['inset'] }], // Safari does not support 'inset'\n 'declaration-block-single-line-max-declarations': null,\n 'declaration-empty-line-before': null,\n 'function-url-no-scheme-relative': true,\n 'function-url-scheme-allowed-list': ['data'],\n 'media-feature-range-notation': 'prefix', // Safari 16.3 does not work with this notation\n 'no-descending-specificity': null,\n 'no-unknown-animations': true,\n 'rule-empty-line-before': null,\n 'shorthand-property-no-redundant-values': [true, { ignore: ['four-into-three-edge-values'] }],\n },\n scss: {\n 'scss/dollar-variable-empty-line-before': null,\n 'scss/double-slash-comment-empty-line-before': null,\n },\n less: {},\n }\n\n // @stylistic plugin\n plugins.push(stylisticPlugin)\n Object.assign(rules.base, {\n '@stylistic/declaration-colon-newline-after': null,\n '@stylistic/indentation': [stylistic.indent, { ignore: ['inside-parens'] }],\n '@stylistic/max-line-length': null,\n '@stylistic/no-empty-first-line': null,\n '@stylistic/selector-list-comma-newline-after': null,\n '@stylistic/string-quotes': (stylistic.quotes === 'off') ? null : [stylistic.quotes, { avoidEscape: true }],\n })\n\n // license header plugin\n if (options.license) {\n overrides.push({\n files: ['**/*.{css,scss,less}'], // not for Vue files\n plugins: [licensePlugin],\n rules: {\n 'license-header/header': resolver.path(options.license),\n },\n })\n }\n\n // '.vue' files\n if (options.vue?.rules) {\n overrides.push({\n files: ['**/*.vue'],\n rules: options.vue.rules,\n })\n }\n\n // distribute custom rules by language type\n if (options.rules) {\n for (const [name, rule] of Object.entries(options.rules)) {\n const key = name.split('/')[0];\n (rules[key] ?? rules.base)[name] = rule\n }\n }\n\n return {\n\n // ignore certain files and folders\n ignoreFiles,\n\n // language plugins\n plugins,\n\n // add recommended configurations\n extends: [\n '@stylistic/stylelint-config',\n (options.vue?.lang === 'scss') ? 'stylelint-config-standard-vue/scss' : 'stylelint-config-standard-vue',\n ],\n\n // rules for all language types\n rules: rules.base,\n\n // check inline directives\n reportDescriptionlessDisables: null,\n reportInvalidScopeDisables: true,\n reportNeedlessDisables: true,\n reportUnscopedDisables: true,\n\n // overrides for custom languages\n overrides: [\n\n // '.scss' files\n {\n files: ['**/*.scss'],\n extends: ['stylelint-config-standard-scss'],\n rules: rules.scss,\n },\n\n // '.less' files\n {\n files: ['**/*.less'],\n extends: ['stylelint-config-standard-less'],\n rules: rules.less,\n },\n\n ...overrides,\n ],\n }\n}\n"],"mappings":";;;;;AAIA,MAAM,EAAE,cAAc,OAAO,EAAE,cAAc,iBAAiB,aAAa;AAS3E,MAAM,WAAW;AAEjB,MAAM,WAAW,aAAa,UAAU;CACtC,iBAAiB;CACjB,iBAAiB;AACnB,CAAC;AAED,MAAM,OAAiB;CACrB,KAAK;CACL,SAAS;AACX;AAIA,MAAM,+BAAe,IAAI,IAA6B;;;;;;;;;;AAWtD,MAAM,wBAAwB,OAAO,SAAkC;CACrE,IAAI,UAAU,aAAa,IAAI,IAAI;CACnC,IAAI,CAAC,SAAS;EACZ,UAAU,SAAS,MAAM,OAAO;EAChC,aAAa,IAAI,MAAM,OAAO;CAChC;CACA,OAAO,MAAM;AACf;;;;;;;;;;AAWA,MAAM,YAA0B,YAAY,OAAO,MAAM,WAAW;CAGlE,IAAI,CAAC,gBAA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,GAAG;EACL;CACF;AACF"}
@@ -14,6 +14,7 @@ Generates standard configuration targeting the source files in the entire projec
14
14
  | Less files only | [stylelint-config-standard-less](https://github.com/stylelint-less/stylelint-config-standard-less) |
15
15
  | Sass files only | [stylelint-config-standard-scss](https://github.com/stylelint-scss/stylelint-config-standard-scss) |
16
16
  | Source code formatting | [@stylistic/stylelint-plugin](https://github.com/stylelint-stylistic/stylelint-stylistic) |
17
+ | License header | Internal plugin |
17
18
 
18
19
  #### `defineConfig` Signature
19
20
 
@@ -32,7 +33,10 @@ function defineConfig(options?: ProjectOptions): Config
32
33
  | `stylistic` | `StylisticOptions` | | Configuration options for code style. |
33
34
  | `stylistic.indent` | `number` | `2` | Default indentation size (number of space characters). |
34
35
  | `stylistic.quotes` | `'single'\|'double'\|'off'` | `'single'` | The type of the string delimiter character. |
35
- | `rules` | `RulesConfig` | `{}` | Additional linter rules to be added to the global configuration. |
36
+ | `vue` | `VueOptions` | | Configuration options for linting `<style>` elements in Vue single component files. |
37
+ | `vue.lang` | `'css' \| 'scss'` | `'css'` | The style language used in the Vue files. |
38
+ | `vue.rules` | `RuleRecord` | `{}` | Additional linter rules for Vue files. |
39
+ | `rules` | `RuleRecord` | `{}` | Additional linter rules to be added to the global configuration. |
36
40
 
37
41
  #### Built-in Ignore Globs
38
42
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-xchange/linter-presets",
3
- "version": "1.27.1",
3
+ "version": "1.28.0",
4
4
  "description": "Configuration presets for ESLint and StyleLint",
5
5
  "repository": {
6
6
  "type": "git",
@@ -73,7 +73,6 @@
73
73
  "stylelint-config-standard-less": "^4.1.0",
74
74
  "stylelint-config-standard-scss": "^17.0.0",
75
75
  "stylelint-config-standard-vue": "^1.0.0",
76
- "stylelint-plugin-license-header": "^1.0.3",
77
76
  "typescript-eslint": "^8.65.0"
78
77
  },
79
78
  "devDependencies": {