File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -235,6 +235,8 @@ module.exports = {
235235 ] ,
236236
237237 // https://github.com/benmosher/eslint-plugin-import/tree/master/docs/rules
238+ 'import/first' : 'error' ,
239+ 'import/no-amd' : 'error' ,
238240 'import/no-webpack-loader-syntax' : 'error' ,
239241
240242 // 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) {
1212
1313function formatter ( results ) {
1414 let output = '\n' ;
15+ let hasErrors = false ;
1516
1617 results . forEach ( result => {
1718 let messages = result . messages ;
1819 if ( messages . length === 0 ) {
1920 return ;
2021 }
2122
22- let hasErrors = false ;
2323 messages = messages . map ( message => {
2424 let messageType ;
2525 if ( isError ( message ) ) {
@@ -61,6 +61,19 @@ function formatter(results) {
6161 output += `${ outputTable } \n\n` ;
6262 } ) ;
6363
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+
6477 return output ;
6578}
6679
You can’t perform that action at this time.
0 commit comments