eslint-plugin-ts-std-forge 0.1.17 → 0.1.18
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": "eslint-plugin-ts-std-forge",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.18",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "ESLint rules that steer code toward ts-std-forge idioms.",
|
|
6
6
|
"keywords": [
|
|
@@ -35,21 +35,21 @@
|
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@typescript-eslint/utils": "^8.72.0",
|
|
38
|
-
"eslint-rule-forge": "^0.5.
|
|
39
|
-
"ts-std-forge": "0.5.
|
|
38
|
+
"eslint-rule-forge": "^0.5.1",
|
|
39
|
+
"ts-std-forge": "0.5.3",
|
|
40
40
|
"ts-type-forge": "~9.2.2"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@typescript-eslint/parser": "8.72.0",
|
|
44
44
|
"@typescript-eslint/rule-tester": "8.72.0",
|
|
45
45
|
"dedent": "1.7.2",
|
|
46
|
-
"eslint-config-typed": "7.
|
|
47
|
-
"eslint-plugin-ts-fortress": "1.3.
|
|
48
|
-
"eslint-plugin-ts-type-forge": "0.8.
|
|
46
|
+
"eslint-config-typed": "7.4.0",
|
|
47
|
+
"eslint-plugin-ts-fortress": "1.3.13",
|
|
48
|
+
"eslint-plugin-ts-type-forge": "0.8.18",
|
|
49
49
|
"prettier": "3.9.10",
|
|
50
50
|
"prettier-plugin-organize-imports": "4.3.0",
|
|
51
51
|
"prettier-plugin-packagejson": "3.0.2",
|
|
52
|
-
"ts-repo-utils": "10.7.
|
|
52
|
+
"ts-repo-utils": "10.7.2"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
55
|
"eslint": ">=9.0.0",
|
|
@@ -399,6 +399,42 @@ describe('prefer-safe-array-length-guard and the import it adds', () => {
|
|
|
399
399
|
output: null,
|
|
400
400
|
errors: [{ messageId: 'useIsNonEmpty' }],
|
|
401
401
|
},
|
|
402
|
+
{
|
|
403
|
+
name: 'a type parameter of the name does not take the value',
|
|
404
|
+
code: dedent`
|
|
405
|
+
declare const xs: readonly number[];
|
|
406
|
+
function f<SafeArray>() {
|
|
407
|
+
return xs.length > 0;
|
|
408
|
+
}
|
|
409
|
+
`,
|
|
410
|
+
output: dedent`
|
|
411
|
+
import { SafeArray } from 'ts-std-forge';
|
|
412
|
+
declare const xs: readonly number[];
|
|
413
|
+
function f<SafeArray>() {
|
|
414
|
+
return SafeArray.isNonEmpty(xs);
|
|
415
|
+
}
|
|
416
|
+
`,
|
|
417
|
+
errors: [{ messageId: 'useIsNonEmpty' }],
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
name: 'a local type alias of the name does not take the value',
|
|
421
|
+
code: dedent`
|
|
422
|
+
declare const xs: readonly number[];
|
|
423
|
+
function f() {
|
|
424
|
+
type SafeArray = number;
|
|
425
|
+
return xs.length > 0;
|
|
426
|
+
}
|
|
427
|
+
`,
|
|
428
|
+
output: dedent`
|
|
429
|
+
import { SafeArray } from 'ts-std-forge';
|
|
430
|
+
declare const xs: readonly number[];
|
|
431
|
+
function f() {
|
|
432
|
+
type SafeArray = number;
|
|
433
|
+
return SafeArray.isNonEmpty(xs);
|
|
434
|
+
}
|
|
435
|
+
`,
|
|
436
|
+
errors: [{ messageId: 'useIsNonEmpty' }],
|
|
437
|
+
},
|
|
402
438
|
],
|
|
403
439
|
});
|
|
404
440
|
});
|