File tree Expand file tree Collapse file tree 6 files changed +1765
-1317
lines changed Expand file tree Collapse file tree 6 files changed +1765
-1317
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ {
2
+ "presets" : [
3
+ [" @babel/preset-env" , {
4
+ "targets" : {
5
+ "node" : true
6
+ },
7
+ "loose" : true
8
+ }]]
9
+ }
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " eslint-parallel" ,
3
- "version" : " 1.1.1 " ,
3
+ "version" : " 1.2.0 " ,
4
4
"main" : " lib/linter.js" ,
5
5
"description" : " Tiny eslint wrapper to allow executing javascript linting in parallel." ,
6
6
"author" : " Alan Souza" ,
15
15
"eslint-parallel" : " ./lib/cli.js"
16
16
},
17
17
"dependencies" : {
18
- "babel-core " : " ^6.26.0 " ,
19
- "chalk" : " ^1 .1.3 " ,
18
+ "@ babel/register " : " ^7.10.5 " ,
19
+ "chalk" : " ^4 .1.0 " ,
20
20
"eslint" : " ^6.1.0" ,
21
21
"text-table" : " ^0.2.0"
22
22
},
23
23
"devDependencies" : {
24
- "babel- cli" : " ^6.26.0 " ,
25
- "babel-eslint " : " ^10.0.3 " ,
26
- "babel- preset-es2015 " : " ^6.9.0 "
24
+ "@ babel/ cli" : " ^7.10.5 " ,
25
+ "@ babel/core " : " ^7. 10.5 " ,
26
+ "@ babel/ preset-env " : " ^7.10.4 "
27
27
},
28
28
"peerDependencies" : {
29
29
"eslint" : " >=6.1.0"
30
30
},
31
31
"scripts" : {
32
- "build" : " node_modules/.bin/babel src --out-dir lib --copy-files --loose-mode " ,
32
+ "build" : " node_modules/.bin/babel src --out-dir lib --copy-files" ,
33
33
"prepublishOnly" : " npm run build"
34
34
}
35
35
}
Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env node
2
- require ( 'babel- register' ) ;
2
+ require ( '@ babel/ register' ) ;
3
3
4
4
/**
5
5
* NPM dependencies
Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ import { fork } from 'child_process';
10
10
* NPM dependencies
11
11
**/
12
12
import { CLIEngine } from 'eslint' ;
13
- import { listFilesToProcess } from 'eslint/lib/util/glob-utils.js ' ;
14
- import glob from 'glob ' ;
13
+ import { FileEnumerator } from 'eslint/lib/cli-engine/file-enumerator ' ;
14
+ import { CascadingConfigArrayFactory } from 'eslint/lib/cli-engine/cascading-config-array-factory ' ;
15
15
16
16
/**
17
17
* Local dependencies
@@ -20,6 +20,21 @@ import { formatResults } from './formatter';
20
20
21
21
const cpuCount = os . cpus ( ) . length ;
22
22
23
+ function listFilesToProcess ( patterns , options ) {
24
+ return Array . from (
25
+ new FileEnumerator ( {
26
+ ...options ,
27
+ configArrayFactory : new CascadingConfigArrayFactory ( {
28
+ ...options ,
29
+
30
+ // Disable "No Configuration Found" error.
31
+ useEslintrc : false
32
+ } )
33
+ } ) . iterateFiles ( patterns ) ,
34
+ ( { filePath, ignored } ) => ( { filename : filePath , ignored } )
35
+ ) ;
36
+ }
37
+
23
38
function hasEslintCache ( options ) {
24
39
const cacheLocation = (
25
40
options . cacheFile || options . cacheLocation || path . join (
You can’t perform that action at this time.
0 commit comments