File tree Expand file tree Collapse file tree 7 files changed +25
-28
lines changed Expand file tree Collapse file tree 7 files changed +25
-28
lines changed Original file line number Diff line number Diff line change 1313    strategy :
1414      matrix :
1515        os : [ubuntu-latest] 
16-         eslint : [7 ] 
16+         eslint : [8 ] 
1717        node : [16] 
1818        include :
1919          #  On other platforms
2626            os : ubuntu-latest 
2727          - node : 12 
2828            os : ubuntu-latest 
29-           - node : 10 
30-             os : ubuntu-latest 
3129          #  On the minimum supported ESLint/Node.js version
32-           - node : 10.12 .0
30+           - node : 12.22 .0
3331            os : ubuntu-latest 
3432
3533    runs-on : ${{ matrix.os }} 
Original file line number Diff line number Diff line change @@ -16,8 +16,8 @@ npm install --save-dev eslint @mysticatea/eslint-plugin
1616
1717### Requirements  
1818
19- -  Node.js ` ^10. 12.0 || >=12 .0.0 `  or newer versions.
20- -  ESLint ` ^7 .0.0 `  or newer versions.
19+ -  Node.js ` ^12.22. 0 || ^14.17.0 || >=16 .0.0 `  or newer versions.
20+ -  ESLint ` ^8 .0.0 `  or newer versions.
2121
2222## 📖 Usage  
2323
Original file line number Diff line number Diff line change 33  "version" : " 13.0.0" 
44  "description" : " Additional ESLint rules." 
55  "engines" : {
6-     "node" : " ^10. 12.0 || >=12 .0.0" 
6+     "node" : " ^12.22. 0 || ^14.17.0 || >=16 .0.0" 
77  },
88  "main" : " index.js" 
99  "files" : [
1010    " lib" 
1111  ],
1212  "peerDependencies" : {
13-     "eslint" : " ^7 .0.0" 
13+     "eslint" : " ^8 .0.0" 
1414  },
1515  "dependencies" : {
16-     "@eslint/eslintrc" : " ^0.4.3 " 
17-     "@typescript-eslint/eslint-plugin" : " ^4.33. 0" 
18-     "@typescript-eslint/parser" : " ^4.33. 0" 
16+     "@eslint/eslintrc" : " ^1.0.2 " 
17+     "@typescript-eslint/eslint-plugin" : " ^5.0.0- 0" 
18+     "@typescript-eslint/parser" : " ^5.0.0- 0" 
1919    "eslint-plugin-eslint-comments" : " ^3.2.0" 
20-     "eslint-plugin-eslint-plugin" : " ^3.6.1 " 
20+     "eslint-plugin-eslint-plugin" : " ^4.0.0-0 " 
2121    "eslint-plugin-node" : " ^11.1.0" 
2222    "eslint-plugin-prettier" : " ^3.4.1" 
2323    "eslint-plugin-vue" : " ^7.19.1" 
2727  "devDependencies" : {
2828    "@mysticatea/eslint-plugin" : " file:." 
2929    "codecov" : " ^3.6.1" 
30-     "eslint" : " ^7.32 .0" 
30+     "eslint" : " ^8.0 .0" 
3131    "fs-extra" : " ^8.1.0" 
3232    "globals" : " ^12.1.1" 
3333    "mocha" : " ^6.2.2" 
Original file line number Diff line number Diff line change 66
77const  fs  =  require ( "fs" ) 
88const  path  =  require ( "path" ) 
9- const  {  CLIEngine  }  =  require ( "eslint" ) 
9+ const  {  ESLint  }  =  require ( "eslint" ) 
1010const  {  browser : originalGlobals  }  =  require ( "globals" ) 
1111
1212const  targetFile  =  path . resolve ( __dirname ,  "../lib/configs/_browser-globals.js" ) 
@@ -33,7 +33,7 @@ for (const key of Object.keys(originalGlobals).sort()) {
3333    } 
3434} 
3535
36- const  linter  =  new  CLIEngine ( {  fix : true  } ) 
36+ const  linter  =  new  ESLint ( {  fix : true  } ) 
3737const  rawCode  =  `/** 
3838* DON'T EDIT THIS FILE WHICH WAS GENERATED BY './scripts/generate-browser-globals.js'. 
3939*/ 
@@ -42,7 +42,6 @@ const rawCode = `/**
4242module.exports = ${ JSON . stringify ( globals ,  null ,  4 ) }  
4343` 
4444const  code  = 
45-     linter . executeOnText ( rawCode ,  "_browser-globals.js" ) . results [ 0 ] . output  || 
46-     rawCode 
45+     linter . lintText ( rawCode ,  "_browser-globals.js" ) . results [ 0 ] . output  ||  rawCode 
4746
4847fs . writeFileSync ( targetFile ,  code ) 
Original file line number Diff line number Diff line change 66
77const  fs  =  require ( "fs" ) 
88const  path  =  require ( "path" ) 
9- const  {  CLIEngine  }  =  require ( "eslint" ) 
9+ const  {  ESLint  }  =  require ( "eslint" ) 
1010
1111const  targetFile  =  path . resolve ( __dirname ,  "../lib/configs.js" ) 
1212
2828` 
2929) 
3030
31- const  linter  =  new  CLIEngine ( {  fix : true  } ) 
32- const  result  =  linter . executeOnFiles ( [ targetFile ] ) 
33- CLIEngine . outputFixes ( result ) 
31+ const  linter  =  new  ESLint ( {  fix : true  } ) 
32+ const  result  =  linter . lintFiles ( [ targetFile ] ) 
33+ ESLint . outputFixes ( result ) 
Original file line number Diff line number Diff line change 66
77const  fs  =  require ( "fs" ) 
88const  path  =  require ( "path" ) 
9- const  {  CLIEngine  }  =  require ( "eslint" ) 
9+ const  {  ESLint  }  =  require ( "eslint" ) 
1010
1111const  targetFile  =  path . resolve ( __dirname ,  "../lib/rules.js" ) 
1212
3434` 
3535) 
3636
37- const  linter  =  new  CLIEngine ( {  fix : true  } ) 
38- const  result  =  linter . executeOnFiles ( [ targetFile ] ) 
39- CLIEngine . outputFixes ( result ) 
37+ const  linter  =  new  ESLint ( {  fix : true  } ) 
38+ const  result  =  linter . lintFiles ( [ targetFile ] ) 
39+ ESLint . outputFixes ( result ) 
Original file line number Diff line number Diff line change 77const  {  Linter }  =  require ( "eslint" ) 
88const  { 
99    ConfigArrayFactory, 
10- }   =   require ( "@eslint/eslintrc/lib/config-array-factory" ) 
11- const   Validator   =  require ( "eslint/lib/shared/config-validator " ) 
10+      Legacy :  {  ConfigValidator  } , 
11+ }   =  require ( "@ eslint/eslintrc " ) 
1212const  {  rules : PluginRulesIndex  }  =  require ( "@mysticatea/eslint-plugin" ) 
1313const  {  rules : removedRules  }  =  require ( "eslint/conf/replacements.json" ) 
1414
@@ -38,7 +38,7 @@ module.exports = {
3838     * @returns  {void } 
3939     */ 
4040    validateConfig ( config ,  source )  { 
41-         Validator . validate ( config ,  source ,  ruleId  =>  allRules . get ( ruleId ) ) 
41+         ConfigValidator . validate ( config ,  source ,  ruleId  =>  allRules . get ( ruleId ) ) 
4242
4343        /* istanbul ignore next */ 
4444        for  ( const  ruleId  of  [ ] . concat ( 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments