eslint-plugin-use-agnostic 1.3.0 → 1.3.2
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,21 +1,18 @@
|
|
|
1
1
|
import url from "url";
|
|
2
2
|
import path from "path";
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { createRequire } from "module";
|
|
5
|
+
const require = createRequire(import.meta.url);
|
|
5
6
|
|
|
6
|
-
const
|
|
7
|
-
const
|
|
7
|
+
const filename = url.fileURLToPath(import.meta.url);
|
|
8
|
+
const dirname = path.dirname(filename);
|
|
8
9
|
|
|
9
|
-
const
|
|
10
|
-
jsCommentsConfigPath
|
|
11
|
-
);
|
|
10
|
+
const rawPath = path.join(dirname, "../../../comments.config.json");
|
|
12
11
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
console.error(e.message);
|
|
16
|
-
});
|
|
17
|
-
throw new Error("Failed to resolve config data.");
|
|
18
|
-
}
|
|
12
|
+
const raw = require(rawPath);
|
|
13
|
+
export const resolvedConfigData = raw;
|
|
19
14
|
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
/* Notes
|
|
16
|
+
We're actually not supposed to install comment-variables-resolve-config. What's supposed to happen is that the resolved config data should be made and consumed as a JSON either via a command in the CLI or automatically on save by the VS Code extension.
|
|
17
|
+
For the CLI, the decision has been taken to automatically create the JSON every time the CLI is successfully run with any command.
|
|
18
|
+
*/
|
|
@@ -13,6 +13,10 @@ import { makeIntroForSpecificViolationMessage } from "../../../_commons/utilitie
|
|
|
13
13
|
|
|
14
14
|
import { resolvedConfigData } from "../../../../jscomments/_commons/constants/bases.js";
|
|
15
15
|
|
|
16
|
+
// const resolvedConfigData = await import("../../../../comments.config.json", {
|
|
17
|
+
// assert: { type: "json" },
|
|
18
|
+
// });
|
|
19
|
+
|
|
16
20
|
/**
|
|
17
21
|
* @typedef {import('../../../../types/agnostic20/_commons/typedefs.js').Directive} Directive
|
|
18
22
|
* @typedef {import('../../../../types/agnostic20/_commons/typedefs.js').Directives} Directives
|
|
@@ -16,6 +16,10 @@ import { makeIntroForSpecificViolationMessage } from "../../../_commons/utilitie
|
|
|
16
16
|
|
|
17
17
|
import { resolvedConfigData } from "../../../../jscomments/_commons/constants/bases.js";
|
|
18
18
|
|
|
19
|
+
// const resolvedConfigData = await import("../../../../comments.config.json", {
|
|
20
|
+
// assert: { type: "json" },
|
|
21
|
+
// });
|
|
22
|
+
|
|
19
23
|
/**
|
|
20
24
|
* @typedef {import('../../../../types/directive21/_commons/typedefs.js').CommentedDirective} CommentedDirective
|
|
21
25
|
* @typedef {import('../../../../types/directive21/_commons/typedefs.js').CommentedDirectiveWithoutUseAgnosticStrategies} CommentedDirectiveWithoutUseAgnosticStrategies
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-use-agnostic",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.2",
|
|
4
4
|
"description": "Highlights problematic server-client imports in projects made with the Fullstack React Architecture.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -41,7 +41,6 @@
|
|
|
41
41
|
"test": "node tests/agnostic20/import-rules.test.js && node tests/directive21/import-rules.test.js"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"comment-variables-resolve-config": "^1.9.0",
|
|
45
44
|
"get-sourcecode-from-file-path": "^1.1.2",
|
|
46
45
|
"resolve-importing-path": "^1.0.3",
|
|
47
46
|
"tsconfig-paths": "^4.2.0",
|