@open-xchange/linter-presets 1.7.2 → 1.7.4

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,15 @@
1
1
  # Changelog
2
2
 
3
+ ## `1.7.4` – 2025-Aug-01
4
+
5
+ - chore: bump typescript
6
+ - fixed: (ESLint) disable rule `@stylistic/indent` for jsx/tsx files ([eslint-stylistic#915](https://github.com/eslint-stylistic/eslint-stylistic/issues/915))
7
+ - fixed: (ESLint) set "tsconfigRootDir" parser option for all source files
8
+
9
+ ## `1.7.3` – 2025-Jul-31
10
+
11
+ - chore: bump dependencies
12
+
3
13
  ## `1.7.2` – 2025-Jul-24
4
14
 
5
15
  - chore: bump dependencies
@@ -117,5 +117,13 @@ export default function stylistic(stylisticConfig) {
117
117
  "@stylistic/migrate/migrate-jsx": "error",
118
118
  },
119
119
  },
120
+ // disable "@stylistic/indent" rule in jsx/tsx (https://github.com/eslint-stylistic/eslint-stylistic/issues/915)
121
+ {
122
+ name: "core.stylistic.fix",
123
+ files: ["**/*.{jsx,tsx}"],
124
+ rules: {
125
+ "@stylistic/indent": "off",
126
+ },
127
+ },
120
128
  ];
121
129
  }
@@ -1,5 +1,5 @@
1
1
  import { configs as pluginConfigs } from "typescript-eslint";
2
- import { TS_GLOB, DTS_GLOB, NO_UNUSED_VARS_OPTIONS } from "../shared/env-utils.js";
2
+ import { SRC_GLOB, TS_GLOB, DTS_GLOB, NO_UNUSED_VARS_OPTIONS } from "../shared/env-utils.js";
3
3
  // functions ==================================================================
4
4
  /**
5
5
  * Defines standard rules for TypeScript source files.
@@ -17,8 +17,8 @@ export default function ts(rootDir) {
17
17
  // plugin configuration, additional rules
18
18
  return [
19
19
  {
20
- name: "core.ts.recommended",
21
- files: TS_GLOB,
20
+ name: "core.ts.options",
21
+ files: SRC_GLOB,
22
22
  languageOptions: {
23
23
  parserOptions: {
24
24
  projectService: true,
@@ -27,6 +27,10 @@ export default function ts(rootDir) {
27
27
  warnOnUnsupportedTypeScriptVersion: false,
28
28
  },
29
29
  },
30
+ },
31
+ {
32
+ name: "core.ts.recommended",
33
+ files: TS_GLOB,
30
34
  // recommended rules
31
35
  extends: [
32
36
  ...pluginConfigs.strictTypeChecked,
@@ -38,7 +38,7 @@ export default ESLintUtils.RuleCreator.withoutDocs({
38
38
  }
39
39
  // extract alias key, replace with alias path
40
40
  const [aliasKey, modulePath] = projectContext.resolveAlias(importWrapper.moduleName);
41
- // accept installed NPM package
41
+ // accept installed npm package
42
42
  if (!aliasKey && projectContext.packageExists(modulePath)) {
43
43
  return;
44
44
  }
@@ -132,13 +132,13 @@ export declare class ProjectContext {
132
132
  */
133
133
  fileExists(modulePath: string): boolean;
134
134
  /**
135
- * Returns whether the passed module name is an installed NPM package.
135
+ * Returns whether the passed module name is an installed npm package.
136
136
  *
137
137
  * @param moduleName
138
138
  * The module name to be checked.
139
139
  *
140
140
  * @returns
141
- * Whether the passed module name is an installed NPM package.
141
+ * Whether the passed module name is an installed npm package.
142
142
  */
143
143
  packageExists(moduleName: string): boolean;
144
144
  }
@@ -2,7 +2,7 @@ import { posix, sep, dirname, extname } from "node:path";
2
2
  import { lstatSync } from "node:fs";
3
3
  import { createRequire } from "node:module";
4
4
  import pm from "picomatch";
5
- import { findUpSync } from "find-up";
5
+ import * as find from "empathic/find";
6
6
  import { AST_NODE_TYPES as NodeType } from "@typescript-eslint/utils";
7
7
  // constants ==================================================================
8
8
  const FILE_EXTENSIONS = ["js", "ts", "d.ts"];
@@ -133,7 +133,7 @@ export class ProjectContext {
133
133
  #configPath;
134
134
  /** The name of the linted module (with alias prefix if available). */
135
135
  #moduleName;
136
- /** Resolver for NPM packages. */
136
+ /** Resolver for npm packages. */
137
137
  #requireModule;
138
138
  // constructor ------------------------------------------------------------
139
139
  constructor(context) {
@@ -141,7 +141,7 @@ export class ProjectContext {
141
141
  const sharedSettings = context.settings["env-project"];
142
142
  this.#aliasMap = new Map(Object.entries(sharedSettings?.alias ?? {}));
143
143
  // resolve root directory
144
- const configPath = findUpSync(CONFIG_FILES);
144
+ const configPath = find.any(CONFIG_FILES);
145
145
  if (!configPath) {
146
146
  throw new Error("cannot find configuration file");
147
147
  }
@@ -236,13 +236,13 @@ export class ProjectContext {
236
236
  return FILE_EXTENSIONS.some(ext => isFile(resolvedPath + "." + ext));
237
237
  }
238
238
  /**
239
- * Returns whether the passed module name is an installed NPM package.
239
+ * Returns whether the passed module name is an installed npm package.
240
240
  *
241
241
  * @param moduleName
242
242
  * The module name to be checked.
243
243
  *
244
244
  * @returns
245
- * Whether the passed module name is an installed NPM package.
245
+ * Whether the passed module name is an installed npm package.
246
246
  */
247
247
  packageExists(moduleName) {
248
248
  this.#requireModule ??= createRequire(this.#configPath);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-xchange/linter-presets",
3
- "version": "1.7.2",
3
+ "version": "1.7.4",
4
4
  "description": "Configuration presets for ESLint and StyleLint",
5
5
  "repository": {
6
6
  "type": "git",
@@ -37,15 +37,16 @@
37
37
  "@eslint-react/eslint-plugin": "^1.52.3",
38
38
  "@eslint/compat": "^1.3.1",
39
39
  "@eslint/config-helpers": "^0.3.0",
40
- "@eslint/js": "^9.31.0",
40
+ "@eslint/js": "^9.32.0",
41
41
  "@eslint/markdown": "^7.1.0",
42
42
  "@stylistic/eslint-plugin": "^5.2.2",
43
43
  "@stylistic/eslint-plugin-migrate": "^4.4.1",
44
44
  "@stylistic/stylelint-config": "^3.0.1",
45
45
  "@stylistic/stylelint-plugin": "^4.0.0",
46
- "@types/picomatch": "^4.0.1",
46
+ "@types/picomatch": "^4.0.2",
47
47
  "@vitest/eslint-plugin": "^1.3.4",
48
48
  "confusing-browser-globals": "^1.0.11",
49
+ "empathic": "^2.0.0",
49
50
  "eslint-plugin-chai-expect": "^3.1.0",
50
51
  "eslint-plugin-codeceptjs": "^1.3.0",
51
52
  "eslint-plugin-depend": "^1.2.0",
@@ -53,24 +54,23 @@
53
54
  "eslint-plugin-jest": "^29.0.1",
54
55
  "eslint-plugin-jest-dom": "^5.5.0",
55
56
  "eslint-plugin-jest-extended": "^3.0.0",
56
- "eslint-plugin-jsdoc": "^51.4.1",
57
+ "eslint-plugin-jsdoc": "^52.0.2",
57
58
  "eslint-plugin-jsonc": "^2.20.1",
58
59
  "eslint-plugin-jsx-a11y": "^6.10.2",
59
60
  "eslint-plugin-license-header": "^0.8.0",
60
- "eslint-plugin-n": "^17.21.0",
61
+ "eslint-plugin-n": "^17.21.3",
61
62
  "eslint-plugin-promise": "^7.2.1",
62
63
  "eslint-plugin-react-hooks": "^5.2.0",
63
64
  "eslint-plugin-react-hooks-static-deps": "^1.0.7",
64
65
  "eslint-plugin-react-refresh": "^0.4.20",
65
66
  "eslint-plugin-regexp": "^2.9.0",
66
- "eslint-plugin-testing-library": "^7.6.1",
67
- "eslint-plugin-vue": "^10.3.0",
67
+ "eslint-plugin-testing-library": "^7.6.3",
68
+ "eslint-plugin-vue": "^10.4.0",
68
69
  "eslint-plugin-yml": "^1.18.0",
69
- "find-up": "^7.0.0",
70
70
  "globals": "^16.3.0",
71
71
  "picomatch": "^4.0.3",
72
72
  "postcss-html": "^1.8.0",
73
- "stylelint-config-standard": "^38.0.0",
73
+ "stylelint-config-standard": "^39.0.0",
74
74
  "stylelint-config-standard-less": "^3.0.1",
75
75
  "stylelint-config-standard-scss": "^15.0.1",
76
76
  "stylelint-config-standard-vue": "^1.0.0",
@@ -82,22 +82,22 @@
82
82
  "@types/confusing-browser-globals": "^1.0.3",
83
83
  "@types/eslint-scope": "^8.3.1",
84
84
  "@types/node": "^24.1.0",
85
- "@types/react": "^19.1.8",
85
+ "@types/react": "^19.1.9",
86
86
  "@typescript-eslint/utils": "^8.38.0",
87
- "eslint": "^9.31.0",
87
+ "eslint": "^9.32.0",
88
88
  "jest": "^30.0.5",
89
- "jiti": "^2.5.0",
89
+ "jiti": "^2.5.1",
90
90
  "premove": "^4.0.0",
91
- "stylelint": "^16.22.0",
91
+ "stylelint": "^16.23.0",
92
92
  "ts-patch": "^3.3.0",
93
- "typescript": "^5.8.3",
93
+ "typescript": "^5.9.2",
94
94
  "typescript-transform-paths": "^3.5.5"
95
95
  },
96
96
  "peerDependencies": {
97
97
  "eslint": "^9.30.0",
98
98
  "jest": "^29.7.0 || ^30.0.0",
99
99
  "postcss": "^8.4.0",
100
- "stylelint": "^16.22.0",
100
+ "stylelint": "^16.23.0",
101
101
  "typescript": "^5.7.0",
102
102
  "vitest": "^2.0.0 || ^3.0.0"
103
103
  },