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

Commit 329106f

Browse files
author
Ahmad Nassri
authored
Merge pull request #106 from LinusU/prefer-const
Prefer const over let
2 parents 5398f97 + 9cabe96 commit 329106f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ module.exports = function echint (files, options, cb) {
4545
}
4646

4747
// initialize options
48-
let opts = Object.assign({}, defaults)
48+
const opts = Object.assign({}, defaults)
4949

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

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

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

6767
opts.config = path.join(extendsDir, extendsMain || '.editorconfig')
6868
}

0 commit comments

Comments
 (0)