@nrwl/linter 15.8.0-beta.0 → 15.8.0-beta.1

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nrwl/linter",
3
- "version": "15.8.0-beta.0",
3
+ "version": "15.8.0-beta.1",
4
4
  "private": false,
5
5
  "description": "The Linter plugin for Nx contains executors, generators and utilities used for linting JavaScript/TypeScript projects within an Nx workspace.",
6
6
  "repository": {
@@ -33,7 +33,8 @@
33
33
  "eslint": "^8.0.0"
34
34
  },
35
35
  "dependencies": {
36
- "@nrwl/devkit": "15.8.0-beta.0",
36
+ "@nrwl/devkit": "15.8.0-beta.1",
37
+ "@nrwl/js": "15.8.0-beta.1",
37
38
  "@phenomnomnominal/tsquery": "4.1.1",
38
39
  "tmp": "~0.2.1",
39
40
  "tslib": "^2.3.0"
@@ -47,5 +48,5 @@
47
48
  "access": "public"
48
49
  },
49
50
  "types": "./index.d.ts",
50
- "gitHead": "ae5d6e5c48bd4684f341206d2249a0f5783cb4bb"
51
+ "gitHead": "347d6dd92077b793139c77a7a6bd9baf7a1f975c"
51
52
  }
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.lintWorkspaceRulesProjectSchematic = exports.lintWorkspaceRulesProjectGenerator = exports.WORKSPACE_PLUGIN_DIR = exports.WORKSPACE_RULES_PROJECT_NAME = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const devkit_1 = require("@nrwl/devkit");
6
- const typescript_1 = require("@nrwl/workspace/src/utilities/typescript");
6
+ const js_1 = require("@nrwl/js");
7
7
  const path_1 = require("path");
8
8
  const workspace_lint_rules_1 = require("../../utils/workspace-lint-rules");
9
9
  const versions_1 = require("nx/src/utils/versions");
@@ -13,7 +13,7 @@ exports.WORKSPACE_PLUGIN_DIR = 'tools/eslint-rules';
13
13
  function lintWorkspaceRulesProjectGenerator(tree) {
14
14
  var _a, _b;
15
15
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
16
- yield (0, devkit_1.ensurePackage)(tree, '@nrwl/jest/', versions_2.nxVersion);
16
+ (0, devkit_1.ensurePackage)(tree, '@nrwl/jest/', versions_2.nxVersion);
17
17
  const { addPropertyToJestConfig, jestProjectGenerator } = yield Promise.resolve().then(() => require('@nrwl/jest'));
18
18
  // Noop if the workspace rules project already exists
19
19
  try {
@@ -31,7 +31,7 @@ function lintWorkspaceRulesProjectGenerator(tree) {
31
31
  (0, devkit_1.generateFiles)(tree, (0, path_1.join)(__dirname, 'files'), workspace_lint_rules_1.workspaceLintPluginDir, {
32
32
  tmpl: '',
33
33
  offsetFromRoot: (0, devkit_1.offsetFromRoot)(exports.WORKSPACE_PLUGIN_DIR),
34
- rootTsConfigPath: (0, typescript_1.getRelativePathToRootTsConfig)(tree, exports.WORKSPACE_PLUGIN_DIR),
34
+ rootTsConfigPath: (0, js_1.getRelativePathToRootTsConfig)(tree, exports.WORKSPACE_PLUGIN_DIR),
35
35
  });
36
36
  /**
37
37
  * Ensure that when workspace rules are updated they cause all projects to be affected for now.
@@ -1 +1 @@
1
- {"version":3,"file":"workspace-rules-project.js","sourceRoot":"","sources":["../../../../../../packages/linter/src/generators/workspace-rules-project/workspace-rules-project.ts"],"names":[],"mappings":";;;;AAAA,yCAcsB;AACtB,yEAAyF;AACzF,+BAA4B;AAC5B,2EAA0E;AAC1E,oDAAuE;AACvE,mDAAiD;AAEpC,QAAA,4BAA4B,GAAG,cAAc,CAAC;AAE9C,QAAA,oBAAoB,GAAG,oBAAoB,CAAC;AAEzD,SAAsB,kCAAkC,CAAC,IAAU;;;QACjE,MAAM,IAAA,sBAAa,EAAC,IAAI,EAAE,aAAa,EAAE,oBAAS,CAAC,CAAC;QACpD,MAAM,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,GAAG,2CACxD,YAAY,EACb,CAAC;QAEF,qDAAqD;QACrD,IAAI;YACF,IAAA,iCAAwB,EAAC,IAAI,EAAE,oCAA4B,CAAC,CAAC;YAC7D,OAAO;SACR;QAAC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,EAAE,EAAE;oBACpC,IAAI,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;wBAC1B,OAAO,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;qBAC9B;oBACD,OAAO,CAAC,CAAC;gBACX,CAAC,CAAC,CAAC;aACJ;YACD,IAAI,IAAI,CAAC,OAAO,EAAE;gBAChB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;oBACpC,IAAI,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;wBAC1B,OAAO,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;qBAC9B;oBACD,OAAO,CAAC,CAAC;gBACX,CAAC,CAAC,CAAC;aACJ;YACD,OAAO,IAAI,CAAC;QACd,CAAC,CACF,CAAC;QAEF,uBAAuB;QACvB,IAAA,qCAA4B,EAC1B,IAAI,EACJ,EAAE,EACF,EAAE,oBAAoB,EAAE,yBAAc,EAAE,WAAW,EAAE,yBAAc,EAAE,CACtE,CAAC;QAEF,kGAAkG;QAClG,uBAAuB,CACrB,IAAI,EACJ,IAAA,0BAAiB,EAAC,4BAAoB,EAAE,gBAAgB,CAAC,EACzD,kBAAkB,EAClB;YACE,kBAAkB,EAAE,8CAA8C;SACnE,CACF,CAAC;QAEF,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;QAExB,OAAO,WAAW,CAAC;;CACpB;AA9FD,gFA8FC;AAEY,QAAA,kCAAkC,GAAG,IAAA,2BAAkB,EAClE,kCAAkC,CACnC,CAAC"}
1
+ {"version":3,"file":"workspace-rules-project.js","sourceRoot":"","sources":["../../../../../../packages/linter/src/generators/workspace-rules-project/workspace-rules-project.ts"],"names":[],"mappings":";;;;AAAA,yCAcsB;AACtB,iCAAyD;AACzD,+BAA4B;AAC5B,2EAA0E;AAC1E,oDAAuE;AACvE,mDAAiD;AAEpC,QAA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AAA,oBAAW,EAAC,IAAI,CAAC,CAAC;QAExB,OAAO,WAAW,CAAC;;CACpB;AA9FD,gFA8FC;AAEY,QAAA,kCAAkC,GAAG,IAAA,2BAAkB,EAClE,kCAAkC,CACnC,CAAC"}
@@ -7,7 +7,7 @@ const versions_1 = require("../../utils/versions");
7
7
  function eslint8Updates(tree) {
8
8
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
9
9
  try {
10
- yield (0, devkit_1.ensurePackage)(tree, '@nrwl/jest/', versions_1.nxVersion);
10
+ (0, devkit_1.ensurePackage)(tree, '@nrwl/jest/', versions_1.nxVersion);
11
11
  const { addPropertyToJestConfig } = yield Promise.resolve().then(() => require('@nrwl/jest'));
12
12
  const existingJestConfigPath = (0, devkit_1.normalizePath)('tools/eslint-rules/jest.config.js');
13
13
  // Add extra config to the jest.config.js file to allow ESLint 8 exports mapping to work with jest
@@ -1 +1 @@
1
- {"version":3,"file":"eslint-8-updates.js","sourceRoot":"","sources":["../../../../../../packages/linter/src/migrations/update-13-3-0/eslint-8-updates.ts"],"names":[],"mappings":";;;AAAA,yCAMsB;AACtB,uDAAoD;AACpD,mDAAiD;AAEjD,SAA8B,cAAc,CAAC,IAAU;;QACrD,IAAI;YACF,MAAM,IAAA,sBAAa,EAAC,IAAI,EAAE,aAAa,EAAE,oBAAS,CAAC,CAAC;YACpD,MAAM,EAAE,uBAAuB,EAAE,GAAG,2CAAa,YAAY,EAAC,CAAC;YAC/D,MAAM,sBAAsB,GAAG,IAAA,sBAAa,EAC1C,mCAAmC,CACpC,CAAC;YAEF,kGAAkG;YAClG,uBAAuB,CAAC,IAAI,EAAE,sBAAsB,EAAE,kBAAkB,EAAE;gBACxE,kBAAkB,EAAE,8CAA8C;aACnE,CAAC,CAAC;YAEH,IAAA,6BAAoB,EAAC,IAAI,EAAE,oBAAoB,EAAE,CAAC,IAAI,EAAE,EAAE;gBACxD,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;oBACzB,OAAO;iBACR;gBACD,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;gBACvD,MAAM,OAAO,GAAG,iBAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;gBAC1C,MAAM,gBAAgB,GACpB,IAAA,iBAAO,EACL,OAAO,EACP,4FAA4F,CAC7F,CAAC,MAAM,GAAG,CAAC,CAAC;gBACf,IAAI,CAAC,gBAAgB,EAAE;oBACrB,OAAO;iBACR;gBACD,MAAM,8BAA8B,GAAG,IAAA,iBAAO,EAC5C,OAAO,EACP,oIAAoI,CACrI,CAAC,CAAC,CAAC,CAAC;gBACL,IAAI,CAAC,8BAA8B,EAAE;oBACnC,OAAO;iBACR;gBACD,IAAI,GAAG,GAAG,8BAA8B,CAAC,MAAM,EAAE,CAAC;gBAClD,IAAI,YAAY,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,GAAG,CAAC,CAAC,KAAK,GAAG,EAAE;oBAChD,GAAG,EAAE,CAAC;iBACP;gBACD,MAAM,eAAe,GACnB,YAAY,CAAC,KAAK,CAAC,CAAC,EAAE,8BAA8B,CAAC,YAAY,EAAE,CAAC;oBACpE,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBAC1B,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC;YACpC,CAAC,CAAC,CAAC;YAEH,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;SACzB;QAAC,WAAM,GAAE;IACZ,CAAC;CAAA;AA9CD,iCA8CC"}
1
+ {"version":3,"file":"eslint-8-updates.js","sourceRoot":"","sources":["../../../../../../packages/linter/src/migrations/update-13-3-0/eslint-8-updates.ts"],"names":[],"mappings":";;;AAAA,yCAMsB;AACtB,uDAAoD;AACpD,mDAAiD;AAEjD,SAA8B,cAAc,CAAC,IAAU;;QACrD,IAAI;YACF,IAAA,sBAAa,EAAC,IAAI,EAAE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