@nrwl/linter 15.0.0-beta.4 → 15.0.0-rc.0

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,6 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- # [15.0.0-beta.4](https://github.com/nrwl/nx/compare/14.8.0...15.0.0-beta.4) (2022-10-11)
6
+ # [15.0.0-rc.0](https://github.com/nrwl/nx/compare/14.8.0...15.0.0-rc.0) (2022-10-12)
7
7
 
8
8
  **Note:** Version bump only for package @nrwl/linter
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nrwl/linter",
3
- "version": "15.0.0-beta.4",
3
+ "version": "15.0.0-rc.0",
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,10 +33,10 @@
33
33
  "eslint": "^8.0.0"
34
34
  },
35
35
  "dependencies": {
36
- "@nrwl/devkit": "15.0.0-beta.4",
37
- "@nrwl/jest": "15.0.0-beta.4",
36
+ "@nrwl/devkit": "15.0.0-rc.0",
37
+ "@nrwl/jest": "15.0.0-rc.0",
38
38
  "@phenomnomnominal/tsquery": "4.1.1",
39
- "nx": "15.0.0-beta.4",
39
+ "nx": "15.0.0-rc.0",
40
40
  "tmp": "~0.2.1",
41
41
  "tslib": "^2.3.0"
42
42
  },
@@ -49,5 +49,5 @@
49
49
  "access": "public"
50
50
  },
51
51
  "types": "./index.d.ts",
52
- "gitHead": "f9e57e26947a53ae5e37f70526451bcd7005331a"
52
+ "gitHead": "0ff93dd5f197141e15265a6d733f7b4e5e36e98e"
53
53
  }
@@ -1,4 +1,6 @@
1
1
  {
2
+ "version": 2,
3
+ "outputCapture": "direct-nodejs",
2
4
  "$schema": "http://json-schema.org/schema",
3
5
  "title": "ESLint Lint Target",
4
6
  "description": "ESLint Lint Target.",
@@ -1,4 +1,6 @@
1
1
  {
2
+ "version": 2,
3
+ "outputCapture": "direct-nodejs",
2
4
  "$schema": "http://json-schema.org/schema",
3
5
  "title": "Lint Target",
4
6
  "description": "Linter.",
@@ -1,2 +1,3 @@
1
1
  import type { Tree } from '@nrwl/devkit';
2
+ export declare const eslintConfigFileWhitelist: string[];
2
3
  export declare function findEslintFile(tree: Tree): string | null;
@@ -1,9 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.findEslintFile = void 0;
4
- const eslintFileList = ['.eslintrc.json', '.eslintrc.js'];
3
+ exports.findEslintFile = exports.eslintConfigFileWhitelist = void 0;
4
+ exports.eslintConfigFileWhitelist = [
5
+ '.eslintrc',
6
+ '.eslintrc.js',
7
+ '.eslintrc.cjs',
8
+ '.eslintrc.yaml',
9
+ '.eslintrc.yml',
10
+ '.eslintrc.json',
11
+ ];
5
12
  function findEslintFile(tree) {
6
- for (const file of eslintFileList) {
13
+ for (const file of exports.eslintConfigFileWhitelist) {
7
14
  if (tree.exists(file)) {
8
15
  return file;
9
16
  }
@@ -1 +1 @@
1
- {"version":3,"file":"eslint-file.js","sourceRoot":"","sources":["../../../../../../packages/linter/src/generators/utils/eslint-file.ts"],"names":[],"mappings":";;;AAEA,MAAM,cAAc,GAAG,CAAC,gBAAgB,EAAE,cAAc,CAAC,CAAC;AAE1D,SAAgB,cAAc,CAAC,IAAU;IACvC,KAAK,MAAM,IAAI,IAAI,cAAc,EAAE;QACjC,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE;YACrB,OAAO,IAAI,CAAC;SACb;KACF;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAPD,wCAOC"}
1
+ {"version":3,"file":"eslint-file.js","sourceRoot":"","sources":["../../../../../../packages/linter/src/generators/utils/eslint-file.ts"],"names":[],"mappings":";;;AAEa,QAAA,yBAAyB,GAAG;IACvC,WAAW;IACX,cAAc;IACd,eAAe;IACf,gBAAgB;IAChB,eAAe;IACf,gBAAgB;CACjB,CAAC;AAEF,SAAgB,cAAc,CAAC,IAAU;IACvC,KAAK,MAAM,IAAI,IAAI,iCAAyB,EAAE;QAC5C,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE;YACrB,OAAO,IAAI,CAAC;SACb;KACF;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AARD,wCAQC"}
@@ -1,2 +1,2 @@
1
1
  import { Tree } from '@nrwl/devkit';
2
- export default function (tree: Tree): Promise<void>;
2
+ export default function addEslintInputs(tree: Tree): Promise<void>;
@@ -3,15 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const devkit_1 = require("@nrwl/devkit");
5
5
  const executor_options_utils_1 = require("@nrwl/workspace/src/utilities/executor-options-utils");
6
- function default_1(tree) {
6
+ const eslint_file_1 = require("../../generators/utils/eslint-file");
7
+ function addEslintInputs(tree) {
7
8
  var _a, _b, _c, _d;
8
9
  var _e;
9
10
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
10
11
  const workspaceConfiguration = (0, devkit_1.readWorkspaceConfiguration)(tree);
11
- const globalEslintFile = ['.eslintrc.js', '.eslintrc.json'].find((file) => tree.exists(file));
12
+ const globalEslintFile = eslint_file_1.eslintConfigFileWhitelist.find((file) => tree.exists(file));
12
13
  if (globalEslintFile && ((_a = workspaceConfiguration.namedInputs) === null || _a === void 0 ? void 0 : _a.production)) {
13
14
  const productionFileset = new Set(workspaceConfiguration.namedInputs.production);
14
- productionFileset.add('!{projectRoot}/.eslintrc.json');
15
+ productionFileset.add(`!{projectRoot}/${globalEslintFile}`);
15
16
  workspaceConfiguration.namedInputs.production =
16
17
  Array.from(productionFileset);
17
18
  }
@@ -29,7 +30,7 @@ function default_1(tree) {
29
30
  yield (0, devkit_1.formatFiles)(tree);
30
31
  });
31
32
  }
32
- exports.default = default_1;
33
+ exports.default = addEslintInputs;
33
34
  function getEslintTargets(tree) {
34
35
  const eslintTargetNames = new Set();
35
36
  (0, executor_options_utils_1.forEachExecutorOptions)(tree, '@nrwl/linter:eslint', (_, __, target) => {
@@ -1 +1 @@
1
- {"version":3,"file":"add-eslint-inputs.js","sourceRoot":"","sources":["../../../../../../packages/linter/src/migrations/update-15-0-0/add-eslint-inputs.ts"],"names":[],"mappings":";;;AAAA,yCAMsB;AACtB,iGAA8F;AAE9F,mBAA+B,IAAU;;;;QACvC,MAAM,sBAAsB,GAAG,IAAA,mCAA0B,EAAC,IAAI,CAAC,CAAC;QAEhE,MAAM,gBAAgB,GAAG,CAAC,cAAc,EAAE,gBAAgB,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CACxE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAClB,CAAC;QAEF,IAAI,gBAAgB,KAAI,MAAA,sBAAsB,CAAC,WAAW,0CAAE,UAAU,CAAA,EAAE;YACtE,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAC/B,sBAAsB,CAAC,WAAW,CAAC,UAAU,CAC9C,CAAC;YACF,iBAAiB,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAC;YACvD,sBAAsB,CAAC,WAAW,CAAC,UAAU;gBAC3C,KAAK,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;SACjC;QAED,KAAK,MAAM,UAAU,IAAI,gBAAgB,CAAC,IAAI,CAAC,EAAE;YAC/C,MAAA,sBAAsB,CAAC,cAAc,oCAArC,sBAAsB,CAAC,cAAc,GAAK,EAAE,EAAC;YAC7C,MAAM,kBAAkB,GAAG,aAAC,sBAAsB,CAAC,cAAc,EAC/D,UAAU,wCAAV,UAAU,IACN,EAAE,EAAC,CAAC;YAEV,MAAA,kBAAkB,CAAC,MAAM,oCAAzB,kBAAkB,CAAC,MAAM,GAAK;gBAC5B,SAAS;gBACT,GAAG,CAAC,gBAAgB;oBAClB,CAAC,CAAC,CAAC,IAAA,0BAAiB,EAAC,iBAAiB,EAAE,gBAAgB,CAAC,CAAC;oBAC1D,CAAC,CAAC,EAAE,CAAC;aACR,EAAC;SACH;QAED,IAAA,qCAA4B,EAAC,IAAI,EAAE,sBAAsB,CAAC,CAAC;QAE3D,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;;CACzB;AAjCD,4BAiCC;AAED,SAAS,gBAAgB,CAAC,IAAU;IAClC,MAAM,iBAAiB,GAAG,IAAI,GAAG,EAAU,CAAC;IAC5C,IAAA,+CAAsB,EAAC,IAAI,EAAE,qBAAqB,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE;QACpE,iBAAiB,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAChC,CAAC,CAAC,CAAC;IACH,OAAO,iBAAiB,CAAC;AAC3B,CAAC"}
1
+ {"version":3,"file":"add-eslint-inputs.js","sourceRoot":"","sources":["../../../../../../packages/linter/src/migrations/update-15-0-0/add-eslint-inputs.ts"],"names":[],"mappings":";;;AAAA,yCAMsB;AACtB,iGAA8F;AAC9F,oEAA+E;AAE/E,SAA8B,eAAe,CAAC,IAAU;;;;QACtD,MAAM,sBAAsB,GAAG,IAAA,mCAA0B,EAAC,IAAI,CAAC,CAAC;QAEhE,MAAM,gBAAgB,GAAG,uCAAyB,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAC/D,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAClB,CAAC;QAEF,IAAI,gBAAgB,KAAI,MAAA,sBAAsB,CAAC,WAAW,0CAAE,UAAU,CAAA,EAAE;YACtE,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAC/B,sBAAsB,CAAC,WAAW,CAAC,UAAU,CAC9C,CAAC;YAEF,iBAAiB,CAAC,GAAG,CAAC,kBAAkB,gBAAgB,EAAE,CAAC,CAAC;YAE5D,sBAAsB,CAAC,WAAW,CAAC,UAAU;gBAC3C,KAAK,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;SACjC;QAED,KAAK,MAAM,UAAU,IAAI,gBAA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