@nx/eslint-plugin 17.3.0 → 17.3.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": "@nx/eslint-plugin",
3
- "version": "17.3.0",
3
+ "version": "17.3.1",
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",
37
- "@nx/js": "17.3.0",
36
+ "@nx/devkit": "17.3.1",
37
+ "@nx/js": "17.3.1",
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"
45
+ "@nrwl/eslint-plugin-nx": "17.3.1"
46
46
  },
47
47
  "publishConfig": {
48
48
  "access": "public"
@@ -1,10 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- let angularEslintPlugin;
4
- try {
5
- angularEslintPlugin = require('@angular-eslint/eslint-plugin');
6
- }
7
- catch { }
8
3
  /**
9
4
  * This configuration is intended to be applied to ALL .ts files in Angular
10
5
  * projects within an Nx workspace.
@@ -23,16 +18,7 @@ exports.default = {
23
18
  node: true,
24
19
  },
25
20
  plugins: ['@angular-eslint'],
26
- extends: [
27
- 'plugin:@angular-eslint/recommended',
28
- /**
29
- * TODO: Consider dropping this extends and explicitly carrying over rules we care about
30
- * into our typescript preset in v13
31
- */
32
- ...(angularEslintPlugin?.configs?.['recommended--extra']
33
- ? ['plugin:@angular-eslint/recommended--extra']
34
- : []),
35
- ],
21
+ extends: ['plugin:@angular-eslint/recommended'],
36
22
  parserOptions: {
37
23
  // Unset the default value for parserOptions.project that is found in earlier versions of @angular-eslint
38
24
  project: [],
@@ -13,9 +13,6 @@
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
19
16
  */
20
17
  declare const _default: {
21
18
  env: {
@@ -33,19 +30,6 @@ declare const _default: {
33
30
  '@typescript-eslint/explicit-member-accessibility': string;
34
31
  '@typescript-eslint/explicit-module-boundary-types': string;
35
32
  '@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;
49
33
  '@typescript-eslint/no-parameter-properties': string;
50
34
  /**
51
35
  * Until ESM usage in Node matures, using require in e.g. JS config files
@@ -53,6 +37,26 @@ declare const _default: {
53
37
  * having to frequently use "eslint-disable-next-line" in their configs.
54
38
  */
55
39
  '@typescript-eslint/no-var-requires': string;
40
+ /**
41
+ * From https://typescript-eslint.io/blog/announcing-typescript-eslint-v6/#updated-configuration-rules
42
+ *
43
+ * The following rules were added to preserve the linting rules that were
44
+ * previously defined v5 of `@typescript-eslint`. v6 of `@typescript-eslint`
45
+ * changed how configurations are defined.
46
+ *
47
+ * TODO(v19): re-evalute these deviations from @typescript-eslint/recommended in v19 of Nx
48
+ */
49
+ 'no-extra-semi': string;
50
+ '@typescript-eslint/no-extra-semi': string;
51
+ '@typescript-eslint/no-non-null-assertion': string;
52
+ '@typescript-eslint/adjacent-overload-signatures': string;
53
+ '@typescript-eslint/prefer-namespace-keyword': string;
54
+ 'no-empty-function': string;
55
+ '@typescript-eslint/no-empty-function': string;
56
+ '@typescript-eslint/no-inferrable-types': string;
57
+ '@typescript-eslint/no-unused-vars': string;
58
+ '@typescript-eslint/no-empty-interface': string;
59
+ '@typescript-eslint/no-explicit-any': string;
56
60
  };
57
61
  };
58
62
  export default _default;
@@ -17,9 +17,6 @@ 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
23
20
  */
24
21
  exports.default = {
25
22
  env: {
@@ -36,32 +33,12 @@ exports.default = {
36
33
  'eslint:recommended',
37
34
  'plugin:@typescript-eslint/eslint-recommended',
38
35
  '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',
46
36
  ...(isPrettierAvailable ? ['prettier'] : []),
47
37
  ],
48
38
  rules: {
49
39
  '@typescript-eslint/explicit-member-accessibility': 'off',
50
40
  '@typescript-eslint/explicit-module-boundary-types': 'off',
51
41
  '@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',
65
42
  '@typescript-eslint/no-parameter-properties': 'off',
66
43
  /**
67
44
  * Until ESM usage in Node matures, using require in e.g. JS config files
@@ -69,5 +46,25 @@ exports.default = {
69
46
  * having to frequently use "eslint-disable-next-line" in their configs.
70
47
  */
71
48
  '@typescript-eslint/no-var-requires': 'off',
49
+ /**
50
+ * From https://typescript-eslint.io/blog/announcing-typescript-eslint-v6/#updated-configuration-rules
51
+ *
52
+ * The following rules were added to preserve the linting rules that were
53
+ * previously defined v5 of `@typescript-eslint`. v6 of `@typescript-eslint`
54
+ * changed how configurations are defined.
55
+ *
56
+ * TODO(v19): re-evalute these deviations from @typescript-eslint/recommended in v19 of Nx
57
+ */
58
+ 'no-extra-semi': 'off',
59
+ '@typescript-eslint/no-extra-semi': 'error',
60
+ '@typescript-eslint/no-non-null-assertion': 'warn',
61
+ '@typescript-eslint/adjacent-overload-signatures': 'error',
62
+ '@typescript-eslint/prefer-namespace-keyword': 'error',
63
+ 'no-empty-function': 'off',
64
+ '@typescript-eslint/no-empty-function': 'error',
65
+ '@typescript-eslint/no-inferrable-types': 'error',
66
+ '@typescript-eslint/no-unused-vars': 'warn',
67
+ '@typescript-eslint/no-empty-interface': 'error',
68
+ '@typescript-eslint/no-explicit-any': 'warn',
72
69
  },
73
70
  };
@@ -4,9 +4,6 @@
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
10
7
  */
11
8
  declare const _default: {
12
9
  parser: string;
@@ -21,20 +18,27 @@ declare const _default: {
21
18
  '@typescript-eslint/explicit-member-accessibility': string;
22
19
  '@typescript-eslint/explicit-module-boundary-types': string;
23
20
  '@typescript-eslint/explicit-function-return-type': string;
21
+ '@typescript-eslint/no-parameter-properties': string;
24
22
  /**
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
23
+ * From https://typescript-eslint.io/blog/announcing-typescript-eslint-v6/#updated-configuration-rules
24
+ *
25
+ * The following rules were added to preserve the linting rules that were
30
26
  * 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.
27
+ * changed how configurations are defined.
28
+ *
29
+ * TODO(v19): re-evalute these deviations from @typescript-eslint/recommended in v19 of Nx
33
30
  */
34
31
  'no-extra-semi': string;
35
32
  '@typescript-eslint/no-extra-semi': string;
36
33
  '@typescript-eslint/no-non-null-assertion': string;
37
- '@typescript-eslint/no-parameter-properties': string;
34
+ '@typescript-eslint/adjacent-overload-signatures': string;
35
+ '@typescript-eslint/prefer-namespace-keyword': string;
36
+ 'no-empty-function': string;
37
+ '@typescript-eslint/no-empty-function': string;
38
+ '@typescript-eslint/no-inferrable-types': string;
39
+ '@typescript-eslint/no-unused-vars': string;
40
+ '@typescript-eslint/no-empty-interface': string;
41
+ '@typescript-eslint/no-explicit-any': string;
38
42
  };
39
43
  };
40
44
  export default _default;
@@ -9,9 +9,6 @@ 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
15
12
  */
16
13
  exports.default = {
17
14
  parser: '@typescript-eslint/parser',
@@ -25,32 +22,32 @@ exports.default = {
25
22
  'eslint:recommended',
26
23
  'plugin:@typescript-eslint/eslint-recommended',
27
24
  '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',
35
25
  ...(isPrettierAvailable ? ['prettier'] : []),
36
26
  ],
37
27
  rules: {
38
28
  '@typescript-eslint/explicit-member-accessibility': 'off',
39
29
  '@typescript-eslint/explicit-module-boundary-types': 'off',
40
30
  '@typescript-eslint/explicit-function-return-type': 'off',
31
+ '@typescript-eslint/no-parameter-properties': 'off',
41
32
  /**
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
33
+ * From https://typescript-eslint.io/blog/announcing-typescript-eslint-v6/#updated-configuration-rules
34
+ *
35
+ * The following rules were added to preserve the linting rules that were
47
36
  * 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.
37
+ * changed how configurations are defined.
38
+ *
39
+ * TODO(v19): re-evalute these deviations from @typescript-eslint/recommended in v19 of Nx
50
40
  */
51
41
  'no-extra-semi': 'off',
52
42
  '@typescript-eslint/no-extra-semi': 'error',
53
43
  '@typescript-eslint/no-non-null-assertion': 'warn',
54
- '@typescript-eslint/no-parameter-properties': 'off',
44
+ '@typescript-eslint/adjacent-overload-signatures': 'error',
45
+ '@typescript-eslint/prefer-namespace-keyword': 'error',
46
+ 'no-empty-function': 'off',
47
+ '@typescript-eslint/no-empty-function': 'error',
48
+ '@typescript-eslint/no-inferrable-types': 'error',
49
+ '@typescript-eslint/no-unused-vars': 'warn',
50
+ '@typescript-eslint/no-empty-interface': 'error',
51
+ '@typescript-eslint/no-explicit-any': 'warn',
55
52
  },
56
53
  };