@@ -152,17 +152,17 @@ const normalizeOptions = options => {
152152 return options ;
153153} ;
154154
155- const mergeWithPkgConf = options => {
155+ const mergeWithPackageConfig = options => {
156156 options = Object . assign ( { cwd : process . cwd ( ) } , options ) ;
157157 options . cwd = path . resolve ( options . cwd ) ;
158- const conf = pkgConf . sync ( 'xo' , { cwd : options . cwd , skipOnFalse : true } ) ;
158+ const config = pkgConf . sync ( 'xo' , { cwd : options . cwd , skipOnFalse : true } ) ;
159159 const engines = pkgConf . sync ( 'engines' , { cwd : options . cwd } ) ;
160- return Object . assign ( { } , conf , { nodeVersion : engines && engines . node && semver . validRange ( engines . node ) } , options ) ;
160+ return Object . assign ( { } , config , { nodeVersion : engines && engines . node && semver . validRange ( engines . node ) } , options ) ;
161161} ;
162162
163163const normalizeSpaces = options => typeof options . space === 'number' ? options . space : 2 ;
164164
165- const mergeWithPrettierConf = ( options , prettierOptions ) => {
165+ const mergeWithPrettierConfig = ( options , prettierOptions ) => {
166166 if ( ( options . semicolon === true && prettierOptions . semi === false ) ||
167167 ( options . semicolon === false && prettierOptions . semi === true ) ) {
168168 throw new Error ( `The Prettier config \`semi\` is ${ prettierOptions . semi } while XO \`semicolon\` is ${ options . semicolon } ` ) ;
@@ -279,13 +279,13 @@ const buildConfig = options => {
279279 name = `eslint-config-${ name } ` ;
280280 }
281281
282- const ret = resolveFrom ( options . cwd , name ) ;
282+ const returnValue = resolveFrom ( options . cwd , name ) ;
283283
284- if ( ! ret ) {
284+ if ( ! returnValue ) {
285285 throw new Error ( `Couldn't find ESLint config: ${ name } ` ) ;
286286 }
287287
288- return ret ;
288+ return returnValue ;
289289 } ) ;
290290
291291 config . baseConfig . extends = config . baseConfig . extends . concat ( configs ) ;
@@ -301,7 +301,7 @@ const buildConfig = options => {
301301 config . baseConfig . extends = config . baseConfig . extends . concat ( 'prettier' ) ;
302302 // The `prettier/prettier` rule reports errors if the code is not formatted in accordance to Prettier
303303 config . rules [ 'prettier/prettier' ] = [
304- 'error' , mergeWithPrettierConf ( options , prettier . resolveConfig . sync ( options . cwd || process . cwd ( ) ) || { } )
304+ 'error' , mergeWithPrettierConfig ( options , prettier . resolveConfig . sync ( options . cwd || process . cwd ( ) ) || { } )
305305 ] ;
306306 // If the user has the React, Flowtype, or Standard plugin, add the corresponding Prettier rule overrides
307307 // See https://github.com/prettier/eslint-config-prettier for the list of plugins overrrides
@@ -374,7 +374,7 @@ const getIgnores = options => {
374374} ;
375375
376376const preprocess = options => {
377- options = mergeWithPkgConf ( options ) ;
377+ options = mergeWithPackageConfig ( options ) ;
378378 options = normalizeOptions ( options ) ;
379379 options = getIgnores ( options ) ;
380380 options . extensions = DEFAULT_EXTENSION . concat ( options . extensions || [ ] ) ;
@@ -383,8 +383,8 @@ const preprocess = options => {
383383
384384module . exports . DEFAULT_IGNORE = DEFAULT_IGNORE ;
385385module . exports . DEFAULT_CONFIG = DEFAULT_CONFIG ;
386- module . exports . mergeWithPkgConf = mergeWithPkgConf ;
387- module . exports . mergeWithPrettierConf = mergeWithPrettierConf ;
386+ module . exports . mergeWithPkgConf = mergeWithPackageConfig ;
387+ module . exports . mergeWithPrettierConf = mergeWithPrettierConfig ;
388388module . exports . normalizeOptions = normalizeOptions ;
389389module . exports . buildConfig = buildConfig ;
390390module . exports . findApplicableOverrides = findApplicableOverrides ;
0 commit comments