Initial React project

This commit is contained in:
Johan
2026-03-17 00:42:10 +01:00
parent c9031f2275
commit 8bca9680e4
1317 changed files with 48700 additions and 23334 deletions

View File

@@ -74,17 +74,6 @@ import type {
} from "@eslint/core";
import { LegacyESLint } from "./use-at-your-own-risk.js";
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
/** Adds matching `:exit` selectors for all properties of a `RuleVisitor`. */
type WithExit<RuleVisitorType extends RuleVisitor> = {
[Key in keyof RuleVisitorType as
| Key
| `${Key & string}:exit`]: RuleVisitorType[Key];
};
//------------------------------------------------------------------------------
// Exports
//------------------------------------------------------------------------------
@@ -689,17 +678,470 @@ export namespace Rule {
type NodeTypes = ESTree.Node["type"];
interface NodeListener
extends WithExit<
{
[Node in Rule.Node as Node["type"]]?:
| ((node: Node) => void)
| undefined;
} & {
// A `Program` visitor's node type has no `parent` property.
Program?: ((node: AST.Program) => void) | undefined;
}
> {}
interface NodeListener extends RuleVisitor {
ArrayExpression?:
| ((node: ESTree.ArrayExpression & NodeParentExtension) => void)
| undefined;
"ArrayExpression:exit"?:
| ((node: ESTree.ArrayExpression & NodeParentExtension) => void)
| undefined;
ArrayPattern?:
| ((node: ESTree.ArrayPattern & NodeParentExtension) => void)
| undefined;
"ArrayPattern:exit"?:
| ((node: ESTree.ArrayPattern & NodeParentExtension) => void)
| undefined;
ArrowFunctionExpression?:
| ((
node: ESTree.ArrowFunctionExpression & NodeParentExtension,
) => void)
| undefined;
"ArrowFunctionExpression:exit"?:
| ((
node: ESTree.ArrowFunctionExpression & NodeParentExtension,
) => void)
| undefined;
AssignmentExpression?:
| ((
node: ESTree.AssignmentExpression & NodeParentExtension,
) => void)
| undefined;
"AssignmentExpression:exit"?:
| ((
node: ESTree.AssignmentExpression & NodeParentExtension,
) => void)
| undefined;
AssignmentPattern?:
| ((node: ESTree.AssignmentPattern & NodeParentExtension) => void)
| undefined;
"AssignmentPattern:exit"?:
| ((node: ESTree.AssignmentPattern & NodeParentExtension) => void)
| undefined;
AwaitExpression?:
| ((node: ESTree.AwaitExpression & NodeParentExtension) => void)
| undefined;
"AwaitExpression:exit"?:
| ((node: ESTree.AwaitExpression & NodeParentExtension) => void)
| undefined;
BinaryExpression?:
| ((node: ESTree.BinaryExpression & NodeParentExtension) => void)
| undefined;
"BinaryExpression:exit"?:
| ((node: ESTree.BinaryExpression & NodeParentExtension) => void)
| undefined;
BlockStatement?:
| ((node: ESTree.BlockStatement & NodeParentExtension) => void)
| undefined;
"BlockStatement:exit"?:
| ((node: ESTree.BlockStatement & NodeParentExtension) => void)
| undefined;
BreakStatement?:
| ((node: ESTree.BreakStatement & NodeParentExtension) => void)
| undefined;
"BreakStatement:exit"?:
| ((node: ESTree.BreakStatement & NodeParentExtension) => void)
| undefined;
CallExpression?:
| ((
node: ESTree.SimpleCallExpression & NodeParentExtension,
) => void)
| undefined;
"CallExpression:exit"?:
| ((
node: ESTree.SimpleCallExpression & NodeParentExtension,
) => void)
| undefined;
CatchClause?:
| ((node: ESTree.CatchClause & NodeParentExtension) => void)
| undefined;
"CatchClause:exit"?:
| ((node: ESTree.CatchClause & NodeParentExtension) => void)
| undefined;
ChainExpression?:
| ((node: ESTree.ChainExpression & NodeParentExtension) => void)
| undefined;
"ChainExpression:exit"?:
| ((node: ESTree.ChainExpression & NodeParentExtension) => void)
| undefined;
ClassBody?:
| ((node: ESTree.ClassBody & NodeParentExtension) => void)
| undefined;
"ClassBody:exit"?:
| ((node: ESTree.ClassBody & NodeParentExtension) => void)
| undefined;
ClassDeclaration?:
| ((node: ESTree.ClassDeclaration & NodeParentExtension) => void)
| undefined;
"ClassDeclaration:exit"?:
| ((node: ESTree.ClassDeclaration & NodeParentExtension) => void)
| undefined;
ClassExpression?:
| ((node: ESTree.ClassExpression & NodeParentExtension) => void)
| undefined;
"ClassExpression:exit"?:
| ((node: ESTree.ClassExpression & NodeParentExtension) => void)
| undefined;
ConditionalExpression?:
| ((
node: ESTree.ConditionalExpression & NodeParentExtension,
) => void)
| undefined;
"ConditionalExpression:exit"?:
| ((
node: ESTree.ConditionalExpression & NodeParentExtension,
) => void)
| undefined;
ContinueStatement?:
| ((node: ESTree.ContinueStatement & NodeParentExtension) => void)
| undefined;
"ContinueStatement:exit"?:
| ((node: ESTree.ContinueStatement & NodeParentExtension) => void)
| undefined;
DebuggerStatement?:
| ((node: ESTree.DebuggerStatement & NodeParentExtension) => void)
| undefined;
"DebuggerStatement:exit"?:
| ((node: ESTree.DebuggerStatement & NodeParentExtension) => void)
| undefined;
DoWhileStatement?:
| ((node: ESTree.DoWhileStatement & NodeParentExtension) => void)
| undefined;
"DoWhileStatement:exit"?:
| ((node: ESTree.DoWhileStatement & NodeParentExtension) => void)
| undefined;
EmptyStatement?:
| ((node: ESTree.EmptyStatement & NodeParentExtension) => void)
| undefined;
"EmptyStatement:exit"?:
| ((node: ESTree.EmptyStatement & NodeParentExtension) => void)
| undefined;
ExportAllDeclaration?:
| ((
node: ESTree.ExportAllDeclaration & NodeParentExtension,
) => void)
| undefined;
"ExportAllDeclaration:exit"?:
| ((
node: ESTree.ExportAllDeclaration & NodeParentExtension,
) => void)
| undefined;
ExportDefaultDeclaration?:
| ((
node: ESTree.ExportDefaultDeclaration & NodeParentExtension,
) => void)
| undefined;
"ExportDefaultDeclaration:exit"?:
| ((
node: ESTree.ExportDefaultDeclaration & NodeParentExtension,
) => void)
| undefined;
ExportNamedDeclaration?:
| ((
node: ESTree.ExportNamedDeclaration & NodeParentExtension,
) => void)
| undefined;
"ExportNamedDeclaration:exit"?:
| ((
node: ESTree.ExportNamedDeclaration & NodeParentExtension,
) => void)
| undefined;
ExportSpecifier?:
| ((node: ESTree.ExportSpecifier & NodeParentExtension) => void)
| undefined;
"ExportSpecifier:exit"?:
| ((node: ESTree.ExportSpecifier & NodeParentExtension) => void)
| undefined;
ExpressionStatement?:
| ((node: ESTree.ExpressionStatement & NodeParentExtension) => void)
| undefined;
"ExpressionStatement:exit"?:
| ((node: ESTree.ExpressionStatement & NodeParentExtension) => void)
| undefined;
ForInStatement?:
| ((node: ESTree.ForInStatement & NodeParentExtension) => void)
| undefined;
"ForInStatement:exit"?:
| ((node: ESTree.ForInStatement & NodeParentExtension) => void)
| undefined;
ForOfStatement?:
| ((node: ESTree.ForOfStatement & NodeParentExtension) => void)
| undefined;
"ForOfStatement:exit"?:
| ((node: ESTree.ForOfStatement & NodeParentExtension) => void)
| undefined;
ForStatement?:
| ((node: ESTree.ForStatement & NodeParentExtension) => void)
| undefined;
"ForStatement:exit"?:
| ((node: ESTree.ForStatement & NodeParentExtension) => void)
| undefined;
FunctionDeclaration?:
| ((node: ESTree.FunctionDeclaration & NodeParentExtension) => void)
| undefined;
"FunctionDeclaration:exit"?:
| ((node: ESTree.FunctionDeclaration & NodeParentExtension) => void)
| undefined;
FunctionExpression?:
| ((node: ESTree.FunctionExpression & NodeParentExtension) => void)
| undefined;
"FunctionExpression:exit"?:
| ((node: ESTree.FunctionExpression & NodeParentExtension) => void)
| undefined;
Identifier?:
| ((node: ESTree.Identifier & NodeParentExtension) => void)
| undefined;
"Identifier:exit"?:
| ((node: ESTree.Identifier & NodeParentExtension) => void)
| undefined;
IfStatement?:
| ((node: ESTree.IfStatement & NodeParentExtension) => void)
| undefined;
"IfStatement:exit"?:
| ((node: ESTree.IfStatement & NodeParentExtension) => void)
| undefined;
ImportDeclaration?:
| ((node: ESTree.ImportDeclaration & NodeParentExtension) => void)
| undefined;
"ImportDeclaration:exit"?:
| ((node: ESTree.ImportDeclaration & NodeParentExtension) => void)
| undefined;
ImportDefaultSpecifier?:
| ((
node: ESTree.ImportDefaultSpecifier & NodeParentExtension,
) => void)
| undefined;
"ImportDefaultSpecifier:exit"?:
| ((
node: ESTree.ImportDefaultSpecifier & NodeParentExtension,
) => void)
| undefined;
ImportExpression?:
| ((node: ESTree.ImportExpression & NodeParentExtension) => void)
| undefined;
"ImportExpression:exit"?:
| ((node: ESTree.ImportExpression & NodeParentExtension) => void)
| undefined;
ImportNamespaceSpecifier?:
| ((
node: ESTree.ImportNamespaceSpecifier & NodeParentExtension,
) => void)
| undefined;
"ImportNamespaceSpecifier:exit"?:
| ((
node: ESTree.ImportNamespaceSpecifier & NodeParentExtension,
) => void)
| undefined;
ImportSpecifier?:
| ((node: ESTree.ImportSpecifier & NodeParentExtension) => void)
| undefined;
"ImportSpecifier:exit"?:
| ((node: ESTree.ImportSpecifier & NodeParentExtension) => void)
| undefined;
LabeledStatement?:
| ((node: ESTree.LabeledStatement & NodeParentExtension) => void)
| undefined;
"LabeledStatement:exit"?:
| ((node: ESTree.LabeledStatement & NodeParentExtension) => void)
| undefined;
Literal?:
| ((node: ESTree.Literal & NodeParentExtension) => void)
| undefined;
"Literal:exit"?:
| ((node: ESTree.Literal & NodeParentExtension) => void)
| undefined;
LogicalExpression?:
| ((node: ESTree.LogicalExpression & NodeParentExtension) => void)
| undefined;
"LogicalExpression:exit"?:
| ((node: ESTree.LogicalExpression & NodeParentExtension) => void)
| undefined;
MemberExpression?:
| ((node: ESTree.MemberExpression & NodeParentExtension) => void)
| undefined;
"MemberExpression:exit"?:
| ((node: ESTree.MemberExpression & NodeParentExtension) => void)
| undefined;
MetaProperty?:
| ((node: ESTree.MetaProperty & NodeParentExtension) => void)
| undefined;
"MetaProperty:exit"?:
| ((node: ESTree.MetaProperty & NodeParentExtension) => void)
| undefined;
MethodDefinition?:
| ((node: ESTree.MethodDefinition & NodeParentExtension) => void)
| undefined;
"MethodDefinition:exit"?:
| ((node: ESTree.MethodDefinition & NodeParentExtension) => void)
| undefined;
NewExpression?:
| ((node: ESTree.NewExpression & NodeParentExtension) => void)
| undefined;
"NewExpression:exit"?:
| ((node: ESTree.NewExpression & NodeParentExtension) => void)
| undefined;
ObjectExpression?:
| ((node: ESTree.ObjectExpression & NodeParentExtension) => void)
| undefined;
"ObjectExpression:exit"?:
| ((node: ESTree.ObjectExpression & NodeParentExtension) => void)
| undefined;
ObjectPattern?:
| ((node: ESTree.ObjectPattern & NodeParentExtension) => void)
| undefined;
"ObjectPattern:exit"?:
| ((node: ESTree.ObjectPattern & NodeParentExtension) => void)
| undefined;
PrivateIdentifier?:
| ((node: ESTree.PrivateIdentifier & NodeParentExtension) => void)
| undefined;
"PrivateIdentifier:exit"?:
| ((node: ESTree.PrivateIdentifier & NodeParentExtension) => void)
| undefined;
Program?: ((node: AST.Program) => void) | undefined;
"Program:exit"?: ((node: AST.Program) => void) | undefined;
Property?:
| ((node: ESTree.Property & NodeParentExtension) => void)
| undefined;
"Property:exit"?:
| ((node: ESTree.Property & NodeParentExtension) => void)
| undefined;
PropertyDefinition?:
| ((node: ESTree.PropertyDefinition & NodeParentExtension) => void)
| undefined;
"PropertyDefinition:exit"?:
| ((node: ESTree.PropertyDefinition & NodeParentExtension) => void)
| undefined;
RestElement?:
| ((node: ESTree.RestElement & NodeParentExtension) => void)
| undefined;
"RestElement:exit"?:
| ((node: ESTree.RestElement & NodeParentExtension) => void)
| undefined;
ReturnStatement?:
| ((node: ESTree.ReturnStatement & NodeParentExtension) => void)
| undefined;
"ReturnStatement:exit"?:
| ((node: ESTree.ReturnStatement & NodeParentExtension) => void)
| undefined;
SequenceExpression?:
| ((node: ESTree.SequenceExpression & NodeParentExtension) => void)
| undefined;
"SequenceExpression:exit"?:
| ((node: ESTree.SequenceExpression & NodeParentExtension) => void)
| undefined;
SpreadElement?:
| ((node: ESTree.SpreadElement & NodeParentExtension) => void)
| undefined;
"SpreadElement:exit"?:
| ((node: ESTree.SpreadElement & NodeParentExtension) => void)
| undefined;
StaticBlock?:
| ((node: ESTree.StaticBlock & NodeParentExtension) => void)
| undefined;
"StaticBlock:exit"?:
| ((node: ESTree.StaticBlock & NodeParentExtension) => void)
| undefined;
Super?:
| ((node: ESTree.Super & NodeParentExtension) => void)
| undefined;
"Super:exit"?:
| ((node: ESTree.Super & NodeParentExtension) => void)
| undefined;
SwitchCase?:
| ((node: ESTree.SwitchCase & NodeParentExtension) => void)
| undefined;
"SwitchCase:exit"?:
| ((node: ESTree.SwitchCase & NodeParentExtension) => void)
| undefined;
SwitchStatement?:
| ((node: ESTree.SwitchStatement & NodeParentExtension) => void)
| undefined;
"SwitchStatement:exit"?:
| ((node: ESTree.SwitchStatement & NodeParentExtension) => void)
| undefined;
TaggedTemplateExpression?:
| ((
node: ESTree.TaggedTemplateExpression & NodeParentExtension,
) => void)
| undefined;
"TaggedTemplateExpression:exit"?:
| ((
node: ESTree.TaggedTemplateExpression & NodeParentExtension,
) => void)
| undefined;
TemplateElement?:
| ((node: ESTree.TemplateElement & NodeParentExtension) => void)
| undefined;
"TemplateElement:exit"?:
| ((node: ESTree.TemplateElement & NodeParentExtension) => void)
| undefined;
TemplateLiteral?:
| ((node: ESTree.TemplateLiteral & NodeParentExtension) => void)
| undefined;
"TemplateLiteral:exit"?:
| ((node: ESTree.TemplateLiteral & NodeParentExtension) => void)
| undefined;
ThisExpression?:
| ((node: ESTree.ThisExpression & NodeParentExtension) => void)
| undefined;
"ThisExpression:exit"?:
| ((node: ESTree.ThisExpression & NodeParentExtension) => void)
| undefined;
ThrowStatement?:
| ((node: ESTree.ThrowStatement & NodeParentExtension) => void)
| undefined;
"ThrowStatement:exit"?:
| ((node: ESTree.ThrowStatement & NodeParentExtension) => void)
| undefined;
TryStatement?:
| ((node: ESTree.TryStatement & NodeParentExtension) => void)
| undefined;
"TryStatement:exit"?:
| ((node: ESTree.TryStatement & NodeParentExtension) => void)
| undefined;
UnaryExpression?:
| ((node: ESTree.UnaryExpression & NodeParentExtension) => void)
| undefined;
"UnaryExpression:exit"?:
| ((node: ESTree.UnaryExpression & NodeParentExtension) => void)
| undefined;
UpdateExpression?:
| ((node: ESTree.UpdateExpression & NodeParentExtension) => void)
| undefined;
"UpdateExpression:exit"?:
| ((node: ESTree.UpdateExpression & NodeParentExtension) => void)
| undefined;
VariableDeclaration?:
| ((node: ESTree.VariableDeclaration & NodeParentExtension) => void)
| undefined;
"VariableDeclaration:exit"?:
| ((node: ESTree.VariableDeclaration & NodeParentExtension) => void)
| undefined;
VariableDeclarator?:
| ((node: ESTree.VariableDeclarator & NodeParentExtension) => void)
| undefined;
"VariableDeclarator:exit"?:
| ((node: ESTree.VariableDeclarator & NodeParentExtension) => void)
| undefined;
WhileStatement?:
| ((node: ESTree.WhileStatement & NodeParentExtension) => void)
| undefined;
"WhileStatement:exit"?:
| ((node: ESTree.WhileStatement & NodeParentExtension) => void)
| undefined;
WithStatement?:
| ((node: ESTree.WithStatement & NodeParentExtension) => void)
| undefined;
"WithStatement:exit"?:
| ((node: ESTree.WithStatement & NodeParentExtension) => void)
| undefined;
YieldExpression?:
| ((node: ESTree.YieldExpression & NodeParentExtension) => void)
| undefined;
"YieldExpression:exit"?:
| ((node: ESTree.YieldExpression & NodeParentExtension) => void)
| undefined;
}
interface NodeParentExtension {
parent: Node;

12
node_modules/eslint/package.json generated vendored
View File

@@ -1,6 +1,6 @@
{
"name": "eslint",
"version": "9.39.2",
"version": "9.39.4",
"author": "Nicholas C. Zakas <nicholas+npm@nczconsulting.com>",
"description": "An AST-based pattern checker for JavaScript.",
"type": "commonjs",
@@ -108,17 +108,17 @@
"dependencies": {
"@eslint-community/eslint-utils": "^4.8.0",
"@eslint-community/regexpp": "^4.12.1",
"@eslint/config-array": "^0.21.1",
"@eslint/config-array": "^0.21.2",
"@eslint/config-helpers": "^0.4.2",
"@eslint/core": "^0.17.0",
"@eslint/eslintrc": "^3.3.1",
"@eslint/js": "9.39.2",
"@eslint/eslintrc": "^3.3.5",
"@eslint/js": "9.39.4",
"@eslint/plugin-kit": "^0.4.1",
"@humanfs/node": "^0.16.6",
"@humanwhocodes/module-importer": "^1.0.1",
"@humanwhocodes/retry": "^0.4.2",
"@types/estree": "^1.0.6",
"ajv": "^6.12.4",
"ajv": "^6.14.0",
"chalk": "^4.0.0",
"cross-spawn": "^7.0.6",
"debug": "^4.3.2",
@@ -137,7 +137,7 @@
"is-glob": "^4.0.0",
"json-stable-stringify-without-jsonify": "^1.0.1",
"lodash.merge": "^4.6.2",
"minimatch": "^3.1.2",
"minimatch": "^3.1.5",
"natural-compare": "^1.4.0",
"optionator": "^0.9.3"
},