@open-xchange/linter-presets 1.7.2 → 1.7.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/CHANGELOG.md
CHANGED
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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 =
|
|
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
|
|
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
|
|
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.
|
|
3
|
+
"version": "1.7.3",
|
|
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.
|
|
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.
|
|
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": "^
|
|
57
|
+
"eslint-plugin-jsdoc": "^52.0.1",
|
|
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.
|
|
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.
|
|
67
|
+
"eslint-plugin-testing-library": "^7.6.3",
|
|
67
68
|
"eslint-plugin-vue": "^10.3.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": "^
|
|
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,13 +82,13 @@
|
|
|
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.
|
|
85
|
+
"@types/react": "^19.1.9",
|
|
86
86
|
"@typescript-eslint/utils": "^8.38.0",
|
|
87
|
-
"eslint": "^9.
|
|
87
|
+
"eslint": "^9.32.0",
|
|
88
88
|
"jest": "^30.0.5",
|
|
89
|
-
"jiti": "^2.5.
|
|
89
|
+
"jiti": "^2.5.1",
|
|
90
90
|
"premove": "^4.0.0",
|
|
91
|
-
"stylelint": "^16.
|
|
91
|
+
"stylelint": "^16.23.0",
|
|
92
92
|
"ts-patch": "^3.3.0",
|
|
93
93
|
"typescript": "^5.8.3",
|
|
94
94
|
"typescript-transform-paths": "^3.5.5"
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"eslint": "^9.30.0",
|
|
98
98
|
"jest": "^29.7.0 || ^30.0.0",
|
|
99
99
|
"postcss": "^8.4.0",
|
|
100
|
-
"stylelint": "^16.
|
|
100
|
+
"stylelint": "^16.23.0",
|
|
101
101
|
"typescript": "^5.7.0",
|
|
102
102
|
"vitest": "^2.0.0 || ^3.0.0"
|
|
103
103
|
},
|