@arcgis/eslint-config 4.32.0-next.71 → 4.32.0-next.73
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/dist/{chunk-6W5LRMK5.js → chunk-2QEPVXNZ.js} +1 -1
- package/dist/{chunk-UWVPSGJB.js → chunk-ANTZSLIJ.js} +1 -1
- package/dist/{chunk-YHHUSCZR.js → chunk-ZEQDQQHF.js} +48 -2
- package/dist/config/index.js +2 -2
- package/dist/config/lumina.js +2 -2
- package/dist/plugins/lumina/index.js +2 -2
- package/dist/plugins/webgis/index.js +2 -2
- package/dist/plugins/webgis/rules/no-touching-jsdoc.d.ts +3 -0
- package/dist/plugins/webgis/rules/no-touching-jsdoc.test.d.ts +1 -0
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
makeEslintPlugin
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2QEPVXNZ.js";
|
|
4
4
|
|
|
5
5
|
// src/plugins/webgis/utils/creator.ts
|
|
6
6
|
import { ESLintUtils } from "@typescript-eslint/utils";
|
|
@@ -54,9 +54,55 @@ var noImportOutsideSrc = createRule({
|
|
|
54
54
|
}
|
|
55
55
|
});
|
|
56
56
|
|
|
57
|
+
// src/plugins/webgis/rules/no-touching-jsdoc.ts
|
|
58
|
+
var description2 = `Having two JSDoc comments next to each other is most likely a mistake - consider combining them into one, or separating them for clarity.`;
|
|
59
|
+
var noTouchingJsDoc = createRule({
|
|
60
|
+
name: "no-touching-jsdoc",
|
|
61
|
+
meta: {
|
|
62
|
+
docs: {
|
|
63
|
+
description: description2
|
|
64
|
+
},
|
|
65
|
+
messages: {
|
|
66
|
+
noTouchingJsDoc: description2
|
|
67
|
+
},
|
|
68
|
+
type: "problem",
|
|
69
|
+
schema: []
|
|
70
|
+
},
|
|
71
|
+
defaultOptions: [],
|
|
72
|
+
create(context) {
|
|
73
|
+
return {
|
|
74
|
+
Program() {
|
|
75
|
+
Array.from(context.sourceCode.text.matchAll(reTouchingJsDoc), (match) => {
|
|
76
|
+
const previousJsDocStart = context.sourceCode.text.slice(0, match.index).lastIndexOf("/**");
|
|
77
|
+
if (previousJsDocStart === -1) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
const previousJsDocContent = context.sourceCode.text.slice(
|
|
81
|
+
previousJsDocStart + "/**".length,
|
|
82
|
+
match.index - "*/".length
|
|
83
|
+
);
|
|
84
|
+
const containsOtherComments = previousJsDocContent.includes("*/");
|
|
85
|
+
if (containsOtherComments) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
context.report({
|
|
89
|
+
messageId: "noTouchingJsDoc",
|
|
90
|
+
loc: {
|
|
91
|
+
start: context.sourceCode.getLocFromIndex(match.index),
|
|
92
|
+
end: context.sourceCode.getLocFromIndex(match.index + match[0].length)
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
var reTouchingJsDoc = /\*\/\s+\/\*\*/gu;
|
|
101
|
+
|
|
57
102
|
// src/plugins/webgis/index.ts
|
|
58
103
|
var webgis_default = makeEslintPlugin("webgis", {
|
|
59
|
-
"no-import-outside-src": noImportOutsideSrc
|
|
104
|
+
"no-import-outside-src": noImportOutsideSrc,
|
|
105
|
+
"no-touching-jsdoc": noTouchingJsDoc
|
|
60
106
|
});
|
|
61
107
|
|
|
62
108
|
export {
|
package/dist/config/index.js
CHANGED
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
} from "../chunk-WAWBOPY7.js";
|
|
4
4
|
import {
|
|
5
5
|
webgis_default
|
|
6
|
-
} from "../chunk-
|
|
7
|
-
import "../chunk-
|
|
6
|
+
} from "../chunk-ZEQDQQHF.js";
|
|
7
|
+
import "../chunk-2QEPVXNZ.js";
|
|
8
8
|
|
|
9
9
|
// src/config/index.ts
|
|
10
10
|
import eslint from "@eslint/js";
|
package/dist/config/lumina.js
CHANGED
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
} from "../chunk-WAWBOPY7.js";
|
|
4
4
|
import {
|
|
5
5
|
lumina_default
|
|
6
|
-
} from "../chunk-
|
|
7
|
-
import "../chunk-
|
|
6
|
+
} from "../chunk-ANTZSLIJ.js";
|
|
7
|
+
import "../chunk-2QEPVXNZ.js";
|
|
8
8
|
|
|
9
9
|
// src/config/storybook.ts
|
|
10
10
|
import eslintPluginStorybook from "eslint-plugin-storybook";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/eslint-config",
|
|
3
|
-
"version": "4.32.0-next.
|
|
3
|
+
"version": "4.32.0-next.73",
|
|
4
4
|
"description": "ESLint configuration for arcgis-web-components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
],
|
|
21
21
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@arcgis/components-utils": "4.32.0-next.
|
|
23
|
+
"@arcgis/components-utils": "4.32.0-next.73",
|
|
24
24
|
"@eslint/js": "^9.17.0",
|
|
25
25
|
"@types/confusing-browser-globals": "^1.0.3",
|
|
26
26
|
"confusing-browser-globals": "^1.0.11",
|