Skip to content

Commit aaec606

Browse files
committed
standard
1 parent f8f9242 commit aaec606

File tree

5 files changed

+26
-26
lines changed

5 files changed

+26
-26
lines changed

bin/cmd.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env node
22

3-
var opts = require('../options.js')
3+
const opts = require('../options.js')
44
require('standard-engine').cli(opts)

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// programmatic usage
2-
var Linter = require('standard-engine').linter
2+
const Linter = require('standard-engine').linter
33

4-
var opts = require('./options.js')
4+
const opts = require('./options.js')
55

66
module.exports = new Linter(opts)

options.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
var path = require('path')
2-
var pkg = require('./package.json')
1+
const path = require('path')
2+
const pkg = require('./package.json')
33

44
module.exports = {
55
// cmd, homepage, bugs all pulled from package.json

test/api.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
var path = require('path')
2-
var semistandard = require('../')
3-
var test = require('tape')
4-
var filePath = path.resolve('./bin/cmd.js')
1+
const path = require('path')
2+
const semistandard = require('../')
3+
const test = require('tape')
4+
const filePath = path.resolve('./bin/cmd.js')
55

66
test('api usage', function (t) {
77
t.plan(6)

test/clone.js

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,26 @@
88
* VERSION BUMP.)
99
*/
1010

11-
var cp = require('child_process')
12-
var extend = require('xtend')
13-
var mkdirp = require('mkdirp')
14-
var path = require('path')
15-
var rimraf = require('rimraf')
16-
var series = require('run-series')
17-
var test = require('tape')
11+
const cp = require('child_process')
12+
const extend = require('xtend')
13+
const mkdirp = require('mkdirp')
14+
const path = require('path')
15+
const rimraf = require('rimraf')
16+
const series = require('run-series')
17+
const test = require('tape')
1818

19-
var TMP = path.join(__dirname, '..', 'tmp')
20-
var SEMISTANDARD = path.join(__dirname, '..', 'bin', 'cmd.js')
19+
const TMP = path.join(__dirname, '..', 'tmp')
20+
const SEMISTANDARD = path.join(__dirname, '..', 'bin', 'cmd.js')
2121

2222
// var URLs = require('./semistandard-repos.json')
23-
var URLS = [
23+
const URLS = [
2424
'https://github.com/Flet/cursorfun'
2525
]
2626

27-
var MODULES = {}
27+
const MODULES = {}
2828
URLS.forEach(function (url) {
29-
var spliturl = url.split('/')
30-
var name = spliturl[spliturl.length - 1]
29+
const spliturl = url.split('/')
30+
const name = spliturl[spliturl.length - 1]
3131
MODULES[name] = url + '.git'
3232
})
3333

@@ -36,9 +36,9 @@ test('clone repos from github', function (t) {
3636
mkdirp.sync(TMP)
3737

3838
series(Object.keys(MODULES).map(function (name) {
39-
var url = MODULES[name]
39+
const url = MODULES[name]
4040
return function (cb) {
41-
var args = ['clone', '--depth', 1, url, path.join(TMP, name)]
41+
const args = ['clone', '--depth', 1, url, path.join(TMP, name)]
4242
// TODO: Start `git` in a way that works on Windows – PR welcome!
4343
spawn('git', args, {}, cb)
4444
}
@@ -52,7 +52,7 @@ test('clone repos from github', function (t) {
5252
test('lint repos', function (t) {
5353
series(Object.keys(MODULES).map(function (name) {
5454
return function (cb) {
55-
var cwd = path.join(TMP, name)
55+
const cwd = path.join(TMP, name)
5656
spawn('node', [SEMISTANDARD], { cwd }, function (err) {
5757
t.error(err, name)
5858
cb(null)
@@ -65,7 +65,7 @@ test('lint repos', function (t) {
6565
})
6666

6767
function spawn (command, args, opts, cb) {
68-
var child = cp.spawn(command, args, extend({ stdio: 'inherit' }, opts))
68+
const child = cp.spawn(command, args, extend({ stdio: 'inherit' }, opts))
6969
child.on('error', cb)
7070
child.on('close', function (code) {
7171
if (code !== 0) cb(new Error('non-zero exit code: ' + code))

0 commit comments

Comments
 (0)