Skip to content
This repository has been archived by the owner on Aug 5, 2020. It is now read-only.

Commit

Permalink
Merge pull request #106 from LinusU/prefer-const
Browse files Browse the repository at this point in the history
Prefer const over let
  • Loading branch information
Ahmad Nassri authored Nov 6, 2018
2 parents 5398f97 + 9cabe96 commit 329106f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ module.exports = function echint (files, options, cb) {
}

// initialize options
let opts = Object.assign({}, defaults)
const opts = Object.assign({}, defaults)

// overwrite from package.json?
if (opts.readPackage && config) {
Expand All @@ -60,9 +60,9 @@ module.exports = function echint (files, options, cb) {
if (opts.extends) {
debug('extends found')

let extendsDir = path.join(process.cwd(), 'node_modules', opts.extends.replace(/^(echint-config-)?/, 'echint-config-'))
const extendsDir = path.join(process.cwd(), 'node_modules', opts.extends.replace(/^(echint-config-)?/, 'echint-config-'))

let extendsMain = pkg('main', { cwd: extendsDir, root: false })
const extendsMain = pkg('main', { cwd: extendsDir, root: false })

opts.config = path.join(extendsDir, extendsMain || '.editorconfig')
}
Expand Down

0 comments on commit 329106f

Please sign in to comment.