@persagy2/eslint-plugin
Version:
一个适用于 vue3.x、typescript 项目的通用eslint预设插件
26 lines (25 loc) • 753 B
text/typescript
import type { Linter } from 'eslint'
export const AnyParser: Linter.ParserModule = {
parseForESLint(text: string, _options?: any): Linter.ESLintParseResult {
return {
ast: {
sourceType: 'script',
type: 'Program',
body: [],
tokens: [],
comments: [],
range: [0, text.length],
loc: {
start: {
line: 1,
column: 0
},
end: {
line: text.split(/\n/).length + 1,
column: 0
}
}
}
}
}
}