@marcrock22/veslint 0.29.0 → 0.31.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 +13 -4
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -61,7 +61,7 @@ veslint <file.ts | directory>... [--config <file>] [--rule <rule> [--no-config-l
|
|
|
61
61
|
|---|---|
|
|
62
62
|
| `<directory>` | Lints the `.ts`, `.mts`, `.cts`, `.tsx` and `.vue` 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
|
-
| `<file.vue>` | Lints the TypeScript script of a Vue file (`<script lang="ts">` and `<script setup lang="ts">`) 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. |
|
|
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
65
|
| `--config <file>` | The configuration (see below). Without it and without `--rule`, a directory is linted with the closest `eslint.config.*`. |
|
|
66
66
|
| `--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
67
|
| `--no-config-lookup` | With `--rule`: the rule's default options, without looking for an `eslint.config.*`. |
|
|
@@ -99,7 +99,7 @@ Directive comments work as in ESLint 10: `eslint-disable`, `eslint-enable`, `esl
|
|
|
99
99
|
|
|
100
100
|
## Rules
|
|
101
101
|
|
|
102
|
-
veslint has **
|
|
102
|
+
veslint has **619 rules**, each with all its options, fixes and suggestions:
|
|
103
103
|
|
|
104
104
|
<details>
|
|
105
105
|
<summary><b>ESLint 10.15.0</b>: 139 rules</summary>
|
|
@@ -136,6 +136,15 @@ veslint has **458 rules**, each with all its options, fixes and suggestions:
|
|
|
136
136
|
|
|
137
137
|
</details>
|
|
138
138
|
|
|
139
|
+
<details>
|
|
140
|
+
<summary><b>eslint-plugin-vue 10.12.1</b> (the templates and scripts of <code>.vue</code> files, and the components of TypeScript files): 161 rules</summary>
|
|
141
|
+
|
|
142
|
+
`vue/array-bracket-newline`, `vue/array-bracket-spacing`, `vue/array-element-newline`, `vue/arrow-spacing`, `vue/attribute-hyphenation`, `vue/block-spacing`, `vue/brace-style`, `vue/camelcase`, `vue/comma-dangle`, `vue/comma-spacing`, `vue/comma-style`, `vue/comment-directive`, `vue/component-definition-name-casing`, `vue/component-options-name-casing`, `vue/define-emits-declaration`, `vue/define-props-declaration`, `vue/define-props-destructuring`, `vue/dot-location`, `vue/dot-notation`, `vue/eqeqeq`, `vue/first-attribute-linebreak`, `vue/func-call-spacing`, `vue/html-button-has-type`, `vue/html-closing-bracket-newline`, `vue/html-closing-bracket-spacing`, `vue/html-end-tags`, `vue/html-quotes`, `vue/jsx-uses-vars`, `vue/key-spacing`, `vue/keyword-spacing`, `vue/match-component-import-name`, `vue/max-lines-per-block`, `vue/max-props`, `vue/max-template-depth`, `vue/multiline-ternary`, `vue/mustache-interpolation-spacing`, `vue/no-arrow-functions-in-watch`, `vue/no-child-content`, `vue/no-computed-properties-in-data`, `vue/no-console`, `vue/no-constant-condition`, `vue/no-content-outside-block`, `vue/no-custom-modifiers-on-v-model`, `vue/no-define-model-default`, `vue/no-deprecated-data-object-declaration`, `vue/no-deprecated-delete-set`, `vue/no-deprecated-destroyed-lifecycle`, `vue/no-deprecated-events-api`, `vue/no-deprecated-filter`, `vue/no-deprecated-functional-template`, `vue/no-deprecated-html-element-is`, `vue/no-deprecated-inline-template`, `vue/no-deprecated-props-default-this`, `vue/no-deprecated-router-link-tag-prop`, `vue/no-deprecated-scope-attribute`, `vue/no-deprecated-slot-attribute`, `vue/no-deprecated-slot-scope-attribute`, `vue/no-deprecated-v-bind-sync`, `vue/no-deprecated-v-is`, `vue/no-deprecated-v-on-native-modifier`, `vue/no-deprecated-v-on-number-modifiers`, `vue/no-deprecated-vue-config-keycodes`, `vue/no-dupe-v-else-if`, `vue/no-duplicate-attributes`, `vue/no-empty-component-block`, `vue/no-empty-pattern`, `vue/no-export-in-script-setup`, `vue/no-extra-parens`, `vue/no-implicit-coercion`, `vue/no-import-compiler-macros`, `vue/no-literals-in-template`, `vue/no-lone-template`, `vue/no-loss-of-precision`, `vue/no-multiple-objects-in-class`, `vue/no-multiple-slot-args`, `vue/no-negated-condition`, `vue/no-parsing-error`, `vue/no-props-shadow`, `vue/no-reserved-keys`, `vue/no-reserved-props`, `vue/no-restricted-block`, `vue/no-restricted-class`, `vue/no-restricted-html-elements`, `vue/no-restricted-static-attribute`, `vue/no-restricted-syntax`, `vue/no-restricted-v-bind`, `vue/no-restricted-v-on`, `vue/no-root-v-if`, `vue/no-shared-component-data`, `vue/no-spaces-around-equal-signs-in-attribute`, `vue/no-sparse-arrays`, `vue/no-static-inline-styles`, `vue/no-template-key`, `vue/no-template-target-blank`, `vue/no-textarea-mustache`, `vue/no-this-in-before-route-enter`, `vue/no-unused-vars`, `vue/no-use-v-else-with-v-for`, `vue/no-use-v-if-with-v-for`, `vue/no-useless-concat`, `vue/no-useless-template-attributes`, `vue/no-useless-v-bind`, `vue/no-v-for-template-key`, `vue/no-v-for-template-key-on-child`, `vue/no-v-html`, `vue/no-v-model-argument`, `vue/no-v-text`, `vue/no-v-text-v-html-on-component`, `vue/object-curly-newline`, `vue/object-curly-spacing`, `vue/object-property-newline`, `vue/object-shorthand`, `vue/one-component-per-file`, `vue/operator-linebreak`, `vue/prefer-prop-type-boolean-first`, `vue/prefer-template`, `vue/prefer-true-attribute-shorthand`, `vue/prop-name-casing`, `vue/quote-props`, `vue/require-component-is`, `vue/require-default-export`, `vue/require-emit-validator`, `vue/require-macro-variable-name`, `vue/require-name-property`, `vue/require-prop-type-constructor`, `vue/require-prop-types`, `vue/require-render-return`, `vue/require-slots-as-functions`, `vue/require-toggle-inside-transition`, `vue/require-v-for-key`, `vue/restricted-component-names`, `vue/return-in-computed-property`, `vue/slot-name-casing`, `vue/space-in-parens`, `vue/space-infix-ops`, `vue/space-unary-ops`, `vue/static-class-names-order`, `vue/template-curly-spacing`, `vue/this-in-template`, `vue/v-bind-style`, `vue/v-for-delimiter-style`, `vue/v-on-event-hyphenation`, `vue/v-on-style`, `vue/v-slot-style`, `vue/valid-attribute-name`, `vue/valid-model-definition`, `vue/valid-template-root`, `vue/valid-v-bind`, `vue/valid-v-bind-sync`, `vue/valid-v-cloak`, `vue/valid-v-else`, `vue/valid-v-else-if`, `vue/valid-v-html`, `vue/valid-v-if`, `vue/valid-v-is`, `vue/valid-v-memo`, `vue/valid-v-on`, `vue/valid-v-once`, `vue/valid-v-pre`, `vue/valid-v-show`, `vue/valid-v-text`
|
|
143
|
+
|
|
144
|
+
Its 38 wrappers of rules of ESLint core and ESLint Stylistic, which run veslint's port of the wrapped rule on the expressions of the template (ESLint Stylistic's when `@stylistic/eslint-plugin` resolves from the current directory, as eslint-plugin-vue chooses, ESLint core's otherwise): `vue/array-bracket-newline`, `vue/array-bracket-spacing`, `vue/array-element-newline`, `vue/arrow-spacing`, `vue/block-spacing`, `vue/brace-style`, `vue/camelcase`, `vue/comma-dangle`, `vue/comma-spacing`, `vue/comma-style`, `vue/dot-location`, `vue/dot-notation`, `vue/eqeqeq`, `vue/func-call-spacing`, `vue/key-spacing`, `vue/keyword-spacing`, `vue/multiline-ternary`, `vue/no-console`, `vue/no-constant-condition`, `vue/no-empty-pattern`, `vue/no-extra-parens`, `vue/no-implicit-coercion`, `vue/no-loss-of-precision`, `vue/no-negated-condition`, `vue/no-restricted-syntax`, `vue/no-sparse-arrays`, `vue/no-useless-concat`, `vue/object-curly-newline`, `vue/object-curly-spacing`, `vue/object-property-newline`, `vue/object-shorthand`, `vue/operator-linebreak`, `vue/prefer-template`, `vue/quote-props`, `vue/space-in-parens`, `vue/space-infix-ops`, `vue/space-unary-ops`, `vue/template-curly-spacing`.
|
|
145
|
+
|
|
146
|
+
</details>
|
|
147
|
+
|
|
139
148
|
<details>
|
|
140
149
|
<summary><b>@slipher/eslint-plugin 1.1.0</b> (Seyfert bots): 15 rules</summary>
|
|
141
150
|
|
|
@@ -154,7 +163,7 @@ What each version added is in the [changelog](CHANGELOG.md).
|
|
|
154
163
|
|
|
155
164
|
### How it is checked
|
|
156
165
|
|
|
157
|
-
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
|
|
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 and 2,795 of eslint-plugin-vue (its 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).
|
|
158
167
|
|
|
159
168
|
## VS Code extension
|
|
160
169
|
|
|
@@ -163,7 +172,7 @@ The extension shows the problems of the TypeScript files you open and type, unde
|
|
|
163
172
|
## Limits
|
|
164
173
|
|
|
165
174
|
- **TypeScript only.** JavaScript files are not linted, even in a project with `allowJs`, nor the JavaScript scripts of Vue files.
|
|
166
|
-
- **Vue files:**
|
|
175
|
+
- **Vue files:** 161 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.
|
|
167
176
|
- **Linux x64 and Windows x64.** Other platforms need a build from source, which is not tested there.
|
|
168
177
|
- **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`.
|
|
169
178
|
- **The newest TypeScript syntax** may not be read yet: veslint warns when a file has syntax it does not understand, and some problems of that file may be missing.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@marcrock22/veslint",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.31.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.31.0",
|
|
13
|
+
"@marcrock22/veslint-win32-x64": "0.31.0"
|
|
14
14
|
},
|
|
15
15
|
"keywords": [
|
|
16
16
|
"typescript",
|