Skip to content

Commit 50fae0d

Browse files
Merge pull request #57 from conveyal/dev
fix(lint): Fix linting due to new standard/standard-engine changes
2 parents 82e374d + 39f6144 commit 50fae0d

File tree

3 files changed

+6396
-10
lines changed

3 files changed

+6396
-10
lines changed

bin/mastarm

+7-10
Original file line numberDiff line numberDiff line change
@@ -89,22 +89,19 @@ commander
8989
})
9090

9191
commander
92-
.command('lint [paths...]')
92+
.command('lint')
93+
.allowUnknownOption()
9394
.description('Lint JavaScript [& CSS coming soon!]')
9495
.action(function () {
9596
const engine = require('standard-engine')
96-
const standard = require('standard')
97+
const standardOptions = require('standard/options')
9798
// get lint out of there
98-
process.argv.pop()
99+
process.argv = process.argv.filter((arg) => arg !== 'lint')
99100
// Force verbose
100101
process.argv.push('--verbose')
101-
engine.cli(Object.assign({}, standard, {
102-
cwd: process.cwd(),
103-
eslintConfig: {
104-
parser: 'babel-eslint'
105-
},
106-
homepage: 'https://github.com/conveyal/mastarm'
107-
}))
102+
// add babel-eslint parser
103+
standardOptions.parser = 'babel-eslint'
104+
engine.cli(standardOptions)
108105
})
109106

110107
commander

package.json

+3
Original file line numberDiff line numberDiff line change
@@ -75,5 +75,8 @@
7575
"devDependencies": {
7676
"rimraf": "^2.5.4",
7777
"semantic-release": "^4.3.5"
78+
},
79+
"standard": {
80+
"parser": "babel-eslint"
7881
}
7982
}

0 commit comments

Comments
 (0)