@typescript-eslint/eslint-plugin 8.7.1-alpha.1 → 8.7.1-alpha.11

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.
@@ -38,12 +38,14 @@ This rule reports when an enum member is given a value that is not a literal.
38
38
 
39
39
  ```ts
40
40
  const str = 'Test';
41
+ const string1 = 'string1';
42
+ const string2 = 'string2';
43
+
41
44
  enum Invalid {
42
45
  A = str, // Variable assignment
43
- B = {}, // Object assignment
44
- C = `A template literal string`, // Template literal
45
- D = new Set(1, 2, 3), // Constructor in assignment
46
- E = 2 + 2, // Expression assignment
46
+ B = `Interpolates ${string1} and ${string2}`, // Template literal with interpolation
47
+ C = 2 + 2, // Expression assignment
48
+ D = C, // Assignment to another enum member
47
49
  }
48
50
  ```
49
51
 
@@ -52,11 +54,10 @@ enum Invalid {
52
54
 
53
55
  ```ts
54
56
  enum Valid {
55
- A,
57
+ A, // No initializer; initialized with ascending integers starting from 0
56
58
  B = 'TestStr', // A regular string
57
- C = 4, // A number
58
- D = null,
59
- E = /some_regex/,
59
+ C = `A template literal string`, // A template literal without interpolation
60
+ D = 4, // A number
60
61
  }
61
62
  ```
62
63
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typescript-eslint/eslint-plugin",
3
- "version": "8.7.1-alpha.1",
3
+ "version": "8.7.1-alpha.11",
4
4
  "description": "TypeScript plugin for ESLint",
5
5
  "files": [
6
6
  "dist",
@@ -60,10 +60,10 @@
60
60
  },
61
61
  "dependencies": {
62
62
  "@eslint-community/regexpp": "^4.10.0",
63
- "@typescript-eslint/scope-manager": "8.7.1-alpha.1",
64
- "@typescript-eslint/type-utils": "8.7.1-alpha.1",
65
- "@typescript-eslint/utils": "8.7.1-alpha.1",
66
- "@typescript-eslint/visitor-keys": "8.7.1-alpha.1",
63
+ "@typescript-eslint/scope-manager": "8.7.1-alpha.11",
64
+ "@typescript-eslint/type-utils": "8.7.1-alpha.11",
65
+ "@typescript-eslint/utils": "8.7.1-alpha.11",
66
+ "@typescript-eslint/visitor-keys": "8.7.1-alpha.11",
67
67
  "graphemer": "^1.4.0",
68
68
  "ignore": "^5.3.1",
69
69
  "natural-compare": "^1.4.0",
@@ -74,8 +74,8 @@
74
74
  "@types/marked": "^5.0.2",
75
75
  "@types/mdast": "^4.0.3",
76
76
  "@types/natural-compare": "*",
77
- "@typescript-eslint/rule-schema-to-typescript-types": "8.7.1-alpha.1",
78
- "@typescript-eslint/rule-tester": "8.7.1-alpha.1",
77
+ "@typescript-eslint/rule-schema-to-typescript-types": "8.7.1-alpha.11",
78
+ "@typescript-eslint/rule-tester": "8.7.1-alpha.11",
79
79
  "ajv": "^6.12.6",
80
80
  "cross-env": "^7.0.3",
81
81
  "cross-fetch": "*",