@marcrock22/veslint 0.28.0 → 0.30.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.
Files changed (2) hide show
  1. package/README.md +13 -4
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -59,8 +59,9 @@ 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` and `.tsx` files under it, as `eslint .` does: `node_modules`, `.git` and what the configuration ignores are left out. |
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">`) 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. |
64
65
  | `--config <file>` | The configuration (see below). Without it and without `--rule`, a directory is linted with the closest `eslint.config.*`. |
65
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. |
66
67
  | `--no-config-lookup` | With `--rule`: the rule's default options, without looking for an `eslint.config.*`. |
@@ -98,7 +99,7 @@ Directive comments work as in ESLint 10: `eslint-disable`, `eslint-enable`, `esl
98
99
 
99
100
  ## Rules
100
101
 
101
- veslint has **458 rules**, each with all its options, fixes and suggestions:
102
+ veslint has **507 rules**, each with all its options, fixes and suggestions:
102
103
 
103
104
  <details>
104
105
  <summary><b>ESLint 10.15.0</b>: 139 rules</summary>
@@ -135,6 +136,13 @@ veslint has **458 rules**, each with all its options, fixes and suggestions:
135
136
 
136
137
  </details>
137
138
 
139
+ <details>
140
+ <summary><b>eslint-plugin-vue 10.12.1</b> (the templates of <code>.vue</code> files): 49 rules</summary>
141
+
142
+ `vue/comment-directive`, `vue/html-button-has-type`, `vue/html-end-tags`, `vue/mustache-interpolation-spacing`, `vue/no-custom-modifiers-on-v-model`, `vue/no-deprecated-filter`, `vue/no-deprecated-html-element-is`, `vue/no-deprecated-inline-template`, `vue/no-deprecated-router-link-tag-prop`, `vue/no-deprecated-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-duplicate-attributes`, `vue/no-lone-template`, `vue/no-multiple-objects-in-class`, `vue/no-parsing-error`, `vue/no-restricted-html-elements`, `vue/no-spaces-around-equal-signs-in-attribute`, `vue/no-template-key`, `vue/no-textarea-mustache`, `vue/no-use-v-else-with-v-for`, `vue/no-use-v-if-with-v-for`, `vue/no-useless-template-attributes`, `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/require-component-is`, `vue/require-v-for-key`, `vue/v-bind-style`, `vue/v-for-delimiter-style`, `vue/v-on-style`, `vue/valid-attribute-name`, `vue/valid-v-bind`, `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-on`, `vue/valid-v-once`, `vue/valid-v-pre`, `vue/valid-v-show`, `vue/valid-v-text`
143
+
144
+ </details>
145
+
138
146
  <details>
139
147
  <summary><b>@slipher/eslint-plugin 1.1.0</b> (Seyfert bots): 15 rules</summary>
140
148
 
@@ -153,7 +161,7 @@ What each version added is in the [changelog](CHANGELOG.md).
153
161
 
154
162
  ### How it is checked
155
163
 
156
- 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 and 206 of @marcrock22/eslintcf. 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).
164
+ 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 800 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).
157
165
 
158
166
  ## VS Code extension
159
167
 
@@ -161,7 +169,8 @@ The extension shows the problems of the TypeScript files you open and type, unde
161
169
 
162
170
  ## Limits
163
171
 
164
- - **TypeScript only.** JavaScript files are not linted, even in a project with `allowJs`.
172
+ - **TypeScript only.** JavaScript files are not linted, even in a project with `allowJs`, nor the JavaScript scripts of Vue files.
173
+ - **Vue files:** 49 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.
165
174
  - **Linux x64 and Windows x64.** Other platforms need a build from source, which is not tested there.
166
175
  - **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`.
167
176
  - **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.28.0",
3
+ "version": "0.30.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.28.0",
13
- "@marcrock22/veslint-win32-x64": "0.28.0"
12
+ "@marcrock22/veslint-linux-x64": "0.30.0",
13
+ "@marcrock22/veslint-win32-x64": "0.30.0"
14
14
  },
15
15
  "keywords": [
16
16
  "typescript",