@marcrock22/veslint 0.27.0 → 0.28.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 +5 -3
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -76,14 +76,16 @@ With files and neither `--config` nor `--rule`, veslint prints the type TypeScri
76
76
 
77
77
  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.
78
78
 
79
- Environment variables: `VESLINT_TIMEOUT_MS` (how long to wait for each answer of the TypeScript compiler, 30000 by default) and `VESLINT_CPUS` (how many CPUs veslint and the compiler use: 2 by default, which is fastest; 0 for all).
79
+ Environment variables: `VESLINT_TIMEOUT_MS` (how long to wait for each answer of the TypeScript compiler, 30000 by default), `VESLINT_CPUS` (how many CPUs veslint and the compiler use: 2 by default, which is fastest; 0 for all) and `VESLINT_CONFIG_CACHE` (`0` resolves the `eslint.config.*` again on every run, see [Configuration](#configuration)).
80
80
 
81
81
  ## Configuration
82
82
 
83
83
  `--config` takes one of these:
84
84
 
85
85
  - **An ESLint configuration** (`eslint.config.js`, `.mjs`, `.cjs`, `.ts`, `.mts`, `.cts`). It is JavaScript, so veslint asks your project's own ESLint to resolve it, which needs [`bun`](https://bun.sh) and ESLint installed in the project. `files`, `ignores`, rules per folder, `linterOptions` and `languageOptions` work as in ESLint.
86
- - **The resolved configuration** that `--print-config` prints. It needs neither `bun` nor ESLint: save it once and lint with it.
86
+
87
+ Resolving it loads ESLint and every plugin, often more than a second, so veslint saves what ESLint resolved in `node_modules/.cache/veslint` (the closest `node_modules`) and uses it again until something it came from changes: the configuration, a file or module it reads (including the plugins), an environment variable it reads, the files to lint, or the `eslint.config.*` that applies to a folder. `VESLINT_CONFIG_CACHE=0` turns that off.
88
+ - **The resolved configuration** that `--print-config` prints. It needs neither `bun` nor ESLint: save it once and lint with it. The paths in it are relative to its own folder, so save it inside the project, at the place you ran `--print-config` from or above it, for example next to the `eslint.config.*` (`veslint --print-config . > veslint.json`). Saved elsewhere, its files are not found.
87
89
  - **A JSON with a `rules` section**, like the output of `eslint --print-config`:
88
90
 
89
91
  ```json
@@ -161,7 +163,7 @@ The extension shows the problems of the TypeScript files you open and type, unde
161
163
 
162
164
  - **TypeScript only.** JavaScript files are not linted, even in a project with `allowJs`.
163
165
  - **Linux x64 and Windows x64.** Other platforms need a build from source, which is not tested there.
164
- - **An `eslint.config.*` needs `bun`** to be read; the resolved configuration (`--print-config`) does not.
166
+ - **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`.
165
167
  - **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.
166
168
  - **Plugins:** only the rules listed above. Rules of other plugins are skipped with a warning.
167
169
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marcrock22/veslint",
3
- "version": "0.27.0",
3
+ "version": "0.28.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.27.0",
13
- "@marcrock22/veslint-win32-x64": "0.27.0"
12
+ "@marcrock22/veslint-linux-x64": "0.28.0",
13
+ "@marcrock22/veslint-win32-x64": "0.28.0"
14
14
  },
15
15
  "keywords": [
16
16
  "typescript",