@marcrock22/veslint 0.32.0 → 0.34.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 +12 -4
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -59,9 +59,10 @@ veslint <file.ts | directory>... [--config <file>] [--rule <rule> [--no-config-l
|
|
|
59
59
|
|
|
60
60
|
| Option | What it does |
|
|
61
61
|
|---|---|
|
|
62
|
-
| `<directory>` | Lints the `.ts`, `.mts`, `.cts`, `.tsx` and `.
|
|
62
|
+
| `<directory>` | Lints the `.ts`, `.mts`, `.cts`, `.tsx`, `.vue` and `.svelte` files under it, as `eslint .` does: `node_modules`, `.git` and what the configuration ignores are left out. |
|
|
63
63
|
| `<file.ts>` | Lints that file. JavaScript files are not linted: veslint only reads TypeScript. |
|
|
64
64
|
| `<file.vue>` | Lints the TypeScript script of a Vue file (`<script lang="ts">` and `<script setup lang="ts">`) and, with the `vue/*` rules, its template, as ESLint does with vue-eslint-parser and typescript-eslint's parser: the rules see the script with the positions of the file, and the types are those typescript-eslint gives with `extraFileExtensions: ['.vue']`. A Vue file whose script is JavaScript is skipped with a warning. |
|
|
65
|
+
| `<file.svelte>` | Lints the TypeScript script of a Svelte file (`<script lang="ts">`, `<script module lang="ts">`) and the `.svelte.ts` modules, as ESLint does with svelte-eslint-parser and typescript-eslint's parser: runes, stores (`$store`), `$:` statements, props and generics as svelte-eslint-parser models them, and the types typescript-eslint gives with `extraFileExtensions: ['.svelte']`. A Svelte file whose script is JavaScript is not linted (with a warning). With the `svelte/*` rules (83 of eslint-plugin-svelte's 88), its template and `<style>` too. `svelte.config.js` is not read (its `kit.files.routes` and `compilerOptions.runes` can be given as `parserOptions.svelteConfig` and `parserOptions.svelteFeatures.runes`). |
|
|
65
66
|
| `--config <file>` | The configuration (see below). Without it and without `--rule`, a directory is linted with the closest `eslint.config.*`. |
|
|
66
67
|
| `--rule <rule>` | Lints with one rule, named as in ESLint: `no-var`, `@typescript-eslint/await-thenable`. Its options, and the files it lints, are the ones the closest `eslint.config.*` gives it (on with its default options when the configuration has it off); without a configuration, its default options. Directive comments for other rules are left alone: they are never reported as unused, and `--fix` keeps them. |
|
|
67
68
|
| `--no-config-lookup` | With `--rule`: the rule's default options, without looking for an `eslint.config.*`. |
|
|
@@ -99,7 +100,7 @@ Directive comments work as in ESLint 10: `eslint-disable`, `eslint-enable`, `esl
|
|
|
99
100
|
|
|
100
101
|
## Rules
|
|
101
102
|
|
|
102
|
-
veslint has **
|
|
103
|
+
veslint has **795 rules**, each with all its options, fixes and suggestions:
|
|
103
104
|
|
|
104
105
|
<details>
|
|
105
106
|
<summary><b>ESLint 10.15.0</b>: 139 rules</summary>
|
|
@@ -145,6 +146,13 @@ Its 38 wrappers of rules of ESLint core and ESLint Stylistic, which run veslint'
|
|
|
145
146
|
|
|
146
147
|
</details>
|
|
147
148
|
|
|
149
|
+
<details>
|
|
150
|
+
<summary><b>eslint-plugin-svelte 3.24.1</b> (the templates and scripts of <code>.svelte</code> files, and the <code>.svelte.ts</code> modules and TypeScript files its rules also lint): 83 rules</summary>
|
|
151
|
+
|
|
152
|
+
`svelte/block-lang`, `svelte/button-has-type`, `svelte/comment-directive`, `svelte/consistent-selector-style`, `svelte/derived-has-same-inputs-outputs`, `svelte/experimental-require-slot-types`, `svelte/experimental-require-strict-events`, `svelte/first-attribute-linebreak`, `svelte/html-closing-bracket-new-line`, `svelte/html-closing-bracket-spacing`, `svelte/html-quotes`, `svelte/html-self-closing`, `svelte/infinite-reactive-loop`, `svelte/max-attributes-per-line`, `svelte/max-lines-per-block`, `svelte/mustache-spacing`, `svelte/no-add-event-listener`, `svelte/no-at-const-tags`, `svelte/no-at-debug-tags`, `svelte/no-at-html-tags`, `svelte/no-bind-value-on-checkable-inputs`, `svelte/no-conflicting-module-names`, `svelte/no-dom-manipulating`, `svelte/no-dupe-else-if-blocks`, `svelte/no-dupe-on-directives`, `svelte/no-dupe-style-properties`, `svelte/no-dupe-use-directives`, `svelte/no-dynamic-slot-name`, `svelte/no-export-load-in-svelte-module-in-kit-pages`, `svelte/no-extra-reactive-curlies`, `svelte/no-goto-without-base`, `svelte/no-ignored-unsubscribe`, `svelte/no-immutable-reactive-statements`, `svelte/no-inline-styles`, `svelte/no-inner-declarations`, `svelte/no-inspect`, `svelte/no-navigation-without-base`, `svelte/no-navigation-without-resolve`, `svelte/no-nested-style-tag`, `svelte/no-not-function-handler`, `svelte/no-object-in-text-mustaches`, `svelte/no-raw-special-elements`, `svelte/no-reactive-functions`, `svelte/no-reactive-literals`, `svelte/no-reactive-reassign`, `svelte/no-restricted-html-elements`, `svelte/no-shorthand-style-property-overrides`, `svelte/no-spaces-around-equal-signs-in-attribute`, `svelte/no-store-async`, `svelte/no-svelte-internal`, `svelte/no-target-blank`, `svelte/no-top-level-browser-globals`, `svelte/no-trailing-spaces`, `svelte/no-unknown-style-directive-property`, `svelte/no-unnecessary-state-wrap`, `svelte/no-unused-class-name`, `svelte/no-unused-props`, `svelte/no-unused-svelte-ignore`, `svelte/no-useless-children-snippet`, `svelte/no-useless-mustaches`, `svelte/prefer-attribute-interpolation`, `svelte/prefer-class-directive`, `svelte/prefer-const`, `svelte/prefer-derived-over-derived-by`, `svelte/prefer-destructured-store-props`, `svelte/prefer-style-directive`, `svelte/prefer-svelte-reactivity`, `svelte/prefer-writable-derived`, `svelte/require-each-key`, `svelte/require-event-dispatcher-types`, `svelte/require-event-prefix`, `svelte/require-optimized-style-attribute`, `svelte/require-store-callbacks-use-set-param`, `svelte/require-store-reactive-access`, `svelte/require-stores-init`, `svelte/shorthand-attribute`, `svelte/shorthand-directive`, `svelte/sort-attributes`, `svelte/spaced-html-comment`, `svelte/system`, `svelte/valid-each-key`, `svelte/valid-prop-names-in-kit-pages`, `svelte/valid-style-parse`
|
|
153
|
+
|
|
154
|
+
</details>
|
|
155
|
+
|
|
148
156
|
<details>
|
|
149
157
|
<summary><b>@slipher/eslint-plugin 1.1.0</b> (Seyfert bots): 15 rules</summary>
|
|
150
158
|
|
|
@@ -163,7 +171,7 @@ What each version added is in the [changelog](CHANGELOG.md).
|
|
|
163
171
|
|
|
164
172
|
### How it is checked
|
|
165
173
|
|
|
166
|
-
Every rule passes all the cases of its own upstream tests, linted as TypeScript: 29,862 cases of typescript-eslint, 14,092 of ESLint, 14,962 of eslint-plugin-unicorn, 9,528 of @stylistic/eslint-plugin, 3,278 of eslint-plugin-perfectionist, 459 of @slipher/eslint-plugin, 206 of @marcrock22/eslintcf
|
|
174
|
+
Every rule passes all the cases of its own upstream tests, linted as TypeScript: 29,862 cases of typescript-eslint, 14,092 of ESLint, 14,962 of eslint-plugin-unicorn, 9,528 of @stylistic/eslint-plugin, 3,278 of eslint-plugin-perfectionist, 459 of @slipher/eslint-plugin, 206 of @marcrock22/eslintcf, 10,085 of eslint-plugin-vue and 1,051 of eslint-plugin-svelte (their JavaScript cases with `lang="ts"`, with what ESLint gives for them). On fixtures of its own, every rule gives exactly what ESLint gives: problems, messages, positions, fixes and suggestions. The rules are also compared with ESLint on real projects (a Discord bot, zod, recharts and the TypeScript compiler).
|
|
167
175
|
|
|
168
176
|
## VS Code extension
|
|
169
177
|
|
|
@@ -171,7 +179,7 @@ The extension shows the problems of the TypeScript files you open and type, unde
|
|
|
171
179
|
|
|
172
180
|
## Limits
|
|
173
181
|
|
|
174
|
-
- **TypeScript only.** JavaScript files are not linted, even in a project with `allowJs`, nor the JavaScript scripts of Vue files.
|
|
182
|
+
- **TypeScript only.** JavaScript files are not linted, even in a project with `allowJs`, nor the JavaScript scripts of Vue and Svelte files.
|
|
175
183
|
- **Vue files:** 254 rules of eslint-plugin-vue so far (the others are skipped with a warning). `<!-- eslint-disable -->` comments in a template work when `vue/comment-directive` is on, as with eslint-plugin-vue's processor. `parserOptions.vueFeatures` is not read (the defaults are used). Two scripts that are not modules (no `import` or `export`) see each other's globals in veslint, where typescript-eslint has the other `.vue` files of the program as the text of the file.
|
|
176
184
|
- **Linux x64 and Windows x64.** Other platforms need a build from source, which is not tested there.
|
|
177
185
|
- **An `eslint.config.*` needs `bun`** to be read; the resolved configuration (`--print-config`) does not. A cached resolution is reused while the files and modules the configuration read and the environment variables it read stay the same: a configuration that depends on something else (the date, a file it lists but does not read, a new `tsconfig.json` a glob of `parserOptions.project` matches) needs `VESLINT_CONFIG_CACHE=0`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@marcrock22/veslint",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.34.0",
|
|
4
4
|
"description": "A TypeScript linter in V that talks to TypeScript 7 (tsc --api) directly: the rules of ESLint, typescript-eslint, unicorn, @stylistic, perfectionist and seyfert, with the same results.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"veslint": "bin/veslint.js"
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
"bin"
|
|
10
10
|
],
|
|
11
11
|
"optionalDependencies": {
|
|
12
|
-
"@marcrock22/veslint-linux-x64": "0.
|
|
13
|
-
"@marcrock22/veslint-win32-x64": "0.
|
|
12
|
+
"@marcrock22/veslint-linux-x64": "0.34.0",
|
|
13
|
+
"@marcrock22/veslint-win32-x64": "0.34.0"
|
|
14
14
|
},
|
|
15
15
|
"keywords": [
|
|
16
16
|
"typescript",
|