@typescript-eslint/experimental-utils
Advanced tools
Comparing version 1.9.1-alpha.4 to 1.9.1-alpha.5
@@ -7,3 +7,4 @@ "use strict"; | ||
__export(require("./Linter")); | ||
__export(require("./RuleTester")); | ||
__export(require("./SourceCode")); | ||
//# sourceMappingURL=index.js.map |
import { TSESTree, ParserServices } from '@typescript-eslint/typescript-estree'; | ||
import { ParserOptions as TSParserOptions } from './ParserOptions'; | ||
import { RuleModule, RuleFix } from './Rule'; | ||
import { Scope } from './Scope'; | ||
import { SourceCode } from './SourceCode'; | ||
declare class Linter { | ||
interface Linter { | ||
version: string; | ||
@@ -12,3 +13,6 @@ verify(code: SourceCode | string, config: Linter.Config, filename?: string): Linter.LintMessage[]; | ||
getSourceCode(): SourceCode; | ||
defineRule<TMessageIds extends string, TOptions extends readonly any[]>(name: string, rule: RuleModule<TMessageIds, TOptions>): void; | ||
defineRule<TMessageIds extends string, TOptions extends readonly any[]>(name: string, rule: { | ||
meta?: RuleModule<TMessageIds, TOptions>['meta']; | ||
create: RuleModule<TMessageIds, TOptions>['create']; | ||
}): void; | ||
defineRules<TMessageIds extends string, TOptions extends readonly any[]>(rules: Record<string, RuleModule<TMessageIds, TOptions>>): void; | ||
@@ -40,14 +44,3 @@ getRules<TMessageIds extends string, TOptions extends readonly any[]>(): Map<string, RuleModule<TMessageIds, TOptions>>; | ||
} | ||
interface ParserOptions { | ||
ecmaVersion?: 3 | 5 | 6 | 7 | 8 | 9 | 2015 | 2016 | 2017 | 2018; | ||
sourceType?: 'script' | 'module'; | ||
ecmaFeatures?: { | ||
globalReturn?: boolean; | ||
impliedStrict?: boolean; | ||
jsx?: boolean; | ||
experimentalObjectRestSpread?: boolean; | ||
[key: string]: any; | ||
}; | ||
[key: string]: any; | ||
} | ||
type ParserOptions = TSParserOptions; | ||
interface LintOptions { | ||
@@ -93,3 +86,4 @@ filename?: string; | ||
} | ||
declare const Linter: new () => Linter; | ||
export { Linter }; | ||
//# sourceMappingURL=Linter.d.ts.map |
"use strict"; | ||
/* eslint-disable @typescript-eslint/no-namespace, no-redeclare */ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const eslint_1 = require("eslint"); | ||
const Linter = eslint_1.Linter; | ||
exports.Linter = Linter; | ||
//# sourceMappingURL=Linter.js.map |
@@ -7,3 +7,3 @@ export interface ParserOptions { | ||
sourceType?: 'script' | 'module'; | ||
ecmaVersion?: number; | ||
ecmaVersion?: 3 | 5 | 6 | 7 | 8 | 9 | 2015 | 2016 | 2017 | 2018; | ||
ecmaFeatures?: { | ||
@@ -10,0 +10,0 @@ globalReturn?: boolean; |
@@ -81,3 +81,3 @@ import { ParserServices, TSESTree } from '@typescript-eslint/typescript-estree'; | ||
declare type ReportFixFunction = (fixer: RuleFixer) => null | RuleFix | RuleFix[] | IterableIterator<RuleFix>; | ||
interface ReportDescriptor<TMessageIds extends string> { | ||
interface ReportDescriptorBase<TMessageIds extends string> { | ||
/** | ||
@@ -95,2 +95,4 @@ * The parameters for the message string associated with `messageId`. | ||
messageId: TMessageIds; | ||
} | ||
interface ReportDescriptorNodeOptionalLoc { | ||
/** | ||
@@ -105,4 +107,11 @@ * The Node or AST Token which the report is being attached to | ||
} | ||
interface RuleContext<TMessageIds extends string, TOptions extends Readonly<any[]>> { | ||
interface ReportDescriptorLocOnly { | ||
/** | ||
* An override of the location of the report | ||
*/ | ||
loc: TSESTree.SourceLocation | TSESTree.LineAndColumnData; | ||
} | ||
declare type ReportDescriptor<TMessageIds extends string> = ReportDescriptorBase<TMessageIds> & (ReportDescriptorNodeOptionalLoc | ReportDescriptorLocOnly); | ||
interface RuleContext<TMessageIds extends string, TOptions extends readonly any[]> { | ||
/** | ||
* The rule ID. | ||
@@ -319,3 +328,3 @@ */ | ||
} | ||
interface RuleModule<TMessageIds extends string, TOptions extends Readonly<any[]>, TRuleListener extends RuleListener = RuleListener> { | ||
interface RuleModule<TMessageIds extends string, TOptions extends readonly any[], TRuleListener extends RuleListener = RuleListener> { | ||
/** | ||
@@ -322,0 +331,0 @@ * Metadata about the rule |
@@ -41,7 +41,7 @@ import { AST_NODE_TYPES, AST_TOKEN_TYPES } from '@typescript-eslint/typescript-estree'; | ||
} | ||
interface RuleTester { | ||
new (config?: RuleTesterConfig): RuleTester; | ||
declare interface RuleTester { | ||
run<TMessageIds extends string, TOptions extends Readonly<any[]>>(name: string, rule: RuleModule<TMessageIds, TOptions>, tests: RunTests<TMessageIds, TOptions>): void; | ||
} | ||
declare const RuleTester: new (config?: RuleTesterConfig | undefined) => RuleTester; | ||
export { InvalidTestCase, RuleTester, RuleTesterConfig, RunTests, TestCaseError, ValidTestCase, }; | ||
//# sourceMappingURL=RuleTester.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const eslint_1 = require("eslint"); | ||
const RuleTester = eslint_1.RuleTester; | ||
exports.RuleTester = RuleTester; | ||
//# sourceMappingURL=RuleTester.js.map |
import { ParserServices, TSESTree } from '@typescript-eslint/typescript-estree'; | ||
import { Scope } from './Scope'; | ||
declare namespace SourceCode { | ||
interface Program extends TSESTree.Program { | ||
comments: TSESTree.Comment[]; | ||
tokens: TSESTree.Token[]; | ||
} | ||
interface Config { | ||
text: string; | ||
ast: Program; | ||
parserServices?: ParserServices; | ||
scopeManager?: Scope.ScopeManager; | ||
visitorKeys?: VisitorKeys; | ||
} | ||
interface VisitorKeys { | ||
[nodeType: string]: string[]; | ||
} | ||
type FilterPredicate = (tokenOrComment: TSESTree.Token | TSESTree.Comment) => boolean; | ||
type CursorWithSkipOptions = number | FilterPredicate | { | ||
includeComments?: boolean; | ||
filter?: FilterPredicate; | ||
skip?: number; | ||
}; | ||
type CursorWithCountOptions = number | FilterPredicate | { | ||
includeComments?: boolean; | ||
filter?: FilterPredicate; | ||
count?: number; | ||
}; | ||
} | ||
declare class SourceCode { | ||
declare interface SourceCode { | ||
text: string; | ||
@@ -39,5 +12,2 @@ ast: SourceCode.Program; | ||
tokensAndComments: (TSESTree.Comment | TSESTree.Token)[]; | ||
constructor(text: string, ast: SourceCode.Program); | ||
constructor(config: SourceCode.Config); | ||
static splitLines(text: string): string[]; | ||
getText(node?: TSESTree.Node, beforeCount?: number, afterCount?: number): string; | ||
@@ -78,3 +48,35 @@ getLines(): string[]; | ||
} | ||
declare namespace SourceCode { | ||
interface Program extends TSESTree.Program { | ||
comments: TSESTree.Comment[]; | ||
tokens: TSESTree.Token[]; | ||
} | ||
interface Config { | ||
text: string; | ||
ast: Program; | ||
parserServices?: ParserServices; | ||
scopeManager?: Scope.ScopeManager; | ||
visitorKeys?: VisitorKeys; | ||
} | ||
interface VisitorKeys { | ||
[nodeType: string]: string[]; | ||
} | ||
type FilterPredicate = (tokenOrComment: TSESTree.Token | TSESTree.Comment) => boolean; | ||
type CursorWithSkipOptions = number | FilterPredicate | { | ||
includeComments?: boolean; | ||
filter?: FilterPredicate; | ||
skip?: number; | ||
}; | ||
type CursorWithCountOptions = number | FilterPredicate | { | ||
includeComments?: boolean; | ||
filter?: FilterPredicate; | ||
count?: number; | ||
}; | ||
} | ||
declare const SourceCode: { | ||
new (text: string, ast: SourceCode.Program): SourceCode; | ||
new (config: SourceCode.Config): SourceCode; | ||
splitLines(text: string): string[]; | ||
}; | ||
export { SourceCode }; | ||
//# sourceMappingURL=SourceCode.d.ts.map |
"use strict"; | ||
/* eslint-disable @typescript-eslint/no-namespace, no-redeclare */ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const eslint_1 = require("eslint"); | ||
const SourceCode = eslint_1.SourceCode; | ||
exports.SourceCode = SourceCode; | ||
//# sourceMappingURL=SourceCode.js.map |
{ | ||
"name": "@typescript-eslint/experimental-utils", | ||
"version": "1.9.1-alpha.4+67537b8", | ||
"version": "1.9.1-alpha.5+370ac72", | ||
"description": "(Experimental) Utilities for working with TypeScript + ESLint together", | ||
@@ -34,8 +34,9 @@ "keywords": [ | ||
"dependencies": { | ||
"@typescript-eslint/typescript-estree": "1.9.1-alpha.4+67537b8" | ||
"@typescript-eslint/typescript-estree": "1.9.1-alpha.5+370ac72" | ||
}, | ||
"peerDependencies": { | ||
"eslint": "*", | ||
"typescript": "*" | ||
}, | ||
"gitHead": "67537b863a8a98383796abb404224fdfc1c7b996" | ||
"gitHead": "370ac729689905384adb20f92240264660fcc9bc" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
85361
64
973
3
+ Added@eslint-community/eslint-utils@4.4.1(transitive)
+ Added@eslint-community/regexpp@4.12.1(transitive)
+ Added@eslint/config-array@0.18.0(transitive)
+ Added@eslint/core@0.7.0(transitive)
+ Added@eslint/eslintrc@3.1.0(transitive)
+ Added@eslint/js@9.14.0(transitive)
+ Added@eslint/object-schema@2.1.4(transitive)
+ Added@eslint/plugin-kit@0.2.2(transitive)
+ Added@humanfs/core@0.19.1(transitive)
+ Added@humanfs/node@0.16.6(transitive)
+ Added@humanwhocodes/module-importer@1.0.1(transitive)
+ Added@humanwhocodes/retry@0.3.10.4.1(transitive)
+ Added@types/estree@1.0.6(transitive)
+ Added@types/json-schema@7.0.15(transitive)
+ Addedacorn@8.14.0(transitive)
+ Addedacorn-jsx@5.3.2(transitive)
+ Addedajv@6.12.6(transitive)
+ Addedansi-styles@4.3.0(transitive)
+ Addedargparse@2.0.1(transitive)
+ Addedbalanced-match@1.0.2(transitive)
+ Addedbrace-expansion@1.1.11(transitive)
+ Addedcallsites@3.1.0(transitive)
+ Addedchalk@4.1.2(transitive)
+ Addedcolor-convert@2.0.1(transitive)
+ Addedcolor-name@1.1.4(transitive)
+ Addedconcat-map@0.0.1(transitive)
+ Addedcross-spawn@7.0.5(transitive)
+ Addeddebug@4.3.7(transitive)
+ Addeddeep-is@0.1.4(transitive)
+ Addedescape-string-regexp@4.0.0(transitive)
+ Addedeslint@9.14.0(transitive)
+ Addedeslint-scope@8.2.0(transitive)
+ Addedeslint-visitor-keys@3.4.34.2.0(transitive)
+ Addedespree@10.3.0(transitive)
+ Addedesquery@1.6.0(transitive)
+ Addedesrecurse@4.3.0(transitive)
+ Addedestraverse@5.3.0(transitive)
+ Addedesutils@2.0.3(transitive)
+ Addedfast-deep-equal@3.1.3(transitive)
+ Addedfast-json-stable-stringify@2.1.0(transitive)
+ Addedfast-levenshtein@2.0.6(transitive)
+ Addedfile-entry-cache@8.0.0(transitive)
+ Addedfind-up@5.0.0(transitive)
+ Addedflat-cache@4.0.1(transitive)
+ Addedflatted@3.3.1(transitive)
+ Addedglob-parent@6.0.2(transitive)
+ Addedglobals@14.0.0(transitive)
+ Addedhas-flag@4.0.0(transitive)
+ Addedignore@5.3.2(transitive)
+ Addedimport-fresh@3.3.0(transitive)
+ Addedimurmurhash@0.1.4(transitive)
+ Addedis-extglob@2.1.1(transitive)
+ Addedis-glob@4.0.3(transitive)
+ Addedisexe@2.0.0(transitive)
+ Addedjs-yaml@4.1.0(transitive)
+ Addedjson-buffer@3.0.1(transitive)
+ Addedjson-schema-traverse@0.4.1(transitive)
+ Addedjson-stable-stringify-without-jsonify@1.0.1(transitive)
+ Addedkeyv@4.5.4(transitive)
+ Addedlevn@0.4.1(transitive)
+ Addedlocate-path@6.0.0(transitive)
+ Addedlodash.merge@4.6.2(transitive)
+ Addedminimatch@3.1.2(transitive)
+ Addedms@2.1.3(transitive)
+ Addednatural-compare@1.4.0(transitive)
+ Addedoptionator@0.9.4(transitive)
+ Addedp-limit@3.1.0(transitive)
+ Addedp-locate@5.0.0(transitive)
+ Addedparent-module@1.0.1(transitive)
+ Addedpath-exists@4.0.0(transitive)
+ Addedpath-key@3.1.1(transitive)
+ Addedprelude-ls@1.2.1(transitive)
+ Addedpunycode@2.3.1(transitive)
+ Addedresolve-from@4.0.0(transitive)
+ Addedshebang-command@2.0.0(transitive)
+ Addedshebang-regex@3.0.0(transitive)
+ Addedstrip-json-comments@3.1.1(transitive)
+ Addedsupports-color@7.2.0(transitive)
+ Addedtext-table@0.2.0(transitive)
+ Addedtype-check@0.4.0(transitive)
+ Addeduri-js@4.4.1(transitive)
+ Addedwhich@2.0.2(transitive)
+ Addedword-wrap@1.2.5(transitive)
+ Addedyocto-queue@0.1.0(transitive)
Updated@typescript-eslint/typescript-estree@1.9.1-alpha.5+370ac72