File tree 2 files changed +16
-1
lines changed
2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -235,6 +235,8 @@ module.exports = {
235
235
] ,
236
236
237
237
// https://github.com/benmosher/eslint-plugin-import/tree/master/docs/rules
238
+ 'import/first' : 'error' ,
239
+ 'import/no-amd' : 'error' ,
238
240
'import/no-webpack-loader-syntax' : 'error' ,
239
241
240
242
// https://github.com/yannickcr/eslint-plugin-react/tree/master/docs/rules
Original file line number Diff line number Diff line change @@ -12,14 +12,14 @@ function isError(message) {
12
12
13
13
function formatter ( results ) {
14
14
let output = '\n' ;
15
+ let hasErrors = false ;
15
16
16
17
results . forEach ( result => {
17
18
let messages = result . messages ;
18
19
if ( messages . length === 0 ) {
19
20
return ;
20
21
}
21
22
22
- let hasErrors = false ;
23
23
messages = messages . map ( message => {
24
24
let messageType ;
25
25
if ( isError ( message ) ) {
@@ -61,6 +61,19 @@ function formatter(results) {
61
61
output += `${ outputTable } \n\n` ;
62
62
} ) ;
63
63
64
+ if ( hasErrors ) {
65
+ // Unlike with warnings, we have to do it here.
66
+ // We have similar code in react-scripts for warnings,
67
+ // but warnings can appear in multiple files so we only
68
+ // print it once at the end. For errors, however, we print
69
+ // it here because we always show at most one error, and
70
+ // we can only be sure it's an ESLint error before exiting
71
+ // this function.
72
+ output += 'Search for the ' +
73
+ chalk . underline ( chalk . red ( 'rule keywords' ) ) +
74
+ ' to learn more about each error.' ;
75
+ }
76
+
64
77
return output ;
65
78
}
66
79
You can’t perform that action at this time.
0 commit comments