@open-xchange/linter-presets 0.11.4 → 0.11.6

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,13 @@
1
1
  # Changelog
2
2
 
3
+ ## `0.11.6` – 2024-Dec-01
4
+
5
+ - add: (ESLint) enable standard rules in Vue files
6
+
7
+ ## `0.11.5` – 2024-Nov-29
8
+
9
+ - add: (StyleLint) enable directive `reportUnscopedDisables`
10
+
3
11
  ## `0.11.4` – 2024-Nov-29
4
12
 
5
13
  - chore: bump dependencies
@@ -1,6 +1,6 @@
1
1
  import eslintJs from "@eslint/js";
2
2
  import babelParser from "@babel/eslint-parser";
3
- import { JS_GLOB, SRC_GLOB, extGlob } from "../shared/env-utils.js";
3
+ import { JS_GLOB, SRC_GLOB, VUE_GLOB, extGlob } from "../shared/env-utils.js";
4
4
  import { builtinRestrictedRules } from "../shared/restricted.js";
5
5
  // functions ==================================================================
6
6
  /**
@@ -58,7 +58,7 @@ export default function base(languageConfig) {
58
58
  }] : []),
59
59
  // configure linter rules
60
60
  {
61
- files: SRC_GLOB,
61
+ files: [...SRC_GLOB, ...VUE_GLOB],
62
62
  rules: {
63
63
  // enable all rules recommended by ESLint itself
64
64
  ...eslintJs.configs.recommended.rules,
@@ -1,5 +1,5 @@
1
1
  import commentsPluginConfigs from "@eslint-community/eslint-plugin-eslint-comments/configs";
2
- import { SRC_GLOB } from "../shared/env-utils.js";
2
+ import { SRC_GLOB, VUE_GLOB } from "../shared/env-utils.js";
3
3
  // functions ==================================================================
4
4
  /**
5
5
  * Checks inline linter directives.
@@ -13,7 +13,7 @@ import { SRC_GLOB } from "../shared/env-utils.js";
13
13
  export default function directives() {
14
14
  // register rule implementations and recommended rules
15
15
  return [{
16
- files: SRC_GLOB,
16
+ files: [...SRC_GLOB, ...VUE_GLOB],
17
17
  ...commentsPluginConfigs.recommended,
18
18
  }];
19
19
  }
@@ -37,6 +37,8 @@ export default function vue(languageConfig, stylisticConfig) {
37
37
  // reconfigure plugin rules
38
38
  {
39
39
  rules: {
40
+ "no-undef": "off",
41
+ "no-useless-assignment": "off",
40
42
  "vue/html-indent": ["error", stylisticConfig.indent.vue],
41
43
  "vue/max-attributes-per-line": "off",
42
44
  "vue/singleline-html-element-content-newline": "off",
@@ -138,6 +138,10 @@ export declare const DTS_GLOB: string[];
138
138
  * Glob array for all source files (JavaScript and TypeScript).
139
139
  */
140
140
  export declare const SRC_GLOB: string[];
141
+ /**
142
+ * Glob array for all VueJS SFC files.
143
+ */
144
+ export declare const VUE_GLOB: string[];
141
145
  /**
142
146
  * Shared options for the core rule `no-unused-vars`, and the plugin rule
143
147
  * `@typescript-eslint/no-unused-vars`.
@@ -27,6 +27,10 @@ export const DTS_GLOB = extGlob(TS_EXTENSIONS.map(ext => "d." + ext));
27
27
  * Glob array for all source files (JavaScript and TypeScript).
28
28
  */
29
29
  export const SRC_GLOB = extGlob(SRC_EXTENSIONS);
30
+ /**
31
+ * Glob array for all VueJS SFC files.
32
+ */
33
+ export const VUE_GLOB = extGlob(["vue"]);
30
34
  /**
31
35
  * Shared options for the core rule `no-unused-vars`, and the plugin rule
32
36
  * `@typescript-eslint/no-unused-vars`.
@@ -46,6 +46,7 @@ export function configure(options) {
46
46
  reportDescriptionlessDisables: null,
47
47
  reportInvalidScopeDisables: true,
48
48
  reportNeedlessDisables: true,
49
+ reportUnscopedDisables: true,
49
50
  // reconfigure linter rules
50
51
  rules: {
51
52
  // core rules
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-xchange/linter-presets",
3
- "version": "0.11.4",
3
+ "version": "0.11.6",
4
4
  "description": "Configuration presets for ESLint and StyleLint",
5
5
  "repository": {
6
6
  "type": "git",