File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed
Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ Workaround for https://github.com/typescript-eslint/typescript-eslint/issues/117
66import { Variable } from 'eslint-scope' ;
77import typescriptEslintParserOriginal from '@typescript-eslint/parser' ;
88import babelEslintParserOriginal from '@babel/eslint-parser' ;
9+ import vueEslintParserOriginal from 'vue-eslint-parser' ;
910
1011function addGlobals ( names ) {
1112 const globalScope = this . scopes [ 0 ] ;
@@ -72,7 +73,9 @@ function fixParse(parse) {
7273 return function parseForESLint ( ...arguments_ ) {
7374 const result = parse ( ...arguments_ ) ;
7475
75- result . scopeManager . addGlobals = addGlobals ;
76+ if ( result . scopeManager ) {
77+ result . scopeManager . addGlobals ??= addGlobals ;
78+ }
7679
7780 return result ;
7881 } ;
@@ -87,3 +90,8 @@ export const babelEslintParser = {
8790 ...babelEslintParserOriginal ,
8891 parseForESLint : fixParse ( babelEslintParserOriginal . parseForESLint ) ,
8992} ;
93+
94+ export const vueEslintParser = {
95+ ...vueEslintParserOriginal ,
96+ parseForESLint : fixParse ( vueEslintParserOriginal . parseForESLint ) ,
97+ } ;
Original file line number Diff line number Diff line change 1- import { typescriptEslintParser , babelEslintParser } from '../../scripts/parsers.js' ;
2- import vueEslintParser from 'vue-eslint-parser' ;
1+ import {
2+ typescriptEslintParser ,
3+ babelEslintParser ,
4+ vueEslintParser ,
5+ } from '../../scripts/parsers.js' ;
36
47const babelParser = {
58 name : 'babel' ,
You can’t perform that action at this time.
0 commit comments