Skip to content

Commit

Permalink
Merge pull request #219 from standard/object-shorthand
Browse files Browse the repository at this point in the history
Use object shorthand for properties
  • Loading branch information
LinusU committed Apr 30, 2020
2 parents f2f766e + 7576c9e commit ab4f1af
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -43,7 +43,7 @@ function Linter (opts) {

this.eslintConfig = Object.assign({
cache: true,
cacheLocation: cacheLocation,
cacheLocation,
envs: [],
fix: false,
globals: [],
Expand Down
3 changes: 3 additions & 0 deletions package.json
Expand Up @@ -61,5 +61,8 @@
},
"scripts": {
"test": "standard && tape test/clone.js test/api.js"
},
"engines": {
"node": ">=8.10"
}
}
5 changes: 3 additions & 2 deletions test/api.js
@@ -1,20 +1,21 @@
var eslint = require('eslint')
var Linter = require('../').linter
var path = require('path')
var test = require('tape')

function getStandard () {
return new Linter({
cmd: 'pocketlint',
version: '0.0.0',
eslint: eslint,
eslint,
eslintConfig: require('../tmp/standard/options').eslintConfig
})
}

test('api: lintFiles', function (t) {
t.plan(3)
var standard = getStandard()
standard.lintFiles([], { cwd: '../bin' }, function (err, result) {
standard.lintFiles([], { cwd: path.join(__dirname, '../bin') }, function (err, result) {
t.error(err, 'no error while linting')
t.equal(typeof result, 'object', 'result is an object')
t.equal(result.errorCount, 0)
Expand Down
2 changes: 1 addition & 1 deletion test/lib/standard-cmd.js
Expand Up @@ -4,7 +4,7 @@ var eslint = require('eslint')
var opts = {
cmd: 'pocketlint',
version: '0.0.0',
eslint: eslint,
eslint,
eslintConfig: {
configFile: path.join(__dirname, 'standard.json'),
useEslintrc: false
Expand Down

0 comments on commit ab4f1af

Please sign in to comment.