@codelaw/rules-ts 0.1.0 → 0.2.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.
package/README.md CHANGED
@@ -12,11 +12,15 @@ preview = true # every rule is `preview` until a corpus run promotes it
12
12
 
13
13
  ## Presets
14
14
 
15
+ <!-- docs-sync:presets -->
16
+
15
17
  | preset | rules | ported from |
16
18
  |---|---|---|
17
19
  | `ts/recommended` | 20 | typescript-eslint `recommended` 8.71.2 (not type-checked) — all 20 rules; the four core rules its `eslint-recommended` switches on are `codelaw:js/typescript` in `@codelaw/rules-js` |
18
20
  | `ts/conventions` | 1 | codelaw's starter catalogue: `ts/type-only-imports` — opt in |
19
21
 
22
+ <!-- /docs-sync:presets -->
23
+
20
24
  Every rule is **reimplemented**, not vendored: the matchers, messages and docs
21
25
  are written fresh, and each rule's `ported_from:` names the source rule.
22
26
 
package/codelaw-pack.toml CHANGED
@@ -1,5 +1,5 @@
1
1
  name = "@codelaw/rules-ts"
2
- version = "0.1.0"
2
+ version = "0.2.0"
3
3
  min_codelaw = "0.1.0"
4
4
  languages = ["typescript", "tsx"]
5
5
  presets = ["ts/recommended", "ts/conventions"]
package/corpus.toml ADDED
@@ -0,0 +1,25 @@
1
+ # `codelaw test --corpus` finding counts (SR-RULE-AUTHORING decision 4).
2
+ # Rewrite with --update-snapshot, and review the change.
3
+
4
+ [findings]
5
+ "ts/ban-ts-comment" = 96
6
+ "ts/no-array-constructor" = 0
7
+ "ts/no-duplicate-enum-values" = 0
8
+ "ts/no-empty-object-type" = 276
9
+ "ts/no-explicit-any" = 1653
10
+ "ts/no-extra-non-null-assertion" = 0
11
+ "ts/no-misused-new" = 0
12
+ "ts/no-namespace" = 1
13
+ "ts/no-non-null-asserted-optional-chain" = 0
14
+ "ts/no-require-imports" = 3
15
+ "ts/no-this-alias" = 1
16
+ "ts/no-unnecessary-type-constraint" = 0
17
+ "ts/no-unsafe-declaration-merging" = 173
18
+ "ts/no-unsafe-function-type" = 8
19
+ "ts/no-unused-expressions" = 39
20
+ "ts/no-unused-vars" = 318
21
+ "ts/no-wrapper-object-types" = 0
22
+ "ts/prefer-as-const" = 0
23
+ "ts/prefer-namespace-keyword" = 0
24
+ "ts/triple-slash-reference" = 0
25
+ "ts/type-only-imports" = 797
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codelaw/rules-ts",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "codelaw's TypeScript rules, from typescript-eslint; npm only (SR-RULE-PACKS)",
5
5
  "license": "MIT",
6
6
  "repository": {