@marcrock22/veslint 0.35.0 → 0.35.2

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 +3 -2
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -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 (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). |
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 parse and the rules follow its `runes` after `parserOptions.svelteFeatures.runes` and `<svelte:options runes>`, as svelte-eslint-parser does. |
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.*`. |
@@ -196,7 +196,8 @@ The extension shows the problems of the TypeScript files you open and type, unde
196
196
  ## Limits
197
197
 
198
198
  - **TypeScript only.** JavaScript files are not linted, even in a project with `allowJs`, nor the JavaScript scripts of Vue and Svelte 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.
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. 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.
200
+ - **Svelte files:** a `compilerOptions.runes` given as a function in `parserOptions.svelteConfig` is not called (veslint runs no JavaScript to lint, and the resolved configuration has no functions): veslint parses as if `runes` were not set (the file's rune symbols decide), where svelte-eslint-parser calls it with the file's name. Give `parserOptions.svelteFeatures.runes` or `<svelte:options runes>` instead. (In `svelte.config.js` a function is not called by svelte-eslint-parser either, which reads that file statically: there veslint gives what ESLint gives.)
200
201
  - **Linux x64 and Windows x64.** Other platforms need a build from source, which is not tested there.
201
202
  - **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`.
202
203
  - **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.35.0",
3
+ "version": "0.35.2",
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.35.0",
13
- "@marcrock22/veslint-win32-x64": "0.35.0"
12
+ "@marcrock22/veslint-linux-x64": "0.35.2",
13
+ "@marcrock22/veslint-win32-x64": "0.35.2"
14
14
  },
15
15
  "keywords": [
16
16
  "typescript",