@nrwl/eslint-plugin-nx 13.6.0 → 13.6.1
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nrwl/eslint-plugin-nx",
|
|
3
|
-
"version": "13.6.
|
|
3
|
+
"version": "13.6.1",
|
|
4
4
|
"description": "ESLint Plugin for Nx",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
"eslint-config-prettier": "^8.1.0"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@nrwl/devkit": "13.6.
|
|
31
|
-
"@nrwl/workspace": "13.6.
|
|
30
|
+
"@nrwl/devkit": "13.6.1",
|
|
31
|
+
"@nrwl/workspace": "13.6.1",
|
|
32
|
+
"@swc-node/register": "^1.4.2",
|
|
32
33
|
"@typescript-eslint/experimental-utils": "~5.3.0",
|
|
33
34
|
"chalk": "4.1.0",
|
|
34
35
|
"confusing-browser-globals": "^1.0.9",
|
|
35
|
-
"ts-node": "^9.1.1",
|
|
36
36
|
"tsconfig-paths": "^3.9.0"
|
|
37
37
|
}
|
|
38
38
|
}
|
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.workspaceRules = void 0;
|
|
4
4
|
const fs_1 = require("fs");
|
|
5
|
+
const path_1 = require("path");
|
|
5
6
|
const constants_1 = require("./constants");
|
|
7
|
+
const read_default_tsconfig_1 = require("@swc-node/register/read-default-tsconfig");
|
|
8
|
+
const register_1 = require("@swc-node/register/register");
|
|
6
9
|
/**
|
|
7
10
|
* Optionally, if ts-node and tsconfig-paths are available in the current workspace, apply the require
|
|
8
11
|
* register hooks so that .ts files can be used for writing workspace lint rules.
|
|
@@ -13,9 +16,7 @@ const constants_1 = require("./constants");
|
|
|
13
16
|
*/
|
|
14
17
|
function registerTSWorkspaceLint() {
|
|
15
18
|
try {
|
|
16
|
-
|
|
17
|
-
dir: constants_1.WORKSPACE_PLUGIN_DIR,
|
|
18
|
-
});
|
|
19
|
+
(0, register_1.register)((0, read_default_tsconfig_1.readDefaultTsConfig)((0, path_1.join)(constants_1.WORKSPACE_PLUGIN_DIR, 'tsconfig.json')));
|
|
19
20
|
const tsconfigPaths = require('tsconfig-paths');
|
|
20
21
|
// Load the tsconfig from tools/eslint-rules/tsconfig.json
|
|
21
22
|
const tsConfigResult = tsconfigPaths.loadConfig(constants_1.WORKSPACE_PLUGIN_DIR);
|
|
@@ -23,7 +24,7 @@ function registerTSWorkspaceLint() {
|
|
|
23
24
|
* Register the custom workspace path mappings with node so that workspace libraries
|
|
24
25
|
* can be imported and used within custom workspace lint rules.
|
|
25
26
|
*/
|
|
26
|
-
tsconfigPaths.register({
|
|
27
|
+
return tsconfigPaths.register({
|
|
27
28
|
baseUrl: tsConfigResult.absoluteBaseUrl,
|
|
28
29
|
paths: tsConfigResult.paths,
|
|
29
30
|
});
|
|
@@ -36,7 +37,7 @@ exports.workspaceRules = (() => {
|
|
|
36
37
|
return {};
|
|
37
38
|
}
|
|
38
39
|
// Register `tools/eslint-rules` for TS transpilation
|
|
39
|
-
registerTSWorkspaceLint();
|
|
40
|
+
const registrationCleanup = registerTSWorkspaceLint();
|
|
40
41
|
try {
|
|
41
42
|
/**
|
|
42
43
|
* Currently we only support applying the rules from the user's workspace plugin object
|
|
@@ -53,5 +54,10 @@ exports.workspaceRules = (() => {
|
|
|
53
54
|
catch (err) {
|
|
54
55
|
return {};
|
|
55
56
|
}
|
|
57
|
+
finally {
|
|
58
|
+
if (registrationCleanup) {
|
|
59
|
+
registrationCleanup();
|
|
60
|
+
}
|
|
61
|
+
}
|
|
56
62
|
})();
|
|
57
63
|
//# sourceMappingURL=resolve-workspace-rules.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-workspace-rules.js","sourceRoot":"","sources":["../../../../packages/eslint-plugin-nx/src/resolve-workspace-rules.ts"],"names":[],"mappings":";;;AACA,2BAAgC;AAChC,2CAA6E;
|
|
1
|
+
{"version":3,"file":"resolve-workspace-rules.js","sourceRoot":"","sources":["../../../../packages/eslint-plugin-nx/src/resolve-workspace-rules.ts"],"names":[],"mappings":";;;AACA,2BAAgC;AAChC,+BAA4B;AAC5B,2CAA6E;AAC7E,oFAA+E;AAC/E,0DAAuD;AAIvD;;;;;;;GAOG;AACH,SAAS,uBAAuB;IAC9B,IAAI;QACF,IAAA,mBAAQ,EAAC,IAAA,2CAAmB,EAAC,IAAA,WAAI,EAAC,gCAAoB,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;QAE3E,MAAM,aAAa,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;QAEhD,0DAA0D;QAC1D,MAAM,cAAc,GAAG,aAAa,CAAC,UAAU,CAAC,gCAAoB,CAAC,CAAC;QAEtE;;;WAGG;QACH,OAAO,aAAa,CAAC,QAAQ,CAAC;YAC5B,OAAO,EAAE,cAAc,CAAC,eAAe;YACvC,KAAK,EAAE,cAAc,CAAC,KAAK;SAC5B,CAAC,CAAC;KACJ;IAAC,OAAO,GAAG,EAAE,GAAE;AAClB,CAAC;AAEY,QAAA,cAAc,GAAG,CAAC,GAAgB,EAAE;IAC/C,iGAAiG;IACjG,IAAI,CAAC,IAAA,eAAU,EAAC,gCAAoB,CAAC,EAAE;QACrC,OAAO,EAAE,CAAC;KACX;IACD,qDAAqD;IACrD,MAAM,mBAAmB,GAAG,uBAAuB,EAAE,CAAC;IACtD,IAAI;QACF;;;WAGG;QACH,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC,gCAAoB,CAAC,CAAC;QAEhD,4CAA4C;QAC5C,MAAM,eAAe,GAAgB,EAAE,CAAC;QACxC,KAAK,MAAM,CAAC,QAAQ,EAAE,UAAU,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAoB,CAAC,EAAE;YACzE,eAAe,CAAC,GAAG,oCAAwB,IAAI,QAAQ,EAAE,CAAC,GAAG,UAAU,CAAC;SACzE;QACD,OAAO,eAAe,CAAC;KACxB;IAAC,OAAO,GAAG,EAAE;QACZ,OAAO,EAAE,CAAC;KACX;YAAS;QACR,IAAI,mBAAmB,EAAE;YACvB,mBAAmB,EAAE,CAAC;SACvB;KACF;AACH,CAAC,CAAC,EAAE,CAAC"}
|