eslint-plugin-typefest 1.0.1 → 1.0.2
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/CHANGELOG.md +4736 -1234
- package/README.md +4 -7
- package/dist/plugin.cjs +13 -9
- package/dist/plugin.cjs.map +2 -2
- package/docs/rules/guides/snapshot-testing.md +1 -1
- package/docs/rules/presets/all.md +83 -78
- package/docs/rules/presets/minimal.md +18 -13
- package/docs/rules/presets/recommended-type-checked.md +76 -9
- package/docs/rules/presets/recommended.md +64 -59
- package/docs/rules/presets/strict.md +80 -74
- package/docs/rules/presets/ts-extras-type-guards.md +26 -21
- package/docs/rules/presets/type-fest-types.md +49 -44
- package/package.json +13 -9
|
@@ -22,77 +22,83 @@ export default [typefest.configs.strict];
|
|
|
22
22
|
|
|
23
23
|
## Rules in this preset
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
|
31
|
-
|
|
|
32
|
-
| [`prefer-ts-extras-array-
|
|
33
|
-
| [`prefer-ts-extras-
|
|
34
|
-
| [`prefer-ts-extras-
|
|
35
|
-
| [`prefer-ts-extras-
|
|
36
|
-
| [`prefer-ts-extras-
|
|
37
|
-
| [`prefer-ts-extras-
|
|
38
|
-
| [`prefer-ts-extras-
|
|
39
|
-
| [`prefer-ts-extras-
|
|
40
|
-
| [`prefer-ts-extras-
|
|
41
|
-
| [`prefer-ts-extras-
|
|
42
|
-
| [`prefer-ts-extras-
|
|
43
|
-
| [`prefer-ts-extras-is-
|
|
44
|
-
| [`prefer-ts-extras-is-
|
|
45
|
-
| [`prefer-ts-extras-is-
|
|
46
|
-
| [`prefer-ts-extras-
|
|
47
|
-
| [`prefer-ts-extras-
|
|
48
|
-
| [`prefer-ts-extras-
|
|
49
|
-
| [`prefer-ts-extras-
|
|
50
|
-
| [`prefer-ts-extras-
|
|
51
|
-
| [`prefer-ts-extras-
|
|
52
|
-
| [`prefer-ts-extras-
|
|
53
|
-
| [`prefer-ts-extras-
|
|
54
|
-
| [`prefer-ts-extras-
|
|
55
|
-
| [`prefer-ts-extras-
|
|
56
|
-
| [`prefer-ts-extras-
|
|
57
|
-
| [`prefer-
|
|
58
|
-
| [`prefer-
|
|
59
|
-
| [`prefer-
|
|
60
|
-
| [`prefer-
|
|
61
|
-
| [`prefer-
|
|
62
|
-
| [`prefer-
|
|
63
|
-
| [`prefer-type-fest-
|
|
64
|
-
| [`prefer-type-fest-
|
|
65
|
-
| [`prefer-type-fest-
|
|
66
|
-
| [`prefer-type-fest-
|
|
67
|
-
| [`prefer-type-fest-
|
|
68
|
-
| [`prefer-type-fest-
|
|
69
|
-
| [`prefer-type-fest-
|
|
70
|
-
| [`prefer-type-fest-
|
|
71
|
-
| [`prefer-type-fest-
|
|
72
|
-
| [`prefer-type-fest-
|
|
73
|
-
| [`prefer-type-fest-
|
|
74
|
-
| [`prefer-type-fest-
|
|
75
|
-
| [`prefer-type-fest-
|
|
76
|
-
| [`prefer-type-fest-
|
|
77
|
-
| [`prefer-type-fest-
|
|
78
|
-
| [`prefer-type-fest-
|
|
79
|
-
| [`prefer-type-fest-
|
|
80
|
-
| [`prefer-type-fest-
|
|
81
|
-
| [`prefer-type-fest-
|
|
82
|
-
| [`prefer-type-fest-
|
|
83
|
-
| [`prefer-type-fest-
|
|
84
|
-
| [`prefer-type-fest-
|
|
85
|
-
| [`prefer-type-fest-
|
|
86
|
-
| [`prefer-type-fest-
|
|
87
|
-
| [`prefer-type-fest-
|
|
88
|
-
| [`prefer-type-fest-
|
|
89
|
-
| [`prefer-type-fest-
|
|
90
|
-
| [`prefer-type-fest-
|
|
91
|
-
| [`prefer-type-fest-
|
|
92
|
-
| [`prefer-type-fest-
|
|
93
|
-
| [`prefer-type-fest-
|
|
94
|
-
| [`prefer-type-fest-
|
|
95
|
-
| [`prefer-type-fest-
|
|
96
|
-
| [`prefer-type-fest-
|
|
97
|
-
| [`prefer-type-fest-
|
|
98
|
-
| [`prefer-type-fest-
|
|
25
|
+
- `Fix` legend:
|
|
26
|
+
- `🔧` = autofixable
|
|
27
|
+
- `💡` = suggestions available
|
|
28
|
+
- `—` = report only
|
|
29
|
+
|
|
30
|
+
| Rule | Fix |
|
|
31
|
+
| --- | :-: |
|
|
32
|
+
| [`prefer-ts-extras-array-at`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-array-at) | 🔧 |
|
|
33
|
+
| [`prefer-ts-extras-array-concat`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-array-concat) | 🔧 |
|
|
34
|
+
| [`prefer-ts-extras-array-find-last`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-array-find-last) | 🔧 |
|
|
35
|
+
| [`prefer-ts-extras-array-first`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-array-first) | 🔧 💡 |
|
|
36
|
+
| [`prefer-ts-extras-array-includes`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-array-includes) | 🔧 💡 |
|
|
37
|
+
| [`prefer-ts-extras-array-join`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-array-join) | 🔧 |
|
|
38
|
+
| [`prefer-ts-extras-array-last`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-array-last) | 🔧 💡 |
|
|
39
|
+
| [`prefer-ts-extras-as-writable`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-as-writable) | 🔧 |
|
|
40
|
+
| [`prefer-ts-extras-assert-defined`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-assert-defined) | 🔧 💡 |
|
|
41
|
+
| [`prefer-ts-extras-assert-error`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-assert-error) | 💡 |
|
|
42
|
+
| [`prefer-ts-extras-assert-present`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-assert-present) | 🔧 💡 |
|
|
43
|
+
| [`prefer-ts-extras-is-defined`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-is-defined) | 🔧 |
|
|
44
|
+
| [`prefer-ts-extras-is-defined-filter`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-is-defined-filter) | 🔧 |
|
|
45
|
+
| [`prefer-ts-extras-is-empty`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-is-empty) | 🔧 |
|
|
46
|
+
| [`prefer-ts-extras-is-finite`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-is-finite) | 🔧 |
|
|
47
|
+
| [`prefer-ts-extras-is-infinite`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-is-infinite) | 🔧 |
|
|
48
|
+
| [`prefer-ts-extras-is-integer`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-is-integer) | 🔧 |
|
|
49
|
+
| [`prefer-ts-extras-is-present`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-is-present) | 🔧 |
|
|
50
|
+
| [`prefer-ts-extras-is-present-filter`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-is-present-filter) | 🔧 |
|
|
51
|
+
| [`prefer-ts-extras-is-safe-integer`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-is-safe-integer) | 🔧 |
|
|
52
|
+
| [`prefer-ts-extras-key-in`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-key-in) | 🔧 |
|
|
53
|
+
| [`prefer-ts-extras-not`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-not) | 🔧 |
|
|
54
|
+
| [`prefer-ts-extras-object-entries`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-object-entries) | 🔧 |
|
|
55
|
+
| [`prefer-ts-extras-object-from-entries`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-object-from-entries) | 🔧 |
|
|
56
|
+
| [`prefer-ts-extras-object-has-in`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-object-has-in) | 🔧 💡 |
|
|
57
|
+
| [`prefer-ts-extras-object-has-own`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-object-has-own) | 🔧 💡 |
|
|
58
|
+
| [`prefer-ts-extras-object-keys`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-object-keys) | 🔧 |
|
|
59
|
+
| [`prefer-ts-extras-object-values`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-object-values) | 🔧 |
|
|
60
|
+
| [`prefer-ts-extras-safe-cast-to`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-safe-cast-to) | 🔧 |
|
|
61
|
+
| [`prefer-ts-extras-set-has`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-set-has) | 🔧 💡 |
|
|
62
|
+
| [`prefer-ts-extras-string-split`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-string-split) | 🔧 |
|
|
63
|
+
| [`prefer-type-fest-abstract-constructor`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-abstract-constructor) | 🔧 |
|
|
64
|
+
| [`prefer-type-fest-arrayable`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-arrayable) | 🔧 |
|
|
65
|
+
| [`prefer-type-fest-async-return-type`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-async-return-type) | 🔧 |
|
|
66
|
+
| [`prefer-type-fest-conditional-pick`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-conditional-pick) | 🔧 |
|
|
67
|
+
| [`prefer-type-fest-constructor`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-constructor) | 🔧 |
|
|
68
|
+
| [`prefer-type-fest-except`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-except) | 🔧 |
|
|
69
|
+
| [`prefer-type-fest-if`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-if) | 🔧 |
|
|
70
|
+
| [`prefer-type-fest-iterable-element`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-iterable-element) | 🔧 |
|
|
71
|
+
| [`prefer-type-fest-json-array`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-json-array) | 🔧 |
|
|
72
|
+
| [`prefer-type-fest-json-object`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-json-object) | 🔧 |
|
|
73
|
+
| [`prefer-type-fest-json-primitive`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-json-primitive) | 🔧 |
|
|
74
|
+
| [`prefer-type-fest-json-value`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-json-value) | 💡 |
|
|
75
|
+
| [`prefer-type-fest-keys-of-union`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-keys-of-union) | 🔧 |
|
|
76
|
+
| [`prefer-type-fest-literal-union`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-literal-union) | 🔧 |
|
|
77
|
+
| [`prefer-type-fest-merge-exclusive`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-merge-exclusive) | 🔧 |
|
|
78
|
+
| [`prefer-type-fest-non-empty-tuple`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-non-empty-tuple) | 🔧 |
|
|
79
|
+
| [`prefer-type-fest-omit-index-signature`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-omit-index-signature) | 🔧 |
|
|
80
|
+
| [`prefer-type-fest-partial-deep`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-partial-deep) | 🔧 |
|
|
81
|
+
| [`prefer-type-fest-primitive`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-primitive) | 🔧 |
|
|
82
|
+
| [`prefer-type-fest-promisable`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-promisable) | 🔧 |
|
|
83
|
+
| [`prefer-type-fest-readonly-deep`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-readonly-deep) | 🔧 |
|
|
84
|
+
| [`prefer-type-fest-require-all-or-none`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-require-all-or-none) | 🔧 |
|
|
85
|
+
| [`prefer-type-fest-require-at-least-one`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-require-at-least-one) | 🔧 |
|
|
86
|
+
| [`prefer-type-fest-require-exactly-one`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-require-exactly-one) | 🔧 |
|
|
87
|
+
| [`prefer-type-fest-require-one-or-none`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-require-one-or-none) | 🔧 |
|
|
88
|
+
| [`prefer-type-fest-required-deep`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-required-deep) | 🔧 |
|
|
89
|
+
| [`prefer-type-fest-schema`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-schema) | 🔧 |
|
|
90
|
+
| [`prefer-type-fest-set-non-nullable`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-set-non-nullable) | 🔧 |
|
|
91
|
+
| [`prefer-type-fest-set-optional`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-set-optional) | 🔧 |
|
|
92
|
+
| [`prefer-type-fest-set-readonly`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-set-readonly) | 🔧 |
|
|
93
|
+
| [`prefer-type-fest-set-required`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-set-required) | 🔧 |
|
|
94
|
+
| [`prefer-type-fest-simplify`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-simplify) | 🔧 |
|
|
95
|
+
| [`prefer-type-fest-tagged-brands`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-tagged-brands) | 🔧 |
|
|
96
|
+
| [`prefer-type-fest-tuple-of`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-tuple-of) | 🔧 |
|
|
97
|
+
| [`prefer-type-fest-unknown-array`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-unknown-array) | 🔧 |
|
|
98
|
+
| [`prefer-type-fest-unknown-map`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-unknown-map) | 🔧 |
|
|
99
|
+
| [`prefer-type-fest-unknown-record`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-unknown-record) | 🔧 |
|
|
100
|
+
| [`prefer-type-fest-unknown-set`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-unknown-set) | 🔧 |
|
|
101
|
+
| [`prefer-type-fest-unwrap-tagged`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-unwrap-tagged) | 🔧 |
|
|
102
|
+
| [`prefer-type-fest-value-of`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-value-of) | 🔧 |
|
|
103
|
+
| [`prefer-type-fest-writable`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-writable) | 🔧 |
|
|
104
|
+
| [`prefer-type-fest-writable-deep`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-writable-deep) | 🔧 |
|
|
@@ -22,24 +22,29 @@ export default [typefest.configs["ts-extras/type-guards"]];
|
|
|
22
22
|
|
|
23
23
|
## Rules in this preset
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
|
31
|
-
|
|
|
32
|
-
| [`prefer-ts-extras-
|
|
33
|
-
| [`prefer-ts-extras-
|
|
34
|
-
| [`prefer-ts-extras-
|
|
35
|
-
| [`prefer-ts-extras-
|
|
36
|
-
| [`prefer-ts-extras-is-
|
|
37
|
-
| [`prefer-ts-extras-is-
|
|
38
|
-
| [`prefer-ts-extras-is-
|
|
39
|
-
| [`prefer-ts-extras-is-
|
|
40
|
-
| [`prefer-ts-extras-
|
|
41
|
-
| [`prefer-ts-extras-
|
|
42
|
-
| [`prefer-ts-extras-
|
|
43
|
-
| [`prefer-ts-extras-
|
|
44
|
-
| [`prefer-ts-extras-safe-
|
|
45
|
-
| [`prefer-ts-extras-
|
|
25
|
+
- `Fix` legend:
|
|
26
|
+
- `🔧` = autofixable
|
|
27
|
+
- `💡` = suggestions available
|
|
28
|
+
- `—` = report only
|
|
29
|
+
|
|
30
|
+
| Rule | Fix |
|
|
31
|
+
| --- | :-: |
|
|
32
|
+
| [`prefer-ts-extras-array-includes`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-array-includes) | 🔧 💡 |
|
|
33
|
+
| [`prefer-ts-extras-assert-defined`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-assert-defined) | 🔧 💡 |
|
|
34
|
+
| [`prefer-ts-extras-assert-error`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-assert-error) | 💡 |
|
|
35
|
+
| [`prefer-ts-extras-assert-present`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-assert-present) | 🔧 💡 |
|
|
36
|
+
| [`prefer-ts-extras-is-defined`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-is-defined) | 🔧 |
|
|
37
|
+
| [`prefer-ts-extras-is-defined-filter`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-is-defined-filter) | 🔧 |
|
|
38
|
+
| [`prefer-ts-extras-is-empty`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-is-empty) | 🔧 |
|
|
39
|
+
| [`prefer-ts-extras-is-finite`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-is-finite) | 🔧 |
|
|
40
|
+
| [`prefer-ts-extras-is-infinite`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-is-infinite) | 🔧 |
|
|
41
|
+
| [`prefer-ts-extras-is-integer`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-is-integer) | 🔧 |
|
|
42
|
+
| [`prefer-ts-extras-is-present`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-is-present) | 🔧 |
|
|
43
|
+
| [`prefer-ts-extras-is-present-filter`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-is-present-filter) | 🔧 |
|
|
44
|
+
| [`prefer-ts-extras-is-safe-integer`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-is-safe-integer) | 🔧 |
|
|
45
|
+
| [`prefer-ts-extras-key-in`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-key-in) | 🔧 |
|
|
46
|
+
| [`prefer-ts-extras-not`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-not) | 🔧 |
|
|
47
|
+
| [`prefer-ts-extras-object-has-in`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-object-has-in) | 🔧 💡 |
|
|
48
|
+
| [`prefer-ts-extras-object-has-own`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-object-has-own) | 🔧 💡 |
|
|
49
|
+
| [`prefer-ts-extras-safe-cast-to`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-safe-cast-to) | 🔧 |
|
|
50
|
+
| [`prefer-ts-extras-set-has`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-set-has) | 🔧 💡 |
|
|
@@ -22,47 +22,52 @@ export default [typefest.configs["type-fest/types"]];
|
|
|
22
22
|
|
|
23
23
|
## Rules in this preset
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
|
31
|
-
|
|
|
32
|
-
| [`prefer-type-fest-
|
|
33
|
-
| [`prefer-type-fest-
|
|
34
|
-
| [`prefer-type-fest-
|
|
35
|
-
| [`prefer-type-fest-
|
|
36
|
-
| [`prefer-type-fest-
|
|
37
|
-
| [`prefer-type-fest-
|
|
38
|
-
| [`prefer-type-fest-
|
|
39
|
-
| [`prefer-type-fest-
|
|
40
|
-
| [`prefer-type-fest-
|
|
41
|
-
| [`prefer-type-fest-
|
|
42
|
-
| [`prefer-type-fest-
|
|
43
|
-
| [`prefer-type-fest-
|
|
44
|
-
| [`prefer-type-fest-
|
|
45
|
-
| [`prefer-type-fest-
|
|
46
|
-
| [`prefer-type-fest-
|
|
47
|
-
| [`prefer-type-fest-
|
|
48
|
-
| [`prefer-type-fest-
|
|
49
|
-
| [`prefer-type-fest-
|
|
50
|
-
| [`prefer-type-fest-
|
|
51
|
-
| [`prefer-type-fest-
|
|
52
|
-
| [`prefer-type-fest-
|
|
53
|
-
| [`prefer-type-fest-
|
|
54
|
-
| [`prefer-type-fest-
|
|
55
|
-
| [`prefer-type-fest-
|
|
56
|
-
| [`prefer-type-fest-
|
|
57
|
-
| [`prefer-type-fest-
|
|
58
|
-
| [`prefer-type-fest-
|
|
59
|
-
| [`prefer-type-fest-
|
|
60
|
-
| [`prefer-type-fest-
|
|
61
|
-
| [`prefer-type-fest-
|
|
62
|
-
| [`prefer-type-fest-
|
|
63
|
-
| [`prefer-type-fest-
|
|
64
|
-
| [`prefer-type-fest-
|
|
65
|
-
| [`prefer-type-fest-
|
|
66
|
-
| [`prefer-type-fest-
|
|
67
|
-
| [`prefer-type-fest-
|
|
68
|
-
| [`prefer-type-fest-
|
|
25
|
+
- `Fix` legend:
|
|
26
|
+
- `🔧` = autofixable
|
|
27
|
+
- `💡` = suggestions available
|
|
28
|
+
- `—` = report only
|
|
29
|
+
|
|
30
|
+
| Rule | Fix |
|
|
31
|
+
| --- | :-: |
|
|
32
|
+
| [`prefer-type-fest-abstract-constructor`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-abstract-constructor) | 🔧 |
|
|
33
|
+
| [`prefer-type-fest-arrayable`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-arrayable) | 🔧 |
|
|
34
|
+
| [`prefer-type-fest-async-return-type`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-async-return-type) | 🔧 |
|
|
35
|
+
| [`prefer-type-fest-conditional-pick`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-conditional-pick) | 🔧 |
|
|
36
|
+
| [`prefer-type-fest-constructor`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-constructor) | 🔧 |
|
|
37
|
+
| [`prefer-type-fest-except`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-except) | 🔧 |
|
|
38
|
+
| [`prefer-type-fest-if`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-if) | 🔧 |
|
|
39
|
+
| [`prefer-type-fest-iterable-element`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-iterable-element) | 🔧 |
|
|
40
|
+
| [`prefer-type-fest-json-array`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-json-array) | 🔧 |
|
|
41
|
+
| [`prefer-type-fest-json-object`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-json-object) | 🔧 |
|
|
42
|
+
| [`prefer-type-fest-json-primitive`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-json-primitive) | 🔧 |
|
|
43
|
+
| [`prefer-type-fest-json-value`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-json-value) | 💡 |
|
|
44
|
+
| [`prefer-type-fest-keys-of-union`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-keys-of-union) | 🔧 |
|
|
45
|
+
| [`prefer-type-fest-literal-union`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-literal-union) | 🔧 |
|
|
46
|
+
| [`prefer-type-fest-merge-exclusive`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-merge-exclusive) | 🔧 |
|
|
47
|
+
| [`prefer-type-fest-non-empty-tuple`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-non-empty-tuple) | 🔧 |
|
|
48
|
+
| [`prefer-type-fest-omit-index-signature`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-omit-index-signature) | 🔧 |
|
|
49
|
+
| [`prefer-type-fest-partial-deep`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-partial-deep) | 🔧 |
|
|
50
|
+
| [`prefer-type-fest-primitive`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-primitive) | 🔧 |
|
|
51
|
+
| [`prefer-type-fest-promisable`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-promisable) | 🔧 |
|
|
52
|
+
| [`prefer-type-fest-readonly-deep`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-readonly-deep) | 🔧 |
|
|
53
|
+
| [`prefer-type-fest-require-all-or-none`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-require-all-or-none) | 🔧 |
|
|
54
|
+
| [`prefer-type-fest-require-at-least-one`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-require-at-least-one) | 🔧 |
|
|
55
|
+
| [`prefer-type-fest-require-exactly-one`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-require-exactly-one) | 🔧 |
|
|
56
|
+
| [`prefer-type-fest-require-one-or-none`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-require-one-or-none) | 🔧 |
|
|
57
|
+
| [`prefer-type-fest-required-deep`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-required-deep) | 🔧 |
|
|
58
|
+
| [`prefer-type-fest-schema`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-schema) | 🔧 |
|
|
59
|
+
| [`prefer-type-fest-set-non-nullable`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-set-non-nullable) | 🔧 |
|
|
60
|
+
| [`prefer-type-fest-set-optional`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-set-optional) | 🔧 |
|
|
61
|
+
| [`prefer-type-fest-set-readonly`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-set-readonly) | 🔧 |
|
|
62
|
+
| [`prefer-type-fest-set-required`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-set-required) | 🔧 |
|
|
63
|
+
| [`prefer-type-fest-simplify`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-simplify) | 🔧 |
|
|
64
|
+
| [`prefer-type-fest-tagged-brands`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-tagged-brands) | 🔧 |
|
|
65
|
+
| [`prefer-type-fest-tuple-of`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-tuple-of) | 🔧 |
|
|
66
|
+
| [`prefer-type-fest-unknown-array`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-unknown-array) | 🔧 |
|
|
67
|
+
| [`prefer-type-fest-unknown-map`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-unknown-map) | 🔧 |
|
|
68
|
+
| [`prefer-type-fest-unknown-record`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-unknown-record) | 🔧 |
|
|
69
|
+
| [`prefer-type-fest-unknown-set`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-unknown-set) | 🔧 |
|
|
70
|
+
| [`prefer-type-fest-unwrap-tagged`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-unwrap-tagged) | 🔧 |
|
|
71
|
+
| [`prefer-type-fest-value-of`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-value-of) | 🔧 |
|
|
72
|
+
| [`prefer-type-fest-writable`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-writable) | 🔧 |
|
|
73
|
+
| [`prefer-type-fest-writable-deep`](https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-writable-deep) | 🔧 |
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://www.schemastore.org/package.json",
|
|
3
3
|
"name": "eslint-plugin-typefest",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.2",
|
|
5
5
|
"private": false,
|
|
6
6
|
"description": "ESLint rules for adopting type-fest and ts-extras conventions.",
|
|
7
7
|
"keywords": [
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"build": "tsc -p tsconfig.build.json && npm run build:types:cjs && npm run build:cjs",
|
|
75
75
|
"build:cjs": "esbuild dist/plugin.js --bundle --format=cjs --platform=node --packages=external --sourcemap --outfile=dist/plugin.cjs --footer:js=\"module.exports = module.exports.default;\"",
|
|
76
76
|
"build:clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\"",
|
|
77
|
-
"build:eslint-inspector": "npx @eslint/config-inspector build --outDir \"docs/docusaurus/static/eslint-inspector\" --base \"/eslint-plugin-typefest/eslint-inspector/\"",
|
|
77
|
+
"build:eslint-inspector": "npx -y @eslint/config-inspector@1.4.2 build --outDir \"docs/docusaurus/static/eslint-inspector\" --base \"/eslint-plugin-typefest/eslint-inspector/\"",
|
|
78
78
|
"build:eslint-inspector:local": "npx @eslint/config-inspector",
|
|
79
79
|
"build:types:cjs": "node -e \"require('node:fs').copyFileSync('dist/plugin.d.ts','dist/plugin.d.cts')\"",
|
|
80
80
|
"changelog:generate": "git-cliff --config cliff.toml --output CHANGELOG.md",
|
|
@@ -143,9 +143,10 @@
|
|
|
143
143
|
"lint:knip:unused:exports": "npm run knip -- --dependencies --exports",
|
|
144
144
|
"lint:leaves": "npm run madge:leaves",
|
|
145
145
|
"lint:metrics": "npm run sloc",
|
|
146
|
+
"lint:node-version-files": "node scripts/sync-node-version-files.mjs --check",
|
|
146
147
|
"lint:orphans": "npm run madge:orphans",
|
|
147
|
-
"lint:package": "npm run lint:package-sort && npm run lint:packagelintrc && echo \"Package.json lint done!\"",
|
|
148
|
-
"lint:package:strict": "npm run lint:package-sort && npm run lint:package-check && npm run lint:packagelintrc && echo \"Package.json lint done!\"",
|
|
148
|
+
"lint:package": "npm run lint:node-version-files && npm run lint:package-sort && npm run lint:packagelintrc && echo \"Package.json lint done!\"",
|
|
149
|
+
"lint:package:strict": "npm run lint:node-version-files && npm run lint:package-sort && npm run lint:package-check && npm run lint:packagelintrc && echo \"Package.json lint done!\"",
|
|
149
150
|
"lint:package-check": "publint && attw --pack .",
|
|
150
151
|
"lint:package-check:strict": "publint && attw --pack . --profile strict",
|
|
151
152
|
"lint:package-sort": "sort-package-json \"./package.json\" \"./docs/docusaurus/package.json\"",
|
|
@@ -172,9 +173,12 @@
|
|
|
172
173
|
"release:verify": "npm run build && npm run lint && npm run typecheck && npm run test && npm run sync:readme-rules-table && npm run sync:presets-rules-matrix && npm run docs:check-links && npm pack --dry-run",
|
|
173
174
|
"remark:fix": "remark --rc-path .remarkrc.mjs --silently-ignore --ignore-path .remarkignore --frail --quiet --output -- \"*.{md,mdx}\" \"docs/**/*.{md,mdx}\"",
|
|
174
175
|
"remark:test-config": "remark --rc-path .remarkrc.mjs --silently-ignore --ignore-path .remarkignore --frail \"README.md\"",
|
|
176
|
+
"sync:node-version-files": "node scripts/sync-node-version-files.mjs",
|
|
175
177
|
"sync:peer-eslint-range": "node scripts/sync-peer-eslint-range.mjs",
|
|
176
178
|
"sync:presets-rules-matrix": "node scripts/sync-presets-rules-matrix.mjs",
|
|
177
179
|
"sync:readme-rules-table": "node scripts/sync-readme-rules-table.mjs",
|
|
180
|
+
"sync:readme-rules-table:update": "npm run build && cross-env TYPEFEST_UPDATE_GENERATED_DOCS=1 vitest run test/readme-rules-table-sync.test.ts -u",
|
|
181
|
+
"sync:readme-rules-table:write": "node scripts/sync-readme-rules-table.mjs --write",
|
|
178
182
|
"pretest": "npm run build",
|
|
179
183
|
"test": "vitest run",
|
|
180
184
|
"test:autofix:fixtures": "cross-env TYPEFEST_AUTOFIX_SMOKE=1 vitest run test/autofix-fixtures-all-rules-smoke.test.ts",
|
|
@@ -271,7 +275,7 @@
|
|
|
271
275
|
"@typescript-eslint/eslint-plugin": "^8.57.0",
|
|
272
276
|
"@typescript-eslint/rule-tester": "^8.57.0",
|
|
273
277
|
"@vitest/coverage-v8": "^4.1.0",
|
|
274
|
-
"@vitest/eslint-plugin": "^1.6.
|
|
278
|
+
"@vitest/eslint-plugin": "^1.6.12",
|
|
275
279
|
"@vitest/ui": "^4.1.0",
|
|
276
280
|
"actionlint": "^2.0.6",
|
|
277
281
|
"all-contributors-cli": "^6.26.1",
|
|
@@ -316,7 +320,7 @@
|
|
|
316
320
|
"eslint-plugin-no-unsanitized": "^4.1.5",
|
|
317
321
|
"eslint-plugin-no-use-extend-native": "^0.7.2",
|
|
318
322
|
"eslint-plugin-node-dependencies": "^2.2.0",
|
|
319
|
-
"eslint-plugin-package-json": "^0.
|
|
323
|
+
"eslint-plugin-package-json": "^0.91.0",
|
|
320
324
|
"eslint-plugin-perfectionist": "^5.6.0",
|
|
321
325
|
"eslint-plugin-prefer-arrow": "^1.2.3",
|
|
322
326
|
"eslint-plugin-prettier": "^5.5.5",
|
|
@@ -365,7 +369,7 @@
|
|
|
365
369
|
"postcss-reporter": "^7.1.0",
|
|
366
370
|
"postcss-round-subpixels": "^2.0.0",
|
|
367
371
|
"postcss-scss": "^4.0.9",
|
|
368
|
-
"postcss-sort-media-queries": "^6.
|
|
372
|
+
"postcss-sort-media-queries": "^6.3.2",
|
|
369
373
|
"postcss-styled-jsx": "^1.0.1",
|
|
370
374
|
"postcss-styled-syntax": "^0.7.1",
|
|
371
375
|
"postcss-viewport-height-correction": "^1.1.1",
|
|
@@ -375,7 +379,7 @@
|
|
|
375
379
|
"prettier-plugin-jsdoc": "^1.8.0",
|
|
376
380
|
"prettier-plugin-jsdoc-type": "^0.2.0",
|
|
377
381
|
"prettier-plugin-merge": "^0.10.0",
|
|
378
|
-
"prettier-plugin-multiline-arrays": "^4.1.
|
|
382
|
+
"prettier-plugin-multiline-arrays": "^4.1.5",
|
|
379
383
|
"prettier-plugin-packagejson": "^3.0.2",
|
|
380
384
|
"prettier-plugin-properties": "^0.3.1",
|
|
381
385
|
"prettier-plugin-sort-json": "^4.2.0",
|
|
@@ -519,7 +523,7 @@
|
|
|
519
523
|
"stylelint-no-restricted-syntax": "^2.2.1",
|
|
520
524
|
"stylelint-no-unresolved-module": "^2.5.2",
|
|
521
525
|
"stylelint-no-unsupported-browser-features": "^8.1.1",
|
|
522
|
-
"stylelint-order": "^8.
|
|
526
|
+
"stylelint-order": "^8.1.0",
|
|
523
527
|
"stylelint-plugin-defensive-css": "^2.6.0",
|
|
524
528
|
"stylelint-plugin-logical-css": "^2.0.2",
|
|
525
529
|
"stylelint-plugin-use-baseline": "^1.2.7",
|