Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork77
feat: add eslint-plugins#105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Draft
tyankatsu0105 wants to merge4 commits intovuejs:masterChoose a base branch fromtyankatsu0105:feat/add-plugin-utils
base:master
Could not load branches
Branch not found:{{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline, and old review comments may become outdated.
Uh oh!
There was an error while loading.Please reload this page.
Draft
Changes fromall commits
Commits
Show all changes
4 commits Select commitHold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
The table of contents is too big for display.
Diff view
Diff view
Uh oh!
There was an error while loading.Please reload this page.
There are no files selected for viewing
1 change: 1 addition & 0 deletionssrc/eslint-plugins/README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| The code in this directory is designed to be used in ESLint plugins, such as `eslint-plugin-vue`. |
178 changes: 178 additions & 0 deletionssrc/eslint-plugins/global.d.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,178 @@ | ||
| import * as VAST from './types/ast' | ||
| import * as VNODE from './types/node' | ||
| import * as parserServices from './types/parser-services' | ||
| import * as eslint from 'eslint' | ||
| declare global { | ||
| // **** Rule Helpers **** | ||
| type RuleModule = eslint.Rule.RuleModule | ||
| type RuleContext = eslint.Rule.RuleContext | ||
| namespace Rule { | ||
| type ReportDescriptor = eslint.Rule.ReportDescriptor | ||
| type SuggestionReportDescriptor = eslint.Rule.SuggestionReportDescriptor | ||
| } | ||
| type SourceCode = eslint.SourceCode | ||
| namespace SourceCode { | ||
| type CursorWithSkipOptions = eslint.SourceCode.CursorWithSkipOptions | ||
| type CursorWithCountOptions = eslint.SourceCode.CursorWithCountOptions | ||
| } | ||
| type RuleFixer = eslint.Rule.RuleFixer | ||
| type Fix = eslint.Rule.Fix | ||
| type NodeListener = eslint.Rule.NodeListener | ||
| type RuleListener = eslint.Rule.RuleListener | ||
| type TemplateListener = parserServices.TemplateListener | ||
| type ParserServices = parserServices.ParserServices | ||
| namespace ParserServices { | ||
| type TokenStore = parserServices.ParserServices.TokenStore | ||
| } | ||
| // **** Node data **** | ||
| type Range = VNODE.Range | ||
| type Position = VNODE.Position | ||
| type SourceLocation = VNODE.SourceLocation | ||
| type Token = VNODE.Token | ||
| type Comment = VNODE.Comment | ||
| type HTMLComment = VNODE.HTMLComment | ||
| type HTMLBogusComment = VNODE.HTMLBogusComment | ||
| type NodeListenerMap = VAST.NodeListenerMap | ||
| type VNodeListenerMap = VAST.VNodeListenerMap | ||
| // **** AST nodes **** | ||
| type ASTNode = VAST.ASTNode | ||
| type ESNode = VAST.ESNode | ||
| type VNode = VAST.VNode | ||
| type TSNode = VAST.TSNode | ||
| type JSXNode = VAST.JSXNode | ||
| // ---- Vue Template Nodes ---- | ||
| type VAttribute = VAST.VAttribute | ||
| type VDirective = VAST.VDirective | ||
| type VDirectiveKey = VAST.VDirectiveKey | ||
| type VDocumentFragment = VAST.VDocumentFragment | ||
| type VElement = VAST.VElement | ||
| type VRootElement = VAST.VRootElement | ||
| type VEndTag = VAST.VEndTag | ||
| type VExpressionContainer = VAST.VExpressionContainer | ||
| type VIdentifier = VAST.VIdentifier | ||
| type VLiteral = VAST.VLiteral | ||
| type VStartTag = VAST.VStartTag | ||
| type VText = VAST.VText | ||
| type VForExpression = VAST.VForExpression | ||
| type VOnExpression = VAST.VOnExpression | ||
| type VSlotScopeExpression = VAST.VSlotScopeExpression | ||
| type VFilterSequenceExpression = VAST.VFilterSequenceExpression | ||
| type VFilter = VAST.VFilter | ||
| // ---- ES Nodes ---- | ||
| type Identifier = VAST.Identifier | ||
| type Literal = VAST.Literal | ||
| type Program = VAST.Program | ||
| type SwitchCase = VAST.SwitchCase | ||
| type CatchClause = VAST.CatchClause | ||
| type VariableDeclarator = VAST.VariableDeclarator | ||
| type Statement = VAST.Statement | ||
| type ExpressionStatement = VAST.ExpressionStatement | ||
| type BlockStatement = VAST.BlockStatement | ||
| type EmptyStatement = VAST.EmptyStatement | ||
| type DebuggerStatement = VAST.DebuggerStatement | ||
| type WithStatement = VAST.WithStatement | ||
| type ReturnStatement = VAST.ReturnStatement | ||
| type LabeledStatement = VAST.LabeledStatement | ||
| type BreakStatement = VAST.BreakStatement | ||
| type ContinueStatement = VAST.ContinueStatement | ||
| type IfStatement = VAST.IfStatement | ||
| type SwitchStatement = VAST.SwitchStatement | ||
| type ThrowStatement = VAST.ThrowStatement | ||
| type TryStatement = VAST.TryStatement | ||
| type WhileStatement = VAST.WhileStatement | ||
| type DoWhileStatement = VAST.DoWhileStatement | ||
| type ForStatement = VAST.ForStatement | ||
| type ForInStatement = VAST.ForInStatement | ||
| type ForOfStatement = VAST.ForOfStatement | ||
| type Declaration = VAST.Declaration | ||
| type FunctionDeclaration = VAST.FunctionDeclaration | ||
| type VariableDeclaration = VAST.VariableDeclaration | ||
| type ClassDeclaration = VAST.ClassDeclaration | ||
| type Expression = VAST.Expression | ||
| type ThisExpression = VAST.ThisExpression | ||
| type ArrayExpression = VAST.ArrayExpression | ||
| type ObjectExpression = VAST.ObjectExpression | ||
| type FunctionExpression = VAST.FunctionExpression | ||
| type ArrowFunctionExpression = VAST.ArrowFunctionExpression | ||
| type YieldExpression = VAST.YieldExpression | ||
| type UnaryExpression = VAST.UnaryExpression | ||
| type UpdateExpression = VAST.UpdateExpression | ||
| type BinaryExpression = VAST.BinaryExpression | ||
| type AssignmentExpression = VAST.AssignmentExpression | ||
| type LogicalExpression = VAST.LogicalExpression | ||
| type MemberExpression = VAST.MemberExpression | ||
| type ConditionalExpression = VAST.ConditionalExpression | ||
| type CallExpression = VAST.CallExpression | ||
| type NewExpression = VAST.NewExpression | ||
| type SequenceExpression = VAST.SequenceExpression | ||
| type TemplateLiteral = VAST.TemplateLiteral | ||
| type TaggedTemplateExpression = VAST.TaggedTemplateExpression | ||
| type ClassExpression = VAST.ClassExpression | ||
| type MetaProperty = VAST.MetaProperty | ||
| type AwaitExpression = VAST.AwaitExpression | ||
| type ChainExpression = VAST.ChainExpression | ||
| type ChainElement = VAST.ChainElement | ||
| type Property = VAST.Property | ||
| type AssignmentProperty = VAST.AssignmentProperty | ||
| type Super = VAST.Super | ||
| type TemplateElement = VAST.TemplateElement | ||
| type SpreadElement = VAST.SpreadElement | ||
| type Pattern = VAST.Pattern | ||
| type ObjectPattern = VAST.ObjectPattern | ||
| type ArrayPattern = VAST.ArrayPattern | ||
| type RestElement = VAST.RestElement | ||
| type AssignmentPattern = VAST.AssignmentPattern | ||
| type ClassBody = VAST.ClassBody | ||
| type MethodDefinition = VAST.MethodDefinition | ||
| type ModuleDeclaration = VAST.ModuleDeclaration | ||
| type ImportDeclaration = VAST.ImportDeclaration | ||
| type ExportNamedDeclaration = VAST.ExportNamedDeclaration | ||
| type ExportDefaultDeclaration = VAST.ExportDefaultDeclaration | ||
| type ExportAllDeclaration = VAST.ExportAllDeclaration | ||
| type ModuleSpecifier = VAST.ModuleSpecifier | ||
| type ImportSpecifier = VAST.ImportSpecifier | ||
| type ImportDefaultSpecifier = VAST.ImportDefaultSpecifier | ||
| type ImportNamespaceSpecifier = VAST.ImportNamespaceSpecifier | ||
| type ExportSpecifier = VAST.ExportSpecifier | ||
| type ImportExpression = VAST.ImportExpression | ||
| // ---- TS Nodes ---- | ||
| type TSAsExpression = VAST.TSAsExpression | ||
| // ---- JSX Nodes ---- | ||
| type JSXAttribute = VAST.JSXAttribute | ||
| type JSXClosingElement = VAST.JSXClosingElement | ||
| type JSXClosingFragment = VAST.JSXClosingFragment | ||
| type JSXElement = VAST.JSXElement | ||
| type JSXEmptyExpression = VAST.JSXEmptyExpression | ||
| type JSXExpressionContainer = VAST.JSXExpressionContainer | ||
| type JSXFragment = VAST.JSXFragment | ||
| type JSXIdentifier = VAST.JSXIdentifier | ||
| type JSXOpeningElement = VAST.JSXOpeningElement | ||
| type JSXOpeningFragment = VAST.JSXOpeningFragment | ||
| type JSXSpreadAttribute = VAST.JSXSpreadAttribute | ||
| type JSXSpreadChild = VAST.JSXSpreadChild | ||
| type JSXMemberExpression = VAST.JSXMemberExpression | ||
| type JSXText = VAST.JSXText | ||
| // **** Variables **** | ||
| type VVariable = VAST.VVariable | ||
| type VReference = VAST.VReference | ||
| type Variable = eslint.Scope.Variable | ||
| type Reference = eslint.Scope.Reference | ||
| } |
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.