@nrwl/linter 14.7.18 → 15.0.0-beta.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
- ## [14.7.18](https://github.com/nrwl/nx/compare/14.7.17...14.7.18) (2022-09-28)
6
+ # [15.0.0-beta.0](https://github.com/nrwl/nx/compare/14.8.0...15.0.0-beta.0) (2022-09-28)
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": "14.7.18",
3
+ "version": "15.0.0-beta.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": {
@@ -12,7 +12,6 @@
12
12
  "Monorepo",
13
13
  "Web",
14
14
  "Lint",
15
- "TSLint",
16
15
  "ESLint",
17
16
  "CLI"
18
17
  ],
@@ -34,10 +33,10 @@
34
33
  "eslint": "^8.0.0"
35
34
  },
36
35
  "dependencies": {
37
- "@nrwl/devkit": "14.7.18",
38
- "@nrwl/jest": "14.7.18",
36
+ "@nrwl/devkit": "15.0.0-beta.0",
37
+ "@nrwl/jest": "15.0.0-beta.0",
39
38
  "@phenomnomnominal/tsquery": "4.1.1",
40
- "nx": "14.7.18",
39
+ "nx": "15.0.0-beta.0",
41
40
  "tmp": "~0.2.1",
42
41
  "tslib": "^2.3.0"
43
42
  },
@@ -50,5 +49,5 @@
50
49
  "access": "public"
51
50
  },
52
51
  "types": "./index.d.ts",
53
- "gitHead": "5025c300b72948081218db474fa9fb5b8f741340"
52
+ "gitHead": "40c8859ff039dcf30a8b55a9abfbbfcb38eb4b88"
54
53
  }
@@ -3,70 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.lintInitGenerator = void 0;
4
4
  const devkit_1 = require("@nrwl/devkit");
5
5
  const versions_1 = require("../../utils/versions");
6
- const linter_1 = require("../utils/linter");
7
6
  const eslint_file_1 = require("../utils/eslint-file");
8
- const globalTsLintConfiguration = {
9
- rulesDirectory: ['node_modules/@nrwl/workspace/src/tslint'],
10
- linterOptions: {
11
- exclude: ['**/*'],
12
- },
13
- rules: {
14
- 'arrow-return-shorthand': true,
15
- 'callable-types': true,
16
- 'class-name': true,
17
- deprecation: {
18
- severity: 'warn',
19
- },
20
- forin: true,
21
- 'import-blacklist': [true, 'rxjs/Rx'],
22
- 'interface-over-type-literal': true,
23
- 'member-access': false,
24
- 'member-ordering': [
25
- true,
26
- {
27
- order: [
28
- 'static-field',
29
- 'instance-field',
30
- 'static-method',
31
- 'instance-method',
32
- ],
33
- },
34
- ],
35
- 'no-arg': true,
36
- 'no-bitwise': true,
37
- 'no-console': [true, 'debug', 'info', 'time', 'timeEnd', 'trace'],
38
- 'no-construct': true,
39
- 'no-debugger': true,
40
- 'no-duplicate-super': true,
41
- 'no-empty': false,
42
- 'no-empty-interface': true,
43
- 'no-eval': true,
44
- 'no-inferrable-types': [true, 'ignore-params'],
45
- 'no-misused-new': true,
46
- 'no-non-null-assertion': true,
47
- 'no-shadowed-variable': true,
48
- 'no-string-literal': false,
49
- 'no-string-throw': true,
50
- 'no-switch-case-fall-through': true,
51
- 'no-unnecessary-initializer': true,
52
- 'no-unused-expression': true,
53
- 'no-var-keyword': true,
54
- 'object-literal-sort-keys': false,
55
- 'prefer-const': true,
56
- radix: true,
57
- 'triple-equals': [true, 'allow-null-check'],
58
- 'unified-signatures': true,
59
- 'variable-name': false,
60
- 'nx-enforce-module-boundaries': [
61
- true,
62
- {
63
- enforceBuildableLibDependency: true,
64
- allow: [],
65
- depConstraints: [{ sourceTag: '*', onlyDependOnLibsWithTags: ['*'] }],
66
- },
67
- ],
68
- },
69
- };
70
7
  const getGlobalEsLintConfiguration = (unitTestRunner) => {
71
8
  const config = {
72
9
  root: true,
@@ -138,18 +75,6 @@ const getGlobalEsLintConfiguration = (unitTestRunner) => {
138
75
  }
139
76
  return config;
140
77
  };
141
- function initTsLint(tree, options) {
142
- if (tree.exists('/tslint.json')) {
143
- return () => { };
144
- }
145
- (0, devkit_1.writeJson)(tree, 'tslint.json', globalTsLintConfiguration);
146
- return !options.skipPackageJson
147
- ? (0, devkit_1.addDependenciesToPackageJson)(tree, {}, {
148
- tslint: versions_1.tslintVersion,
149
- '@angular-devkit/build-angular': versions_1.buildAngularVersion,
150
- })
151
- : () => { };
152
- }
153
78
  function addTargetDefaults(tree) {
154
79
  var _a, _b, _c, _d;
155
80
  var _e, _f;
@@ -200,12 +125,7 @@ function initEsLint(tree, options) {
200
125
  : () => { };
201
126
  }
202
127
  function lintInitGenerator(tree, options) {
203
- if (!options.linter || options.linter === linter_1.Linter.EsLint) {
204
- return initEsLint(tree, options);
205
- }
206
- else if (options.linter === linter_1.Linter.TsLint) {
207
- return initTsLint(tree, options);
208
- }
128
+ return initEsLint(tree, options);
209
129
  }
210
130
  exports.lintInitGenerator = lintInitGenerator;
211
131
  //# sourceMappingURL=init.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"init.js","sourceRoot":"","sources":["../../../../../../packages/linter/src/generators/init/init.ts"],"names":[],"mappings":";;;AACA,yCAOsB;AACtB,mDAO8B;AAE9B,4CAAyC;AACzC,sDAAsD;AAStD,MAAM,yBAAyB,GAAG;IAChC,cAAc,EAAE,CAAC,yCAAyC,CAAC;IAC3D,aAAa,EAAE;QACb,OAAO,EAAE,CAAC,MAAM,CAAC;KAClB;IACD,KAAK,EAAE;QACL,wBAAwB,EAAE,IAAI;QAC9B,gBAAgB,EAAE,IAAI;QACtB,YAAY,EAAE,IAAI;QAClB,WAAW,EAAE;YACX,QAAQ,EAAE,MAAM;SACjB;QACD,KAAK,EAAE,IAAI;QACX,kBAAkB,EAAE,CAAC,IAAI,EAAE,SAAS,CAAC;QACrC,6BAA6B,EAAE,IAAI;QACnC,eAAe,EAAE,KAAK;QACtB,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C"}
1
+ {"version":3,"file":"init.js","sourceRoot":"","sources":["../../../../../../packages/linter/src/generators/init/init.ts"],"names":[],"mappings":";;;AACA,yCAOsB;AACtB,mDAK8B;AAG9B,sDAAsD;AAStD,MAAM,4BAA4B,GAAG,CAAC,cAAuB,EAAE,EAAE;IAC/D,MAAM,MAAM,GAAsB;QAChC,IAAI,EAAE,IAAI;QACV,cAAc,EAAE,CAAC,MAAM,CAAC;QACxB,OAAO,EAAE,CAAC,UAAU,CAAC;QACrB;;;;;;WAMG;QACH,SAAS,EAAE;YACT;;;eAGG;YACH;gBACE,KAAK,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC;gBACzC,KAAK,EAAE;oBACL,oCAAoC,EAAE;wBACpC,OAAO;wBACP;4BACE,6BAA6B,EAAE,IAAI;4BACnC,KAAK,EAAE,EAAE;4BACT,cAAc,EAAE;gCACd,EAAE,SAAS,EAAE,GAAG,EAAE,wBAAwB,EAAE,CAAC,GAAG,CAAC,EAAE;6BACpD;yBACF;qBACF;iBACF;aACF;YAED;;;eAGG;YACH;gBACE,KAAK,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;gBACxB,OAAO,EAAE,CAAC,4BAA4B,CAAC;gBACvC;;;mBAGG;gBACH,KAAK,EAAE,EAAE;aACV;YAED;;;eAGG;YACH;gBACE,KAAK,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;gBACxB,OAAO,EAAE,CAAC,4BAA4B,CAAC;gBACvC;;;mBAGG;gBACH,KAAK,EAAE,EAAE;aACV;SACF;KACF,CAAC;IACF,IAAI,cAAc,KAAK,MAAM,EAAE;QAC7B,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC;YACpB,KAAK,EAAE,CAAC,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,CAAC;YAC7D,GAAG,EAAE;gBACH,IAAI,EAAE,IAAI;aACX;YACD,KAAK,EAAE,EAAE;SACV,CAAC,CAAC;KACJ;IACD,O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EAAE;QAC1C,IAAA,mBAAU,EAAC,IAAI,EAAE,yBAAyB,EAAE,CAAC,IAAI,EAAE,EAAE;YACnD,IAAI,CAAC,eAAe,KAApB,IAAI,CAAC,eAAe,GAAK,EAAE,EAAC;YAC5B,MAAM,SAAS,GAAG,wBAAwB,CAAC;YAC3C,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE;gBAC7C,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;aACtC;YACD,OAAO,IAAI,CAAC;QACd,CAAC,CAAC,CAAC;KACJ;IAED,OAAO,CAAC,OAAO,CAAC,eAAe;QAC7B,CAAC,CAAC,IAAA,qCAA4B,EAC1B,IAAI,EACJ,EAAE,EACF;YACE,cAAc,EAAE,oBAAS;YACzB,wBAAwB,EAAE,oBAAS;YACnC,2BAA2B,EAAE,kCAAuB;YACpD,kCAAkC,EAAE,kCAAuB;YAC3D,MAAM,EAAE,wBAAa;YACrB,wBAAwB,EAAE,sCAA2B;SACtD,CACF;QACH,CAAC,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC;AACf,CAAC;AAED,SAAgB,iBAAiB,CAAC,IAAU,EAAE,OAA0B;IACtE,OAAO,UAAU,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AACnC,CAAC;AAFD,8CAEC"}
@@ -3,20 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.lintProjectGenerator = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const devkit_1 = require("@nrwl/devkit");
6
- const linter_1 = require("../utils/linter");
7
6
  const eslint_file_1 = require("../utils/eslint-file");
8
7
  const path_1 = require("path");
9
8
  const init_1 = require("../init/init");
10
- function createTsLintConfiguration(tree, projectConfig) {
11
- (0, devkit_1.writeJson)(tree, (0, path_1.join)(projectConfig.root, `tslint.json`), {
12
- extends: `${(0, devkit_1.offsetFromRoot)(projectConfig.root)}tslint.json`,
13
- // Include project files to be linted since the global one excludes all files.
14
- linterOptions: {
15
- exclude: ['!**/*'],
16
- },
17
- rules: {},
18
- });
19
- }
20
9
  function createEsLintConfiguration(tree, projectConfig, setParserOptionsProject) {
21
10
  const eslintConfig = (0, eslint_file_1.findEslintFile)(tree);
22
11
  (0, devkit_1.writeJson)(tree, (0, path_1.join)(projectConfig.root, `.eslintrc.json`), {
@@ -71,26 +60,14 @@ function lintProjectGenerator(tree, options) {
71
60
  skipPackageJson: options.skipPackageJson,
72
61
  });
73
62
  const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, options.project);
74
- if (options.linter === linter_1.Linter.EsLint) {
75
- projectConfig.targets['lint'] = {
76
- executor: '@nrwl/linter:eslint',
77
- outputs: ['{options.outputFile}'],
78
- options: {
79
- lintFilePatterns: options.eslintFilePatterns,
80
- },
81
- };
82
- createEsLintConfiguration(tree, projectConfig, options.setParserOptionsProject);
83
- }
84
- else {
85
- projectConfig.targets['lint'] = {
86
- executor: '@angular-devkit/build-angular:tslint',
87
- options: {
88
- tsConfig: options.tsConfigPaths,
89
- exclude: ['**/node_modules/**', `!${projectConfig.root}/**/*`],
90
- },
91
- };
92
- createTsLintConfiguration(tree, projectConfig);
93
- }
63
+ projectConfig.targets['lint'] = {
64
+ executor: '@nrwl/linter:eslint',
65
+ outputs: ['{options.outputFile}'],
66
+ options: {
67
+ lintFilePatterns: options.eslintFilePatterns,
68
+ },
69
+ };
70
+ createEsLintConfiguration(tree, projectConfig, options.setParserOptionsProject);
94
71
  (0, devkit_1.updateProjectConfiguration)(tree, options.project, projectConfig);
95
72
  if (!options.skipFormat) {
96
73
  yield (0, devkit_1.formatFiles)(tree);
@@ -1 +1 @@
1
- {"version":3,"file":"lint-project.js","sourceRoot":"","sources":["../../../../../../packages/linter/src/generators/lint-project/lint-project.ts"],"names":[],"mappings":";;;;AACA,yCAMsB;AAEtB,4CAAyC;AACzC,sDAAsD;AACtD,+BAA4B;AAC5B,uCAAiD;AAajD,SAAS,yBAAyB,CAChC,IAA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sources":["../../../../../../packages/linter/src/generators/lint-project/lint-project.ts"],"names":[],"mappings":";;;;AACA,yCAMsB;AAGtB,sDAAsD;AACtD,+BAA4B;AAC5B,uCAAiD;AAajD,SAAS,yBAAyB,CAChC,IAAU,EACV,aAAmC,EACnC,uBAAgC;IAEhC,MAAM,YAAY,GAAG,IAAA,4BAAc,EAAC,IAAI,CAAC,CAAC;IAC1C,IAAA,kBAAS,EAAC,IAAI,EAAE,IAAA,WAAI,EAAC,aAAa,CAAC,IAAI,EAAE,gBAAgB,CAAC,EAAE;QAC1D,OAAO,EAAE,YAAY;YACnB,CAAC,CAAC,CAAC,GAAG,IAAA,uBAAc,EAAC,aAAa,CAAC,IAAI,CAAC,GAAG,YAAY,EAAE,CAAC;YAC1D,CAAC,CAAC,SAAS;QACb,8EAA8E;QAC9E,cAAc,EAAE,CAAC,OAAO,CAAC;QACzB,SAAS,EAAE;YACT;gBACE,KAAK,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC;gBACzC;;;;;;;;;;;;mBAYG;gBACH,aAAa,EAAE,CAAC,uBAAuB;oBACrC,CAAC,CAAC,SAAS;oBACX,CAAC,CAAC;wBACE,OAAO,EAAE,CAAC,GAAG,aAAa,CAAC,IAAI,mBAAmB,CAAC;qBACpD;gBACL;;;mBAGG;gBACH,KAAK,EAAE,EAAE;aACV;YACD;gBACE,KAAK,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;gBACxB,KAAK,EAAE,EAAE;aACV;YACD;gBACE,KAAK,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;gBACxB,KAAK,EAAE,EAAE;aACV;SACF;KACF,CAAC,CAAC;AACL,CAAC;AAED,SAAsB,oBAAoB,CACxC,IAAU,EACV,OAA2B;;QAE3B,MAAM,WAAW,GAAG,IAAA,wBAAiB,EAAC,IAAI,EAAE;YAC1C,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,cAAc,EAAE,OAAO,CAAC,cAAc;YACtC,eAAe,EAAE,OAAO,CAAC,eAAe;SACzC,CAAC,CAAC;QACH,MAAM,aAAa,GAAG,IAAA,iCAAwB,EAAC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;QAEtE,aAAa,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG;YAC9B,QAAQ,EAAE,qBAAqB;YAC/B,OAAO,EAAE,CAAC,sBAAsB,CAAC;YACjC,OAAO,EAAE;gBACP,gBAAgB,EAAE,OAAO,CAAC,kBAAkB;aAC7C;SACF,CAAC;QACF,yBAAyB,CACvB,IAAI,EACJ,aAAa,EACb,OAAO,CAAC,uBAAuB,CAChC,CAAC;QAEF,IAAA,mCAA0B,EAAC,IAAI,EAAE,OAAO,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;QAEjE,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE;YACvB,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;SACzB;QAED,OAAO,WAAW,CAAC;IACrB,CAAC;CAAA;AA/BD,oDA+BC"}
@@ -1,5 +1,4 @@
1
1
  export declare enum Linter {
2
2
  EsLint = "eslint",
3
- TsLint = "tslint",
4
3
  None = "none"
5
4
  }
@@ -4,7 +4,6 @@ exports.Linter = void 0;
4
4
  var Linter;
5
5
  (function (Linter) {
6
6
  Linter["EsLint"] = "eslint";
7
- Linter["TsLint"] = "tslint";
8
7
  Linter["None"] = "none";
9
8
  })(Linter = exports.Linter || (exports.Linter = {}));
10
9
  //# sourceMappingURL=linter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"linter.js","sourceRoot":"","sources":["../../../../../../packages/linter/src/generators/utils/linter.ts"],"names":[],"mappings":";;;AAAA,IAAY,MAIX;AAJD,WAAY,MAAM;IAChB,2BAAiB,CAAA;IACjB,2BAAiB,CAAA;IACjB,uBAAa,CAAA;AACf,CAAC,EAJW,MAAM,GAAN,cAAM,KAAN,cAAM,QAIjB"}
1
+ {"version":3,"file":"linter.js","sourceRoot":"","sources":["../../../../../../packages/linter/src/generators/utils/linter.ts"],"names":[],"mappings":";;;AAAA,IAAY,MAGX;AAHD,WAAY,MAAM;IAChB,2BAAiB,CAAA;IACjB,uBAAa,CAAA;AACf,CAAC,EAHW,MAAM,GAAN,cAAM,KAAN,cAAM,QAGjB"}
@@ -1,5 +1,4 @@
1
1
  export declare const nxVersion: any;
2
- export declare const tslintVersion = "~6.1.0";
3
2
  export declare const tslintToEslintConfigVersion = "^2.13.0";
4
3
  export declare const buildAngularVersion = "~14.2.0";
5
4
  export declare const typescriptESLintVersion = "^5.36.1";
@@ -1,8 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.eslintConfigPrettierVersion = exports.eslintVersion = exports.typescriptESLintVersion = exports.buildAngularVersion = exports.tslintToEslintConfigVersion = exports.tslintVersion = exports.nxVersion = void 0;
3
+ exports.eslintConfigPrettierVersion = exports.eslintVersion = exports.typescriptESLintVersion = exports.buildAngularVersion = exports.tslintToEslintConfigVersion = exports.nxVersion = void 0;
4
4
  exports.nxVersion = require('../../package.json').version;
5
- exports.tslintVersion = '~6.1.0';
6
5
  exports.tslintToEslintConfigVersion = '^2.13.0';
7
6
  exports.buildAngularVersion = '~14.2.0';
8
7
  exports.typescriptESLintVersion = '^5.36.1';
@@ -1 +1 @@
1
- {"version":3,"file":"versions.js","sourceRoot":"","sources":["../../../../../packages/linter/src/utils/versions.ts"],"names":[],"mappings":";;;AAAa,QAAA,SAAS,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC,OAAO,CAAC;AAElD,QAAA,aAAa,GAAG,QAAQ,CAAC;AACzB,QAAA,2BAA2B,GAAG,SAAS,CAAC;AACxC,QAAA,mBAAmB,GAAG,SAAS,CAAC;AAEhC,QAAA,uBAAuB,GAAG,SAAS,CAAC;AACpC,QAAA,aAAa,GAAG,SAAS,CAAC;AAC1B,QAAA,2BAA2B,GAAG,OAAO,CAAC"}
1
+ {"version":3,"file":"versions.js","sourceRoot":"","sources":["../../../../../packages/linter/src/utils/versions.ts"],"names":[],"mappings":";;;AAAa,QAAA,SAAS,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC,OAAO,CAAC;AAElD,QAAA,2BAA2B,GAAG,SAAS,CAAC;AACxC,QAAA,mBAAmB,GAAG,SAAS,CAAC;AAEhC,QAAA,uBAAuB,GAAG,SAAS,CAAC;AACpC,QAAA,aAAa,GAAG,SAAS,CAAC;AAC1B,QAAA,2BAA2B,GAAG,OAAO,CAAC"}