File tree Expand file tree Collapse file tree 2 files changed +4
-25
lines changed Expand file tree Collapse file tree 2 files changed +4
-25
lines changed Original file line number Diff line number Diff line change 6
6
# https://www.gitignore.io/
7
7
8
8
.nyc_output
9
+ .eslintcache
9
10
node_modules
10
11
coverage
11
12
dist
Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ function checkFiles(filepaths) {
96
96
97
97
return runTests ( filepaths )
98
98
. then ( testSuccess =>
99
- lintFiles ( filepaths ) . then ( lintSuccess =>
99
+ lintFiles ( ) . then ( lintSuccess =>
100
100
typecheckStatus ( ) . then (
101
101
typecheckSuccess => testSuccess && lintSuccess && typecheckSuccess
102
102
)
@@ -124,27 +124,9 @@ function runTests(filepaths) {
124
124
) . catch ( ( ) => false ) ;
125
125
}
126
126
127
- function lintFiles ( filepaths ) {
127
+ function lintFiles ( ) {
128
128
console . log ( 'Linting Code\n' ) ;
129
-
130
- return filepaths . reduce (
131
- ( prev , filepath ) =>
132
- prev . then ( prevSuccess => {
133
- if ( isJS ( filepath ) ) {
134
- process . stdout . write ( ' ' + filepath + ' ...' ) ;
135
- return exec ( 'eslint' , [ srcPath ( filepath ) ] )
136
- . catch ( ( ) => false )
137
- . then ( success => {
138
- console . log (
139
- CLEARLINE + ' ' + ( success ? CHECK : X ) + ' ' + filepath
140
- ) ;
141
- return prevSuccess && success ;
142
- } ) ;
143
- }
144
- return prevSuccess ;
145
- } ) ,
146
- Promise . resolve ( true )
147
- ) ;
129
+ return exec ( 'eslint' , [ '--cache' , 'src/' ] ) . catch ( ( ) => false ) ;
148
130
}
149
131
150
132
function typecheckStatus ( ) {
@@ -160,10 +142,6 @@ function srcPath(filepath) {
160
142
161
143
// Predicates
162
144
163
- function isJS ( filepath ) {
164
- return filepath . indexOf ( '.js' ) === filepath . length - 3 ;
165
- }
166
-
167
145
function allTests ( filepaths ) {
168
146
return filepaths . length > 0 && filepaths . every ( isTest ) ;
169
147
}
You can’t perform that action at this time.
0 commit comments