eslint 9.20.0 → 9.20.1
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 +12 -1
- package/lib/types/index.d.ts +6 -2
- package/package.json +1 -1
package/README.md
CHANGED
@@ -56,6 +56,17 @@ After that, you can run ESLint on any file or directory like this:
|
|
56
56
|
npx eslint yourfile.js
|
57
57
|
```
|
58
58
|
|
59
|
+
### pnpm Installation
|
60
|
+
|
61
|
+
To use ESLint with pnpm, we recommend setting up a `.npmrc` file with at least the following settings:
|
62
|
+
|
63
|
+
```text
|
64
|
+
auto-install-peers=true
|
65
|
+
node-linker=hoisted
|
66
|
+
```
|
67
|
+
|
68
|
+
This ensures that pnpm installs dependencies in a way that is more compatible with npm and is less likely to produce errors.
|
69
|
+
|
59
70
|
## Configuration
|
60
71
|
|
61
72
|
You can configure rules in your `eslint.config.js` files as in this example:
|
@@ -308,7 +319,7 @@ to get your logo on our READMEs and [website](https://eslint.org/sponsors).
|
|
308
319
|
<h3>Platinum Sponsors</h3>
|
309
320
|
<p><a href="https://automattic.com"><img src="https://images.opencollective.com/automattic/d0ef3e1/logo.png" alt="Automattic" height="128"></a> <a href="https://www.airbnb.com/"><img src="https://images.opencollective.com/airbnb/d327d66/logo.png" alt="Airbnb" height="128"></a></p><h3>Gold Sponsors</h3>
|
310
321
|
<p><a href="https://qlty.sh/"><img src="https://images.opencollective.com/qltysh/33d157d/logo.png" alt="Qlty Software" height="96"></a> <a href="https://trunk.io/"><img src="https://images.opencollective.com/trunkio/fb92d60/avatar.png" alt="trunk.io" height="96"></a></p><h3>Silver Sponsors</h3>
|
311
|
-
<p><a href="https://vite.dev/"><img src="https://images.opencollective.com/vite/e6d15e1/logo.png" alt="Vite" height="64"></a> <a href="https://www.
|
322
|
+
<p><a href="https://vite.dev/"><img src="https://images.opencollective.com/vite/e6d15e1/logo.png" alt="Vite" height="64"></a> <a href="https://www.jetbrains.com/"><img src="https://images.opencollective.com/jetbrains/fe76f99/logo.png" alt="JetBrains" height="64"></a> <a href="https://liftoff.io/"><img src="https://images.opencollective.com/liftoff/5c4fa84/logo.png" alt="Liftoff" height="64"></a> <a href="https://americanexpress.io"><img src="https://avatars.githubusercontent.com/u/3853301" alt="American Express" height="64"></a></p><h3>Bronze Sponsors</h3>
|
312
323
|
<p><a href="https://cybozu.co.jp/"><img src="https://images.opencollective.com/cybozu/933e46d/logo.png" alt="Cybozu" height="32"></a> <a href="https://www.crosswordsolver.org/anagram-solver/"><img src="https://images.opencollective.com/anagram-solver/2666271/logo.png" alt="Anagram Solver" height="32"></a> <a href="https://icons8.com/"><img src="https://images.opencollective.com/icons8/7fa1641/logo.png" alt="Icons8" height="32"></a> <a href="https://discord.com"><img src="https://images.opencollective.com/discordapp/f9645d9/logo.png" alt="Discord" height="32"></a> <a href="https://www.gitbook.com"><img src="https://avatars.githubusercontent.com/u/7111340" alt="GitBook" height="32"></a> <a href="https://nolebase.ayaka.io"><img src="https://avatars.githubusercontent.com/u/11081491" alt="Neko" height="32"></a> <a href="https://nx.dev"><img src="https://avatars.githubusercontent.com/u/23692104" alt="Nx" height="32"></a> <a href="https://opensource.mercedes-benz.com/"><img src="https://avatars.githubusercontent.com/u/34240465" alt="Mercedes-Benz Group" height="32"></a> <a href="https://herocoders.com"><img src="https://avatars.githubusercontent.com/u/37549774" alt="HeroCoders" height="32"></a></p>
|
313
324
|
<h3>Technology Sponsors</h3>
|
314
325
|
Technology sponsors allow us to use their products and services for free as part of a contribution to the open source ecosystem and our work.
|
package/lib/types/index.d.ts
CHANGED
@@ -34,7 +34,8 @@ import type {
|
|
34
34
|
TraversalStep,
|
35
35
|
LanguageOptions as GenericLanguageOptions,
|
36
36
|
RuleDefinition,
|
37
|
-
RuleContext as CoreRuleContext
|
37
|
+
RuleContext as CoreRuleContext,
|
38
|
+
RuleContextTypeOptions
|
38
39
|
} from "@eslint/core";
|
39
40
|
import { JSONSchema4 } from "json-schema";
|
40
41
|
import { LegacyESLint } from "./use-at-your-own-risk.js";
|
@@ -800,7 +801,10 @@ export namespace Rule {
|
|
800
801
|
hasSuggestions?: boolean | undefined;
|
801
802
|
}
|
802
803
|
|
803
|
-
interface RuleContext extends CoreRuleContext {
|
804
|
+
interface RuleContext extends CoreRuleContext<RuleContextTypeOptions & {
|
805
|
+
LangOptions: Linter.LanguageOptions;
|
806
|
+
Code: SourceCode;
|
807
|
+
Node: ESTree.Node; }> {
|
804
808
|
// report(descriptor: ReportDescriptor): void;
|
805
809
|
}
|
806
810
|
|