55'use strict' ;
66
77const resolve = require ( 'resolve' ) ;
8- const log = require ( './log ' ) ;
8+ const error = require ( './error ' ) ;
99
1010let warnedForMissingVersion = false ;
1111
@@ -16,7 +16,7 @@ function detectReactVersion() {
1616 return react . version ;
1717 } catch ( e ) {
1818 if ( e . code === 'MODULE_NOT_FOUND' ) {
19- log ( 'Warning: React version was set to "detect" in eslint-plugin-react settings, ' +
19+ error ( 'Warning: React version was set to "detect" in eslint-plugin-react settings, ' +
2020 'but the "react" package is not installed. Assuming latest React version for linting.' ) ;
2121 return '999.999.999' ;
2222 }
@@ -33,12 +33,12 @@ function getReactVersionFromContext(context) {
3333 settingsVersion = detectReactVersion ( ) ;
3434 }
3535 if ( typeof settingsVersion !== 'string' ) {
36- log ( 'Warning: React version specified in eslint-plugin-react-settings must be a string; ' +
36+ error ( 'Warning: React version specified in eslint-plugin-react-settings must be a string; ' +
3737 `got “${ typeof settingsVersion } ”` ) ;
3838 }
3939 confVer = String ( settingsVersion ) ;
4040 } else if ( ! warnedForMissingVersion ) {
41- log ( 'Warning: React version not specified in eslint-plugin-react settings. ' +
41+ error ( 'Warning: React version not specified in eslint-plugin-react settings. ' +
4242 'See https://github.com/yannickcr/eslint-plugin-react#configuration.' ) ;
4343 warnedForMissingVersion = true ;
4444 }
@@ -52,7 +52,7 @@ function getFlowVersionFromContext(context) {
5252 if ( context . settings . react && context . settings . react . flowVersion ) {
5353 const flowVersion = context . settings . react . flowVersion ;
5454 if ( typeof flowVersion !== 'string' ) {
55- log ( 'Warning: Flow version specified in eslint-plugin-react-settings must be a string; ' +
55+ error ( 'Warning: Flow version specified in eslint-plugin-react-settings must be a string; ' +
5656 `got “${ typeof flowVersion } ”` ) ;
5757 }
5858 confVer = String ( flowVersion ) ;
0 commit comments