Commit 47fb0d1
authored
chore: convert ESLint files from .js/.mjs to .ts (#109310)
Directly changes files from `.mjs` to ~`.mts`. I would have preferred
the cleaner `.ts` but that will require adding `"type": "module"` to
`package.json`, which is more work (which would be a great followup!).~
`.ts`, building on #109319's switching the package to be ESM by default.
Imports are now TypeScript-style extension-less ones.
Now that the plugin's files are typed, this applies a few types
cleanups:
* Uses [typescript-eslint's
`RuleCreator`](https://typescript-eslint.io/developers/custom-rules#rulecreator)
to create rules, which gives nicer typings than the built-in ESLint
`Rule`
* Updates node types from [`estree`](https://github.com/estree/estree)
(only vanilla JS types) to
[`@typescript-eslint/estree`](https://typescript-eslint.io/packages/typescript-estree)
(full TS node types)
* Converts JSDoc types to full TypeScript syntax
This PR should have no changes to the lint rules' behavior. The only
runtime code changes are for deleting unused parameters.1 parent 0fc74d5 commit 47fb0d1
File tree
29 files changed
+571
-633
lines changed- .github
- static
- eslint
- eslintPluginScraps
- src
- ast
- extractor
- utils
- config
- rules
- eslintPluginSentry
29 files changed
+571
-633
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
| 121 | + | |
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| |||
431 | 431 | | |
432 | 432 | | |
433 | 433 | | |
434 | | - | |
| 434 | + | |
435 | 435 | | |
436 | 436 | | |
437 | 437 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
| 207 | + | |
| 208 | + | |
207 | 209 | | |
208 | 210 | | |
209 | 211 | | |
| |||
0 commit comments