@nx/eslint-plugin 17.3.0-beta.5 → 17.3.0-beta.8

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": "@nx/eslint-plugin",
3
- "version": "17.3.0-beta.5",
3
+ "version": "17.3.0-beta.8",
4
4
  "private": false,
5
5
  "description": "The eslint-plugin package is an ESLint plugin that contains a collection of recommended ESLint rule configurations which you can extend from in your own ESLint configs, as well as an Nx-specific lint rule called enforce-module-boundaries.",
6
6
  "repository": {
@@ -33,8 +33,8 @@
33
33
  }
34
34
  },
35
35
  "dependencies": {
36
- "@nx/devkit": "17.3.0-beta.5",
37
- "@nx/js": "17.3.0-beta.5",
36
+ "@nx/devkit": "17.3.0-beta.8",
37
+ "@nx/js": "17.3.0-beta.8",
38
38
  "@typescript-eslint/type-utils": "^6.13.2",
39
39
  "@typescript-eslint/utils": "^6.13.2",
40
40
  "chalk": "^4.1.0",
@@ -42,7 +42,7 @@
42
42
  "jsonc-eslint-parser": "^2.1.0",
43
43
  "semver": "7.5.3",
44
44
  "tslib": "^2.3.0",
45
- "@nrwl/eslint-plugin-nx": "17.3.0-beta.5"
45
+ "@nrwl/eslint-plugin-nx": "17.3.0-beta.8"
46
46
  },
47
47
  "publishConfig": {
48
48
  "access": "public"
@@ -13,6 +13,9 @@
13
13
  * it should yield a performance improvement but could introduce subtle
14
14
  * breaking changes - we should also look to replace all the @typescript-eslint
15
15
  * related plugins and rules below.
16
+ *
17
+ * TODO: Reevaluate stylistic plugin and added specific rules in the next major
18
+ * version of Nx. Related to https://github.com/nrwl/nx/pull/21066
16
19
  */
17
20
  declare const _default: {
18
21
  env: {
@@ -30,6 +33,19 @@ declare const _default: {
30
33
  '@typescript-eslint/explicit-member-accessibility': string;
31
34
  '@typescript-eslint/explicit-module-boundary-types': string;
32
35
  '@typescript-eslint/explicit-function-return-type': string;
36
+ /**
37
+ * These 3 rules:
38
+ * `no-extra-semi`
39
+ * `@typescript-eslint/no-extra-semi`
40
+ * `@typescript-eslint/no-non-null-assertion`
41
+ * were added to preserve the linting rules that were
42
+ * previously defined v5 of `@typescript-eslint`. v6 of `@typescript-eslint`
43
+ * changed how configurations are defined. This should be reevaluated in
44
+ * the next major version of Nx.
45
+ */
46
+ 'no-extra-semi': string;
47
+ '@typescript-eslint/no-extra-semi': string;
48
+ '@typescript-eslint/no-non-null-assertion': string;
33
49
  '@typescript-eslint/no-parameter-properties': string;
34
50
  /**
35
51
  * Until ESM usage in Node matures, using require in e.g. JS config files
@@ -17,6 +17,9 @@ const isPrettierAvailable = (0, config_utils_1.packageExists)('prettier') && (0,
17
17
  * it should yield a performance improvement but could introduce subtle
18
18
  * breaking changes - we should also look to replace all the @typescript-eslint
19
19
  * related plugins and rules below.
20
+ *
21
+ * TODO: Reevaluate stylistic plugin and added specific rules in the next major
22
+ * version of Nx. Related to https://github.com/nrwl/nx/pull/21066
20
23
  */
21
24
  exports.default = {
22
25
  env: {
@@ -33,12 +36,32 @@ exports.default = {
33
36
  'eslint:recommended',
34
37
  'plugin:@typescript-eslint/eslint-recommended',
35
38
  'plugin:@typescript-eslint/recommended',
39
+ /**
40
+ * This was added to preserve the linting rules that were previously
41
+ * defined v5 of @typescript-eslint. v6 of @typescript-eslint changed
42
+ * how configurations are defined. This should be reevaluated in the
43
+ * next major version of Nx.
44
+ */
45
+ 'plugin:@typescript-eslint/stylistic',
36
46
  ...(isPrettierAvailable ? ['prettier'] : []),
37
47
  ],
38
48
  rules: {
39
49
  '@typescript-eslint/explicit-member-accessibility': 'off',
40
50
  '@typescript-eslint/explicit-module-boundary-types': 'off',
41
51
  '@typescript-eslint/explicit-function-return-type': 'off',
52
+ /**
53
+ * These 3 rules:
54
+ * `no-extra-semi`
55
+ * `@typescript-eslint/no-extra-semi`
56
+ * `@typescript-eslint/no-non-null-assertion`
57
+ * were added to preserve the linting rules that were
58
+ * previously defined v5 of `@typescript-eslint`. v6 of `@typescript-eslint`
59
+ * changed how configurations are defined. This should be reevaluated in
60
+ * the next major version of Nx.
61
+ */
62
+ 'no-extra-semi': 'off',
63
+ '@typescript-eslint/no-extra-semi': 'error',
64
+ '@typescript-eslint/no-non-null-assertion': 'warn',
42
65
  '@typescript-eslint/no-parameter-properties': 'off',
43
66
  /**
44
67
  * Until ESM usage in Node matures, using require in e.g. JS config files
@@ -4,6 +4,9 @@
4
4
  *
5
5
  * It should therefore NOT contain any rules or plugins which are specific
6
6
  * to one ecosystem, such as React, Angular, Node etc.
7
+ *
8
+ * TODO: Reevaluate stylistic plugin and added specific rules in the next major
9
+ * version of Nx. Related to https://github.com/nrwl/nx/pull/21066
7
10
  */
8
11
  declare const _default: {
9
12
  parser: string;
@@ -18,6 +21,19 @@ declare const _default: {
18
21
  '@typescript-eslint/explicit-member-accessibility': string;
19
22
  '@typescript-eslint/explicit-module-boundary-types': string;
20
23
  '@typescript-eslint/explicit-function-return-type': string;
24
+ /**
25
+ * These 3 rules:
26
+ * `no-extra-semi`
27
+ * `@typescript-eslint/no-extra-semi`
28
+ * `@typescript-eslint/no-non-null-assertion`
29
+ * were added to preserve the linting rules that were
30
+ * previously defined v5 of `@typescript-eslint`. v6 of `@typescript-eslint`
31
+ * changed how configurations are defined. This should be reevaluated in
32
+ * the next major version of Nx.
33
+ */
34
+ 'no-extra-semi': string;
35
+ '@typescript-eslint/no-extra-semi': string;
36
+ '@typescript-eslint/no-non-null-assertion': string;
21
37
  '@typescript-eslint/no-parameter-properties': string;
22
38
  };
23
39
  };
@@ -9,6 +9,9 @@ const isPrettierAvailable = (0, config_utils_1.packageExists)('prettier') && (0,
9
9
  *
10
10
  * It should therefore NOT contain any rules or plugins which are specific
11
11
  * to one ecosystem, such as React, Angular, Node etc.
12
+ *
13
+ * TODO: Reevaluate stylistic plugin and added specific rules in the next major
14
+ * version of Nx. Related to https://github.com/nrwl/nx/pull/21066
12
15
  */
13
16
  exports.default = {
14
17
  parser: '@typescript-eslint/parser',
@@ -22,12 +25,32 @@ exports.default = {
22
25
  'eslint:recommended',
23
26
  'plugin:@typescript-eslint/eslint-recommended',
24
27
  'plugin:@typescript-eslint/recommended',
28
+ /**
29
+ * This was added to preserve the linting rules that were previously
30
+ * defined v5 of @typescript-eslint. v6 of @typescript-eslint changed
31
+ * how configurations are defined. This should be reevaluated in the
32
+ * next major version of Nx.
33
+ */
34
+ 'plugin:@typescript-eslint/stylistic',
25
35
  ...(isPrettierAvailable ? ['prettier'] : []),
26
36
  ],
27
37
  rules: {
28
38
  '@typescript-eslint/explicit-member-accessibility': 'off',
29
39
  '@typescript-eslint/explicit-module-boundary-types': 'off',
30
40
  '@typescript-eslint/explicit-function-return-type': 'off',
41
+ /**
42
+ * These 3 rules:
43
+ * `no-extra-semi`
44
+ * `@typescript-eslint/no-extra-semi`
45
+ * `@typescript-eslint/no-non-null-assertion`
46
+ * were added to preserve the linting rules that were
47
+ * previously defined v5 of `@typescript-eslint`. v6 of `@typescript-eslint`
48
+ * changed how configurations are defined. This should be reevaluated in
49
+ * the next major version of Nx.
50
+ */
51
+ 'no-extra-semi': 'off',
52
+ '@typescript-eslint/no-extra-semi': 'error',
53
+ '@typescript-eslint/no-non-null-assertion': 'warn',
31
54
  '@typescript-eslint/no-parameter-properties': 'off',
32
55
  },
33
56
  };
@@ -10,7 +10,7 @@ const runtime_lint_utils_1 = require("../utils/runtime-lint-utils");
10
10
  const package_json_utils_1 = require("../utils/package-json-utils");
11
11
  const utils_1 = require("@typescript-eslint/utils");
12
12
  exports.RULE_NAME = 'dependency-checks';
13
- exports.default = utils_1.ESLintUtils.RuleCreator(() => ``)({
13
+ exports.default = utils_1.ESLintUtils.RuleCreator(() => `https://github.com/nrwl/nx/blob/${devkit_1.NX_VERSION}/docs/generated/packages/eslint-plugin/documents/dependency-checks.md`)({
14
14
  name: exports.RULE_NAME,
15
15
  meta: {
16
16
  type: 'suggestion',
@@ -11,7 +11,7 @@ const ast_utils_1 = require("../utils/ast-utils");
11
11
  const project_graph_utils_1 = require("../utils/project-graph-utils");
12
12
  const utils_2 = require("@typescript-eslint/utils");
13
13
  exports.RULE_NAME = 'enforce-module-boundaries';
14
- exports.default = utils_2.ESLintUtils.RuleCreator(() => ``)({
14
+ exports.default = utils_2.ESLintUtils.RuleCreator(() => `https://github.com/nrwl/nx/blob/${devkit_1.NX_VERSION}/docs/generated/packages/eslint-plugin/documents/enforce-module-boundaries.md`)({
15
15
  name: exports.RULE_NAME,
16
16
  meta: {
17
17
  type: 'suggestion',
@@ -1,10 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.readProjectGraph = exports.ensureGlobalProjectGraph = void 0;
4
- const tslib_1 = require("tslib");
5
4
  const devkit_1 = require("@nx/devkit");
6
5
  const runtime_lint_utils_1 = require("./runtime-lint-utils");
7
- const chalk = tslib_1.__importStar(require("chalk"));
6
+ const chalk = require("chalk");
8
7
  const find_project_for_path_1 = require("nx/src/project-graph/utils/find-project-for-path");
9
8
  const configuration_1 = require("nx/src/config/configuration");
10
9
  const internal_1 = require("@nx/js/src/internal");