mirror of
https://github.com/oxc-project/oxc.git
synced 2026-09-14 19:36:11 +08:00
9cd612f1e9
Apply the same optimization as #19978 to comments - hold a pool of `Comment` objects, and re-use those objects rather than creating new objects each time. Same as with `Token`s, `loc` property is a getter which calculates `loc` lazily, and caches it in a private property.
57 lines
1.7 KiB
TypeScript
57 lines
1.7 KiB
TypeScript
// Re-export `definePlugin`, `defineRule`, and `eslintCompatPlugin` functions
|
|
export { definePlugin, defineRule } from "./package/define.ts";
|
|
export { eslintCompatPlugin } from "./package/compat.ts";
|
|
|
|
// ESTree types
|
|
export type * as ESTree from "./generated/types";
|
|
|
|
// Plugin types
|
|
export type { Comment } from "./plugins/comments.ts";
|
|
export type { Context, LanguageOptions } from "./plugins/context.ts";
|
|
export type { Fix, Fixer, FixFn } from "./plugins/fix.ts";
|
|
export type { Globals, Envs } from "./plugins/globals.ts";
|
|
export type { CreateOnceRule, CreateRule, Plugin, Rule } from "./plugins/load.ts";
|
|
export type { Options, RuleOptionsSchema } from "./plugins/options.ts";
|
|
export type { Diagnostic, DiagnosticData, Suggestion } from "./plugins/report.ts";
|
|
export type {
|
|
Definition,
|
|
DefinitionType,
|
|
Reference,
|
|
Scope,
|
|
ScopeManager,
|
|
ScopeType,
|
|
Variable,
|
|
} from "./plugins/scope.ts";
|
|
export type { Settings } from "./plugins/settings.ts";
|
|
export type { SourceCode } from "./plugins/source_code.ts";
|
|
export type {
|
|
Token,
|
|
BooleanToken,
|
|
IdentifierToken,
|
|
JSXIdentifierToken,
|
|
JSXTextToken,
|
|
KeywordToken,
|
|
NullToken,
|
|
NumericToken,
|
|
PrivateIdentifierToken,
|
|
PunctuatorToken,
|
|
RegularExpressionToken,
|
|
StringToken,
|
|
TemplateToken,
|
|
} from "./plugins/tokens.ts";
|
|
export type {
|
|
CountOptions,
|
|
FilterFn,
|
|
RangeOptions,
|
|
SkipOptions,
|
|
} from "./plugins/tokens_methods.ts";
|
|
export type {
|
|
RuleMeta,
|
|
RuleDocs,
|
|
RuleDeprecatedInfo,
|
|
RuleReplacedByInfo,
|
|
RuleReplacedByExternalSpecifier,
|
|
} from "./plugins/rule_meta.ts";
|
|
export type { LineColumn, Location, Range, Ranged, Span } from "./plugins/location.ts";
|
|
export type { AfterHook, BeforeHook, Node, Visitor, VisitorWithHooks } from "./plugins/types.ts";
|