File tree 6 files changed +20
-23
lines changed
6 files changed +20
-23
lines changed Original file line number Diff line number Diff line change 13
13
strategy :
14
14
matrix :
15
15
os : [ubuntu-latest]
16
- eslint : [7 ]
16
+ eslint : ["^8.0.0-0" ]
17
17
node : [16]
18
18
include :
19
19
# On other platforms
26
26
os : ubuntu-latest
27
27
- node : 12
28
28
os : ubuntu-latest
29
- - node : 10
30
- os : ubuntu-latest
31
29
# On the minimum supported ESLint/Node.js version
32
- - node : 10.12 .0
30
+ - node : 12.22 .0
33
31
os : ubuntu-latest
34
32
35
33
runs-on : ${{ matrix.os }}
Original file line number Diff line number Diff line change 3
3
"version" : " 13.0.0" ,
4
4
"description" : " Additional ESLint rules." ,
5
5
"engines" : {
6
- "node" : " ^10. 12.0 || >=12 .0.0"
6
+ "node" : " ^12.22. 0 || ^14.17.0 || >=16 .0.0"
7
7
},
8
8
"main" : " index.js" ,
9
9
"files" : [
10
10
" lib"
11
11
],
12
12
"peerDependencies" : {
13
- "eslint" : " ^7 .0.0"
13
+ "eslint" : " ^8 .0.0- 0"
14
14
},
15
15
"dependencies" : {
16
- "@eslint/eslintrc" : " ^0.4.3 " ,
16
+ "@eslint/eslintrc" : " ^1.0.0 " ,
17
17
"@typescript-eslint/eslint-plugin" : " ^4.29.2" ,
18
18
"@typescript-eslint/parser" : " ^4.29.2" ,
19
19
"eslint-plugin-eslint-comments" : " ^3.2.0" ,
27
27
"devDependencies" : {
28
28
"@mysticatea/eslint-plugin" : " file:." ,
29
29
"codecov" : " ^3.6.1" ,
30
- "eslint" : " ^7.32. 0" ,
30
+ "eslint" : " ^8.0.0- 0" ,
31
31
"fs-extra" : " ^8.1.0" ,
32
32
"globals" : " ^12.1.1" ,
33
33
"mocha" : " ^6.2.2" ,
Original file line number Diff line number Diff line change 6
6
7
7
const fs = require ( "fs" )
8
8
const path = require ( "path" )
9
- const { CLIEngine } = require ( "eslint" )
9
+ const { ESLint } = require ( "eslint" )
10
10
const { browser : originalGlobals } = require ( "globals" )
11
11
12
12
const targetFile = path . resolve ( __dirname , "../lib/configs/_browser-globals.js" )
@@ -33,7 +33,7 @@ for (const key of Object.keys(originalGlobals).sort()) {
33
33
}
34
34
}
35
35
36
- const linter = new CLIEngine ( { fix : true } )
36
+ const linter = new ESLint ( { fix : true } )
37
37
const rawCode = `/**
38
38
* DON'T EDIT THIS FILE WHICH WAS GENERATED BY './scripts/generate-browser-globals.js'.
39
39
*/
@@ -42,7 +42,6 @@ const rawCode = `/**
42
42
module.exports = ${ JSON . stringify ( globals , null , 4 ) }
43
43
`
44
44
const code =
45
- linter . executeOnText ( rawCode , "_browser-globals.js" ) . results [ 0 ] . output ||
46
- rawCode
45
+ linter . lintText ( rawCode , "_browser-globals.js" ) . results [ 0 ] . output || rawCode
47
46
48
47
fs . writeFileSync ( targetFile , code )
Original file line number Diff line number Diff line change 6
6
7
7
const fs = require ( "fs" )
8
8
const path = require ( "path" )
9
- const { CLIEngine } = require ( "eslint" )
9
+ const { ESLint } = require ( "eslint" )
10
10
11
11
const targetFile = path . resolve ( __dirname , "../lib/configs.js" )
12
12
28
28
`
29
29
)
30
30
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 6
6
7
7
const fs = require ( "fs" )
8
8
const path = require ( "path" )
9
- const { CLIEngine } = require ( "eslint" )
9
+ const { ESLint } = require ( "eslint" )
10
10
11
11
const targetFile = path . resolve ( __dirname , "../lib/rules.js" )
12
12
34
34
`
35
35
)
36
36
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 7
7
const { Linter } = require ( "eslint" )
8
8
const {
9
9
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 " )
12
12
const { rules : PluginRulesIndex } = require ( "@mysticatea/eslint-plugin" )
13
13
const { rules : removedRules } = require ( "eslint/conf/replacements.json" )
14
14
@@ -38,7 +38,7 @@ module.exports = {
38
38
* @returns {void }
39
39
*/
40
40
validateConfig ( config , source ) {
41
- Validator . validate ( config , source , ruleId => allRules . get ( ruleId ) )
41
+ ConfigValidator . validate ( config , source , ruleId => allRules . get ( ruleId ) )
42
42
43
43
/* istanbul ignore next */
44
44
for ( const ruleId of [ ] . concat (
You can’t perform that action at this time.
0 commit comments