eslint-config-deepcrawl 13.7.0 → 13.8.0

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.
Files changed (2) hide show
  1. package/index.js +46 -49
  2. package/package.json +8 -8
package/index.js CHANGED
@@ -30,55 +30,6 @@ module.exports = {
30
30
  default: "array-simple",
31
31
  },
32
32
  ],
33
- "@typescript-eslint/ban-types": [
34
- "error",
35
- {
36
- extendDefaults: false,
37
- types: {
38
- String: {
39
- message: "Use string instead",
40
- fixWith: "string",
41
- },
42
- Boolean: {
43
- message: "Use boolean instead",
44
- fixWith: "boolean",
45
- },
46
- Number: {
47
- message: "Use number instead",
48
- fixWith: "number",
49
- },
50
- Symbol: {
51
- message: "Use symbol instead",
52
- fixWith: "symbol",
53
- },
54
- BigInt: {
55
- message: "Use bigint instead",
56
- fixWith: "bigint",
57
- },
58
- // object typing
59
- Object: {
60
- message: [
61
- 'The `Object` type actually means "any non-nullish value", so it is marginally better than `unknown`.',
62
- '- If you want a type meaning "any object", you probably want `Record<string, unknown>` instead.',
63
- '- If you want a type meaning "any value", you probably want `unknown` instead.',
64
- ].join('\n'),
65
- },
66
- '{}': {
67
- message: [
68
- '`{}` actually means "any non-nullish value".',
69
- '- If you want a type meaning "any object", you probably want `Record<string, unknown>` instead.',
70
- '- If you want a type meaning "any value", you probably want `unknown` instead.',
71
- ].join('\n'),
72
- },
73
- object: {
74
- message: [
75
- 'The `object` type is currently hard to use ([see this issue](https://github.com/microsoft/TypeScript/issues/21732)).',
76
- 'Consider using `Record<string, unknown>` instead, as it allows you to more easily inspect and use the keys.',
77
- ].join('\n'),
78
- },
79
- },
80
- },
81
- ],
82
33
  "@typescript-eslint/consistent-type-assertions": [
83
34
  "error",
84
35
  {
@@ -112,6 +63,10 @@ module.exports = {
112
63
  leadingUnderscore: "allow",
113
64
  trailingUnderscore: "allow",
114
65
  },
66
+ {
67
+ selector: "import",
68
+ format: ["camelCase", "PascalCase", "snake_case"],
69
+ },
115
70
  {
116
71
  selector: "variable",
117
72
  format: ["camelCase", "PascalCase", "UPPER_CASE"],
@@ -190,6 +145,47 @@ module.exports = {
190
145
  ],
191
146
  "@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error",
192
147
  "@typescript-eslint/no-non-null-assertion": "error",
148
+ "@typescript-eslint/no-restricted-types": [
149
+ "error",
150
+ {
151
+ types: {
152
+ String: {
153
+ message: "Use string instead",
154
+ fixWith: "string",
155
+ },
156
+ Boolean: {
157
+ message: "Use boolean instead",
158
+ fixWith: "boolean",
159
+ },
160
+ Number: {
161
+ message: "Use number instead",
162
+ fixWith: "number",
163
+ },
164
+ Symbol: {
165
+ message: "Use symbol instead",
166
+ fixWith: "symbol",
167
+ },
168
+ BigInt: {
169
+ message: "Use bigint instead",
170
+ fixWith: "bigint",
171
+ },
172
+ // object typing
173
+ Object: {
174
+ message: [
175
+ 'The `Object` type actually means "any non-nullish value", so it is marginally better than `unknown`.',
176
+ '- If you want a type meaning "any object", you probably want `Record<string, unknown>` instead.',
177
+ '- If you want a type meaning "any value", you probably want `unknown` instead.',
178
+ ].join('\n'),
179
+ },
180
+ object: {
181
+ message: [
182
+ 'The `object` type is currently hard to use ([see this issue](https://github.com/microsoft/TypeScript/issues/21732)).',
183
+ 'Consider using `Record<string, unknown>` instead, as it allows you to more easily inspect and use the keys.',
184
+ ].join('\n'),
185
+ },
186
+ },
187
+ },
188
+ ],
193
189
  "@typescript-eslint/no-this-alias": [
194
190
  "error",
195
191
  {
@@ -201,6 +197,7 @@ module.exports = {
201
197
  "@typescript-eslint/no-unsafe-assignment": "off",
202
198
  "@typescript-eslint/no-unsafe-call": "off",
203
199
  "@typescript-eslint/no-unsafe-enum-comparison": "off",
200
+ "@typescript-eslint/no-unsafe-function-type": "off",
204
201
  "@typescript-eslint/no-unsafe-member-access": "off",
205
202
  "@typescript-eslint/no-unsafe-return": "off",
206
203
  "@typescript-eslint/no-unused-vars": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-deepcrawl",
3
- "version": "13.7.0",
3
+ "version": "13.8.0",
4
4
  "description": "ESLint rules recommended by DeepCrawl.",
5
5
  "homepage": "https://github.com/deepcrawl/eslint-config",
6
6
  "bugs": {
@@ -20,22 +20,22 @@
20
20
  "registry": "https://registry.npmjs.org/"
21
21
  },
22
22
  "dependencies": {
23
- "@typescript-eslint/eslint-plugin": "^7.16.1",
24
- "@typescript-eslint/parser": "^7.16.1",
23
+ "@typescript-eslint/eslint-plugin": "^8.1.0",
24
+ "@typescript-eslint/parser": "^8.1.0",
25
25
  "eslint-config-prettier": "^9.1.0",
26
26
  "eslint-plugin-array-func": "^4.0.0",
27
27
  "eslint-plugin-import": "^2.29.1",
28
- "eslint-plugin-jest": "^28.6.0",
28
+ "eslint-plugin-jest": "^28.8.0",
29
29
  "eslint-plugin-jest-formatting": "3.1.0",
30
30
  "eslint-plugin-json-format": "^2.0.1",
31
- "eslint-plugin-n": "^17.9.0",
31
+ "eslint-plugin-n": "^17.10.2",
32
32
  "eslint-plugin-no-loops": "^0.3.0",
33
- "eslint-plugin-promise": "^6.4.0",
34
- "eslint-plugin-sonarjs": "^1.0.4-alpha.1"
33
+ "eslint-plugin-promise": "^7.1.0",
34
+ "eslint-plugin-sonarjs": "^1.0.4"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "eslint": "^8.57.0",
38
38
  "typescript": ">=5.2"
39
39
  },
40
- "packageManager": "yarn@4.3.1"
40
+ "packageManager": "yarn@4.4.0"
41
41
  }