File tree Expand file tree Collapse file tree 1 file changed +10
-22
lines changed Expand file tree Collapse file tree 1 file changed +10
-22
lines changed Original file line number Diff line number Diff line change @@ -36,30 +36,18 @@ describe("define-regexp-handler", () => {
3636} )
3737
3838function lint ( text ) {
39- if ( ESLint ) {
40- const eslint = new ESLint ( {
41- cwd : TEST_CWD ,
42- plugins : { "eslint-plugin-es-x" : plugin } ,
43- useEslintrc : false ,
44- overrideConfig : {
45- parserOptions : {
46- ecmaVersion : 2019 ,
47- } ,
48- plugins : [ "es-x" ] ,
49- } ,
50- } )
51- return eslint
52- . lintText ( text , { filePath : "test.js" } )
53- . then ( ( results ) => results [ 0 ] )
54- }
55- const engine = new ( require ( "eslint" ) . CLIEngine ) ( {
39+ const eslint = new ESLint ( {
5640 cwd : TEST_CWD ,
41+ plugins : { "eslint-plugin-es-x" : plugin } ,
5742 useEslintrc : false ,
58- plugins : [ "es-x" ] ,
59- parserOptions : {
60- ecmaVersion : 2019 ,
43+ overrideConfig : {
44+ parserOptions : {
45+ ecmaVersion : 2019 ,
46+ } ,
47+ plugins : [ "es-x" ] ,
6148 } ,
6249 } )
63- engine . addPlugin ( "eslint-plugin-es-x" , plugin )
64- return Promise . resolve ( engine . executeOnText ( text , "test.js" ) . results [ 0 ] )
50+ return eslint
51+ . lintText ( text , { filePath : "test.js" } )
52+ . then ( ( results ) => results [ 0 ] )
6553}
You can’t perform that action at this time.
0 commit comments