-
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
131 additions
and
135 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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 |
---|---|---|
@@ -1,44 +1,6 @@ | ||
import './rule-types.js'; | ||
import type { RuleModule } from './types.js'; | ||
import { rules as ruleList } from './utils/rules.js'; | ||
import base, { setPluginObject } from './configs/flat/base.js'; | ||
import recommended from './configs/flat/recommended.js'; | ||
import prettier from './configs/flat/prettier.js'; | ||
import all from './configs/flat/all.js'; | ||
import * as processor from './processor/index.js'; | ||
import * as meta from './meta.js'; | ||
import * as plugin from './main.js'; | ||
import { setPluginObject } from './configs/flat/base.js'; | ||
setPluginObject(plugin); | ||
|
||
export const configs = { | ||
base, | ||
recommended, | ||
prettier, | ||
all, | ||
// For backward compatibility | ||
'flat/base': base, | ||
'flat/recommended': recommended, | ||
'flat/prettier': prettier, | ||
'flat/all': all | ||
}; | ||
|
||
export const rules = ruleList.reduce( | ||
(obj, r) => { | ||
obj[r.meta.docs.ruleName] = r; | ||
return obj; | ||
}, | ||
{} as { [key: string]: RuleModule } | ||
); | ||
|
||
export { meta }; | ||
export const processors = { | ||
'.svelte': processor, | ||
svelte: processor | ||
}; | ||
|
||
const plugin = { | ||
rules, | ||
configs, | ||
meta, | ||
processors | ||
}; | ||
setPluginObject(plugin as never); | ||
export * from './main.js'; | ||
export default plugin; |
This file contains 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,36 @@ | ||
import './rule-types.js'; | ||
import type { RuleModule } from './types.js'; | ||
import { rules as ruleList } from './utils/rules.js'; | ||
import base from './configs/flat/base.js'; | ||
import recommended from './configs/flat/recommended.js'; | ||
import prettier from './configs/flat/prettier.js'; | ||
import all from './configs/flat/all.js'; | ||
import * as processor from './processor/index.js'; | ||
import * as metaModule from './meta.js'; | ||
import type { Rule } from 'eslint'; | ||
|
||
export const configs = { | ||
base, | ||
recommended, | ||
prettier, | ||
all, | ||
// For backward compatibility | ||
'flat/base': base, | ||
'flat/recommended': recommended, | ||
'flat/prettier': prettier, | ||
'flat/all': all | ||
}; | ||
|
||
export const rules = ruleList.reduce( | ||
(obj, r) => { | ||
obj[r.meta.docs.ruleName] = r; | ||
return obj; | ||
}, | ||
{} as { [key: string]: RuleModule } | ||
) as unknown as Record<string, Rule.RuleModule>; | ||
|
||
export const meta = { ...metaModule }; | ||
export const processors = { | ||
'.svelte': processor, | ||
svelte: processor | ||
}; |
This file contains 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,85 @@ | ||
// IMPORTANT! | ||
// This file has been automatically generated, | ||
// in order to update its content execute "pnpm run update" | ||
// | ||
// Replace type information to use "@typescript-eslint/types" instead of "estree". | ||
// | ||
declare module 'estree' { | ||
import type { TSESTree } from '@typescript-eslint/types'; | ||
|
||
export type Node = TSESTree.Node; | ||
export type Program = TSESTree.Program; | ||
export type Expression = TSESTree.Expression; | ||
export type Statement = TSESTree.Statement; | ||
export type Pattern = TSESTree.DestructuringPattern; | ||
export type AccessorProperty = TSESTree.AccessorProperty; | ||
export type ArrayExpression = TSESTree.ArrayExpression; | ||
export type ArrayPattern = TSESTree.ArrayPattern; | ||
export type ArrowFunctionExpression = TSESTree.ArrowFunctionExpression; | ||
export type AssignmentExpression = TSESTree.AssignmentExpression; | ||
export type AssignmentPattern = TSESTree.AssignmentPattern; | ||
export type AwaitExpression = TSESTree.AwaitExpression; | ||
export type BinaryExpression = TSESTree.BinaryExpression; | ||
export type BlockStatement = TSESTree.BlockStatement; | ||
export type BreakStatement = TSESTree.BreakStatement; | ||
export type CallExpression = TSESTree.CallExpression; | ||
export type CatchClause = TSESTree.CatchClause; | ||
export type ChainExpression = TSESTree.ChainExpression; | ||
export type ClassBody = TSESTree.ClassBody; | ||
export type ClassDeclaration = TSESTree.ClassDeclaration; | ||
export type ClassExpression = TSESTree.ClassExpression; | ||
export type ConditionalExpression = TSESTree.ConditionalExpression; | ||
export type ContinueStatement = TSESTree.ContinueStatement; | ||
export type DebuggerStatement = TSESTree.DebuggerStatement; | ||
export type DoWhileStatement = TSESTree.DoWhileStatement; | ||
export type EmptyStatement = TSESTree.EmptyStatement; | ||
export type ExportAllDeclaration = TSESTree.ExportAllDeclaration; | ||
export type ExportDefaultDeclaration = TSESTree.ExportDefaultDeclaration; | ||
export type ExportNamedDeclaration = TSESTree.ExportNamedDeclaration; | ||
export type ExportSpecifier = TSESTree.ExportSpecifier; | ||
export type ExpressionStatement = TSESTree.ExpressionStatement; | ||
export type ForInStatement = TSESTree.ForInStatement; | ||
export type ForOfStatement = TSESTree.ForOfStatement; | ||
export type ForStatement = TSESTree.ForStatement; | ||
export type FunctionDeclaration = TSESTree.FunctionDeclaration; | ||
export type FunctionExpression = TSESTree.FunctionExpression; | ||
export type Identifier = TSESTree.Identifier; | ||
export type IfStatement = TSESTree.IfStatement; | ||
export type ImportDeclaration = TSESTree.ImportDeclaration; | ||
export type ImportDefaultSpecifier = TSESTree.ImportDefaultSpecifier; | ||
export type ImportExpression = TSESTree.ImportExpression; | ||
export type ImportNamespaceSpecifier = TSESTree.ImportNamespaceSpecifier; | ||
export type ImportSpecifier = TSESTree.ImportSpecifier; | ||
export type LabeledStatement = TSESTree.LabeledStatement; | ||
export type Literal = TSESTree.Literal; | ||
export type LogicalExpression = TSESTree.LogicalExpression; | ||
export type MemberExpression = TSESTree.MemberExpression; | ||
export type MetaProperty = TSESTree.MetaProperty; | ||
export type MethodDefinition = TSESTree.MethodDefinition; | ||
export type NewExpression = TSESTree.NewExpression; | ||
export type ObjectExpression = TSESTree.ObjectExpression; | ||
export type ObjectPattern = TSESTree.ObjectPattern; | ||
export type PrivateIdentifier = TSESTree.PrivateIdentifier; | ||
export type Property = TSESTree.Property; | ||
export type PropertyDefinition = TSESTree.PropertyDefinition; | ||
export type RestElement = TSESTree.RestElement; | ||
export type ReturnStatement = TSESTree.ReturnStatement; | ||
export type SequenceExpression = TSESTree.SequenceExpression; | ||
export type SpreadElement = TSESTree.SpreadElement; | ||
export type Super = TSESTree.Super; | ||
export type SwitchCase = TSESTree.SwitchCase; | ||
export type SwitchStatement = TSESTree.SwitchStatement; | ||
export type TaggedTemplateExpression = TSESTree.TaggedTemplateExpression; | ||
export type TemplateElement = TSESTree.TemplateElement; | ||
export type TemplateLiteral = TSESTree.TemplateLiteral; | ||
export type ThisExpression = TSESTree.ThisExpression; | ||
export type ThrowStatement = TSESTree.ThrowStatement; | ||
export type TryStatement = TSESTree.TryStatement; | ||
export type UnaryExpression = TSESTree.UnaryExpression; | ||
export type UpdateExpression = TSESTree.UpdateExpression; | ||
export type VariableDeclaration = TSESTree.VariableDeclaration; | ||
export type VariableDeclarator = TSESTree.VariableDeclarator; | ||
export type WhileStatement = TSESTree.WhileStatement; | ||
export type WithStatement = TSESTree.WithStatement; | ||
export type YieldExpression = TSESTree.YieldExpression; | ||
} |
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.