@marcrock22/veslint 0.34.0 → 0.35.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 +25 -9
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -45,7 +45,7 @@ veslint . --summary # a table of the rules that report problems
|
|
|
45
45
|
veslint --rule @typescript-eslint/no-floating-promises src/index.ts
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
-
Each problem is one line: `path:line:column`, the rule, its `messageId` and the message, separated by tabs.
|
|
48
|
+
Each problem is one line: `path:line:column`, the rule, its `messageId` and the message, separated by tabs, and `warning` at the end when its rule is set to `warn` (see [the line format](#the-line-format)).
|
|
49
49
|
|
|
50
50
|
```
|
|
51
51
|
src/index.ts:12:3 @typescript-eslint/no-floating-promises floatingVoid Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator.
|
|
@@ -62,7 +62,7 @@ veslint <file.ts | directory>... [--config <file>] [--rule <rule> [--no-config-l
|
|
|
62
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 (
|
|
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 (all 86 of eslint-plugin-svelte's), its template and `<style>` too. `svelte.config.js` is read as svelte-eslint-parser reads it, statically (without running it: its `compilerOptions.runes` and `kit.files` when they are literals, `const`s or object literals), unless `parserOptions.svelteConfig` is given; the rules see its `runes` (svelte-eslint-parser's own parse does not yet: its virtual code and rune globals follow `<svelte:options runes>` only). |
|
|
66
66
|
| `--config <file>` | The configuration (see below). Without it and without `--rule`, a directory is linted with the closest `eslint.config.*`. |
|
|
67
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. |
|
|
68
68
|
| `--no-config-lookup` | With `--rule`: the rule's default options, without looking for an `eslint.config.*`. |
|
|
@@ -74,6 +74,20 @@ veslint <file.ts | directory>... [--config <file>] [--rule <rule> [--no-config-l
|
|
|
74
74
|
| `--server` | A process for editors that stays alive between lints (the VS Code extension uses it). |
|
|
75
75
|
| `--version` | Prints the version. |
|
|
76
76
|
|
|
77
|
+
### The line format
|
|
78
|
+
|
|
79
|
+
Each problem is one line of fields separated by tabs:
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
path:line:column rule messageId message [fix start end text] [suggestion messageId message start end text]... [end line column] [warning]
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
- Lines and columns start at 1, and columns count UTF-16 units, as ESLint's do.
|
|
86
|
+
- A problem that is not of a rule (an unused directive comment, a configuration or parse error) has the rule `eslint` and `fatal`, `error` or `warning` in the place of the `messageId`.
|
|
87
|
+
- `fix`, `suggestion` and `end` come only with `--fixes` (and from `--server` when a request asks for them): the fix, each suggestion (a range in UTF-16 units from the start of the text, without the BOM, and the text that replaces it) and where the problem ends (ESLint's `endLine` and `endColumn`).
|
|
88
|
+
- **`warning`**, the last field, marks a problem of severity 1: a rule set to `"warn"` (or `1`), or an unused directive reported as a warning. A problem without it is an error; only errors make the exit code 1.
|
|
89
|
+
- In a message or a text, a backslash, a line feed, a carriage return and a tab are written `\\`, `\n`, `\r` and `\t`, so no field contains a tab and the fields can be counted.
|
|
90
|
+
|
|
77
91
|
With files and neither `--config` nor `--rule`, veslint prints the type TypeScript infers for each declared name, a mode for debugging.
|
|
78
92
|
|
|
79
93
|
The exit code is 0 when there are no problems, 1 when there are (warnings do not count, as in ESLint) or veslint failed, and 2 for a usage error.
|
|
@@ -100,7 +114,7 @@ Directive comments work as in ESLint 10: `eslint-disable`, `eslint-enable`, `esl
|
|
|
100
114
|
|
|
101
115
|
## Rules
|
|
102
116
|
|
|
103
|
-
veslint has **
|
|
117
|
+
veslint has **800 rules**, each with all its options, fixes and suggestions:
|
|
104
118
|
|
|
105
119
|
<details>
|
|
106
120
|
<summary><b>ESLint 10.15.0</b>: 139 rules</summary>
|
|
@@ -138,18 +152,20 @@ veslint has **795 rules**, each with all its options, fixes and suggestions:
|
|
|
138
152
|
</details>
|
|
139
153
|
|
|
140
154
|
<details>
|
|
141
|
-
<summary><b>eslint-plugin-vue 10.12.1</b> (the templates and scripts of <code>.vue</code> files, and the components of TypeScript files):
|
|
155
|
+
<summary><b>eslint-plugin-vue 10.12.1</b> (the templates and scripts of <code>.vue</code> files, and the components of TypeScript files): 256 rules</summary>
|
|
142
156
|
|
|
143
|
-
`vue/array-bracket-newline`, `vue/array-bracket-spacing`, `vue/array-element-newline`, `vue/arrow-spacing`, `vue/attribute-hyphenation`, `vue/attributes-order`, `vue/block-lang`, `vue/block-order`, `vue/block-spacing`, `vue/block-tag-newline`, `vue/brace-style`, `vue/camelcase`, `vue/comma-dangle`, `vue/comma-spacing`, `vue/comma-style`, `vue/comment-directive`, `vue/component-api-style`, `vue/component-definition-name-casing`, `vue/component-name-in-template-casing`, `vue/component-options-name-casing`, `vue/custom-event-name-casing`, `vue/define-emits-declaration`, `vue/define-macros-order`, `vue/define-props-declaration`, `vue/define-props-destructuring`, `vue/dot-location`, `vue/dot-notation`, `vue/enforce-style-attribute`, `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-comment-content-newline`, `vue/html-comment-content-spacing`, `vue/html-comment-indent`, `vue/html-end-tags`, `vue/html-quotes`, `vue/html-self-closing`, `vue/jsx-uses-vars`, `vue/key-spacing`, `vue/keyword-spacing`, `vue/match-component-file-name`, `vue/match-component-import-name`, `vue/max-attributes-per-line`, `vue/max-len`, `vue/max-lines-per-block`, `vue/max-props`, `vue/max-template-depth`, `vue/multi-word-component-names`, `vue/multiline-html-element-content-newline`, `vue/multiline-ternary`, `vue/mustache-interpolation-spacing`, `vue/new-line-between-multi-line-property`, `vue/next-tick-style`, `vue/no-arrow-functions-in-watch`, `vue/no-async-in-computed-properties`, `vue/no-bare-strings-in-template`, `vue/no-boolean-default`, `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-dollar-listeners-api`, `vue/no-deprecated-dollar-scopedslots-api`, `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-model-definition`, `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-keys`, `vue/no-dupe-v-else-if`, `vue/no-duplicate-attr-inheritance`, `vue/no-duplicate-attributes`, `vue/no-duplicate-class-names`, `vue/no-empty-component-block`, `vue/no-empty-pattern`, `vue/no-export-in-script-setup`, `vue/no-expose-after-await`, `vue/no-extra-parens`, `vue/no-implicit-coercion`, `vue/no-import-compiler-macros`, `vue/no-irregular-whitespace`, `vue/no-lifecycle-after-await`, `vue/no-literals-in-template`, `vue/no-lone-template`, `vue/no-loss-of-precision`, `vue/no-multi-spaces`, `vue/no-multiple-objects-in-class`, `vue/no-multiple-slot-args`, `vue/no-multiple-template-root`, `vue/no-mutating-props`, `vue/no-negated-condition`, `vue/no-negated-v-if-condition`, `vue/no-parsing-error`, `vue/no-potential-component-option-typo`, `vue/no-props-shadow`, `vue/no-ref-as-operand`, `vue/no-ref-object-reactivity-loss`, `vue/no-required-prop-with-default`, `vue/no-reserved-component-names`, `vue/no-reserved-keys`, `vue/no-reserved-props`, `vue/no-restricted-block`, `vue/no-restricted-call-after-await`, `vue/no-restricted-class`, `vue/no-restricted-component-names`, `vue/no-restricted-component-options`, `vue/no-restricted-custom-event`, `vue/no-restricted-html-elements`, `vue/no-restricted-props`, `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-setup-props-reactivity-loss`, `vue/no-shadow-native-events`, `vue/no-shared-component-data`, `vue/no-side-effects-in-computed-properties`, `vue/no-spaces-around-equal-signs-in-attribute`, `vue/no-sparse-arrays`, `vue/no-static-inline-styles`, `vue/no-template-key`, `vue/no-template-shadow`, `vue/no-template-target-blank`, `vue/no-textarea-mustache`, `vue/no-this-in-before-route-enter`, `vue/no-undef-components`, `vue/no-undef-directives`, `vue/no-undef-properties`, `vue/no-unsupported-features`, `vue/no-unused-components`, `vue/no-unused-emit-declarations`, `vue/no-unused-properties`, `vue/no-unused-refs`, `vue/no-unused-vars`, `vue/no-use-computed-property-like-method`, `vue/no-use-v-else-with-v-for`, `vue/no-use-v-if-with-v-for`, `vue/no-useless-concat`, `vue/no-useless-mustaches`, `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/no-watch-after-await`, `vue/object-curly-newline`, `vue/object-curly-spacing`, `vue/object-property-newline`, `vue/object-shorthand`, `vue/one-component-per-file`, `vue/operator-linebreak`, `vue/order-in-components`, `vue/padding-line-between-blocks`, `vue/padding-line-between-tags`, `vue/padding-lines-in-component-definition`, `vue/prefer-define-options`, `vue/prefer-import-from-vue`, `vue/prefer-prop-type-boolean-first`, `vue/prefer-separate-static-class`, `vue/prefer-single-event-payload`, `vue/prefer-template`, `vue/prefer-true-attribute-shorthand`, `vue/prefer-use-template-ref`, `vue/prefer-v-model`, `vue/prop-name-casing`, `vue/quote-props`, `vue/require-component-is`, `vue/require-default-export`, `vue/require-default-prop`, `vue/require-direct-export`, `vue/require-emit-validator`, `vue/require-explicit-emits`, `vue/require-explicit-slots`, `vue/require-expose`, `vue/require-macro-variable-name`, `vue/require-name-property`, `vue/require-prop-comment`, `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-typed-object-prop`, `vue/require-typed-ref`, `vue/require-v-for-key`, `vue/require-valid-default-prop`, `vue/restricted-component-names`, `vue/return-in-computed-property`, `vue/return-in-emits-validator`, `vue/singleline-html-element-content-newline`, `vue/slot-name-casing`, `vue/sort-keys`, `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/use-v-on-exact`, `vue/v-bind-style`, `vue/v-for-delimiter-style`, `vue/v-if-else-key`, `vue/v-on-event-hyphenation`, `vue/v-on-handler-style`, `vue/v-on-style`, `vue/v-slot-style`, `vue/valid-attribute-name`, `vue/valid-define-emits`, `vue/valid-define-options`, `vue/valid-define-props`, `vue/valid-model-definition`, `vue/valid-next-tick`, `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-for`, `vue/valid-v-html`, `vue/valid-v-if`, `vue/valid-v-is`, `vue/valid-v-memo`, `vue/valid-v-model`, `vue/valid-v-on`, `vue/valid-v-once`, `vue/valid-v-pre`, `vue/valid-v-show`, `vue/valid-v-slot`, `vue/valid-v-text`
|
|
157
|
+
`vue/array-bracket-newline`, `vue/array-bracket-spacing`, `vue/array-element-newline`, `vue/arrow-spacing`, `vue/attribute-hyphenation`, `vue/attributes-order`, `vue/block-lang`, `vue/block-order`, `vue/block-spacing`, `vue/block-tag-newline`, `vue/brace-style`, `vue/camelcase`, `vue/comma-dangle`, `vue/comma-spacing`, `vue/comma-style`, `vue/comment-directive`, `vue/component-api-style`, `vue/component-definition-name-casing`, `vue/component-name-in-template-casing`, `vue/component-options-name-casing`, `vue/custom-event-name-casing`, `vue/define-emits-declaration`, `vue/define-macros-order`, `vue/define-props-declaration`, `vue/define-props-destructuring`, `vue/dot-location`, `vue/dot-notation`, `vue/enforce-style-attribute`, `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-comment-content-newline`, `vue/html-comment-content-spacing`, `vue/html-comment-indent`, `vue/html-end-tags`, `vue/html-indent`, `vue/html-quotes`, `vue/html-self-closing`, `vue/jsx-uses-vars`, `vue/key-spacing`, `vue/keyword-spacing`, `vue/match-component-file-name`, `vue/match-component-import-name`, `vue/max-attributes-per-line`, `vue/max-len`, `vue/max-lines-per-block`, `vue/max-props`, `vue/max-template-depth`, `vue/multi-word-component-names`, `vue/multiline-html-element-content-newline`, `vue/multiline-ternary`, `vue/mustache-interpolation-spacing`, `vue/new-line-between-multi-line-property`, `vue/next-tick-style`, `vue/no-arrow-functions-in-watch`, `vue/no-async-in-computed-properties`, `vue/no-bare-strings-in-template`, `vue/no-boolean-default`, `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-dollar-listeners-api`, `vue/no-deprecated-dollar-scopedslots-api`, `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-model-definition`, `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-keys`, `vue/no-dupe-v-else-if`, `vue/no-duplicate-attr-inheritance`, `vue/no-duplicate-attributes`, `vue/no-duplicate-class-names`, `vue/no-empty-component-block`, `vue/no-empty-pattern`, `vue/no-export-in-script-setup`, `vue/no-expose-after-await`, `vue/no-extra-parens`, `vue/no-implicit-coercion`, `vue/no-import-compiler-macros`, `vue/no-irregular-whitespace`, `vue/no-lifecycle-after-await`, `vue/no-literals-in-template`, `vue/no-lone-template`, `vue/no-loss-of-precision`, `vue/no-multi-spaces`, `vue/no-multiple-objects-in-class`, `vue/no-multiple-slot-args`, `vue/no-multiple-template-root`, `vue/no-mutating-props`, `vue/no-negated-condition`, `vue/no-negated-v-if-condition`, `vue/no-parsing-error`, `vue/no-potential-component-option-typo`, `vue/no-props-shadow`, `vue/no-ref-as-operand`, `vue/no-ref-object-reactivity-loss`, `vue/no-required-prop-with-default`, `vue/no-reserved-component-names`, `vue/no-reserved-keys`, `vue/no-reserved-props`, `vue/no-restricted-block`, `vue/no-restricted-call-after-await`, `vue/no-restricted-class`, `vue/no-restricted-component-names`, `vue/no-restricted-component-options`, `vue/no-restricted-custom-event`, `vue/no-restricted-html-elements`, `vue/no-restricted-props`, `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-setup-props-reactivity-loss`, `vue/no-shadow-native-events`, `vue/no-shared-component-data`, `vue/no-side-effects-in-computed-properties`, `vue/no-spaces-around-equal-signs-in-attribute`, `vue/no-sparse-arrays`, `vue/no-static-inline-styles`, `vue/no-template-key`, `vue/no-template-shadow`, `vue/no-template-target-blank`, `vue/no-textarea-mustache`, `vue/no-this-in-before-route-enter`, `vue/no-undef-components`, `vue/no-undef-directives`, `vue/no-undef-properties`, `vue/no-unsupported-features`, `vue/no-unused-components`, `vue/no-unused-emit-declarations`, `vue/no-unused-properties`, `vue/no-unused-refs`, `vue/no-unused-vars`, `vue/no-use-computed-property-like-method`, `vue/no-use-v-else-with-v-for`, `vue/no-use-v-if-with-v-for`, `vue/no-useless-concat`, `vue/no-useless-mustaches`, `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/no-watch-after-await`, `vue/object-curly-newline`, `vue/object-curly-spacing`, `vue/object-property-newline`, `vue/object-shorthand`, `vue/one-component-per-file`, `vue/operator-linebreak`, `vue/order-in-components`, `vue/padding-line-between-blocks`, `vue/padding-line-between-tags`, `vue/padding-lines-in-component-definition`, `vue/prefer-define-options`, `vue/prefer-import-from-vue`, `vue/prefer-prop-type-boolean-first`, `vue/prefer-separate-static-class`, `vue/prefer-single-event-payload`, `vue/prefer-template`, `vue/prefer-true-attribute-shorthand`, `vue/prefer-use-template-ref`, `vue/prefer-v-model`, `vue/prop-name-casing`, `vue/quote-props`, `vue/require-component-is`, `vue/require-default-export`, `vue/require-default-prop`, `vue/require-direct-export`, `vue/require-emit-validator`, `vue/require-explicit-emits`, `vue/require-explicit-slots`, `vue/require-expose`, `vue/require-macro-variable-name`, `vue/require-name-property`, `vue/require-prop-comment`, `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-typed-object-prop`, `vue/require-typed-ref`, `vue/require-v-for-key`, `vue/require-valid-default-prop`, `vue/restricted-component-names`, `vue/return-in-computed-property`, `vue/return-in-emits-validator`, `vue/script-indent`, `vue/singleline-html-element-content-newline`, `vue/slot-name-casing`, `vue/sort-keys`, `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/use-v-on-exact`, `vue/v-bind-style`, `vue/v-for-delimiter-style`, `vue/v-if-else-key`, `vue/v-on-event-hyphenation`, `vue/v-on-handler-style`, `vue/v-on-style`, `vue/v-slot-style`, `vue/valid-attribute-name`, `vue/valid-define-emits`, `vue/valid-define-options`, `vue/valid-define-props`, `vue/valid-model-definition`, `vue/valid-next-tick`, `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-for`, `vue/valid-v-html`, `vue/valid-v-if`, `vue/valid-v-is`, `vue/valid-v-memo`, `vue/valid-v-model`, `vue/valid-v-on`, `vue/valid-v-once`, `vue/valid-v-pre`, `vue/valid-v-show`, `vue/valid-v-slot`, `vue/valid-v-text`
|
|
144
158
|
|
|
145
159
|
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`.
|
|
146
160
|
|
|
147
161
|
</details>
|
|
148
162
|
|
|
149
163
|
<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):
|
|
164
|
+
<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): 86 rules</summary>
|
|
165
|
+
|
|
166
|
+
`svelte/@typescript-eslint/no-unnecessary-condition`, `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/indent`, `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-compile`, `svelte/valid-each-key`, `svelte/valid-prop-names-in-kit-pages`, `svelte/valid-style-parse`
|
|
151
167
|
|
|
152
|
-
`svelte/
|
|
168
|
+
`svelte/valid-compile` and the `unused` message of `svelte/no-unused-svelte-ignore` run veslint's own port of the warnings and errors of the Svelte 5.56.0 compiler (no JavaScript engine); a `<style>` in Sass, Less, Stylus or PostCSS is not compiled (its contents are left out, as eslint-plugin-svelte does when it cannot transform them).
|
|
153
169
|
|
|
154
170
|
</details>
|
|
155
171
|
|
|
@@ -171,7 +187,7 @@ What each version added is in the [changelog](CHANGELOG.md).
|
|
|
171
187
|
|
|
172
188
|
### How it is checked
|
|
173
189
|
|
|
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,
|
|
190
|
+
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,090 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).
|
|
175
191
|
|
|
176
192
|
## VS Code extension
|
|
177
193
|
|
|
@@ -180,7 +196,7 @@ The extension shows the problems of the TypeScript files you open and type, unde
|
|
|
180
196
|
## Limits
|
|
181
197
|
|
|
182
198
|
- **TypeScript only.** JavaScript files are not linted, even in a project with `allowJs`, nor the JavaScript scripts of Vue and Svelte files.
|
|
183
|
-
- **Vue files:**
|
|
199
|
+
- **Vue files:** all 256 rules of eslint-plugin-vue. `<!-- 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.
|
|
184
200
|
- **Linux x64 and Windows x64.** Other platforms need a build from source, which is not tested there.
|
|
185
201
|
- **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`.
|
|
186
202
|
- **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.35.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.35.0",
|
|
13
|
+
"@marcrock22/veslint-win32-x64": "0.35.0"
|
|
14
14
|
},
|
|
15
15
|
"keywords": [
|
|
16
16
|
"typescript",
|