Skip to content

Commit 10c29c9

Browse files
fix: lint
1 parent 518b3ef commit 10c29c9

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

lib/cli.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ require('yargonaut')
1414
.helpStyle('green')
1515
.errorsStyle('red.bold')
1616

17-
const yargs = require('yargs')
17+
require('yargs')
1818
.demandCommand(1, chalk.red('[ERROR] 0 arguments passed. Please specify a command'))
1919
.strict()
2020
.recommendCommands()

lib/commands/init.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ const replace = function (file, tpl, replace) {
1717

1818
const PKG = util.pkg()
1919

20+
// eslint-disable-next-line
2021
module.exports = function (path = '', local, theme) {
2122
const msg =
2223
'\n' +
@@ -28,7 +29,7 @@ module.exports = function (path = '', local, theme) {
2829
path = cwd(path || '.')
2930
const target = file => resolve(path, file)
3031
const readme = exists(cwd('README.md')) || pwd('template/README.md')
31-
const main = pwd('template/index.html')
32+
let main = pwd('template/index.html')
3233

3334
if (local) {
3435
main = pwd('template/index.local.html')

tools/locales/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const fse = require('fs-extra')
66

77
class Locales {
88
constructor() {
9+
// eslint-disable-next-line
910
this.y18n = Y18n({
1011
directory: path.resolve(__dirname),
1112
updateFiles: false,
@@ -20,7 +21,7 @@ class Locales {
2021

2122
try {
2223
this._existsLocaleFile(locale)
23-
} catch (e) {
24+
} catch (e) { // eslint-disable-line
2425
return 'en'
2526
}
2627

0 commit comments

Comments
 (0)