@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.
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "4.32.0-next.71";
2
+ var version = "4.32.0-next.73";
3
3
 
4
4
  // src/plugins/utils/makePlugin.ts
5
5
  function makeEslintPlugin(pluginName, rules) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  makeEslintPlugin
3
- } from "./chunk-6W5LRMK5.js";
3
+ } from "./chunk-2QEPVXNZ.js";
4
4
 
5
5
  // src/plugins/lumina/rules/add-missing-jsx-import.ts
6
6
  import { AST_NODE_TYPES as AST_NODE_TYPES2 } from "@typescript-eslint/utils";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  makeEslintPlugin
3
- } from "./chunk-6W5LRMK5.js";
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 {
@@ -3,8 +3,8 @@ import {
3
3
  } from "../chunk-WAWBOPY7.js";
4
4
  import {
5
5
  webgis_default
6
- } from "../chunk-YHHUSCZR.js";
7
- import "../chunk-6W5LRMK5.js";
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";
@@ -3,8 +3,8 @@ import {
3
3
  } from "../chunk-WAWBOPY7.js";
4
4
  import {
5
5
  lumina_default
6
- } from "../chunk-UWVPSGJB.js";
7
- import "../chunk-6W5LRMK5.js";
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";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  lumina_default
3
- } from "../../chunk-UWVPSGJB.js";
4
- import "../../chunk-6W5LRMK5.js";
3
+ } from "../../chunk-ANTZSLIJ.js";
4
+ import "../../chunk-2QEPVXNZ.js";
5
5
  export {
6
6
  lumina_default as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  webgis_default
3
- } from "../../chunk-YHHUSCZR.js";
4
- import "../../chunk-6W5LRMK5.js";
3
+ } from "../../chunk-ZEQDQQHF.js";
4
+ import "../../chunk-2QEPVXNZ.js";
5
5
  export {
6
6
  webgis_default as default
7
7
  };
@@ -0,0 +1,3 @@
1
+ export declare const noTouchingJsDoc: import("@typescript-eslint/utils/ts-eslint").RuleModule<"noTouchingJsDoc", [], {
2
+ description: string;
3
+ }, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/eslint-config",
3
- "version": "4.32.0-next.71",
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.71",
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",