Skip to content

Commit

Permalink
Don't run on Node.js versions less than 8.10.0 (#1496)
Browse files Browse the repository at this point in the history
ESLint uses the `s` (dotAll) flag for regular expressions which isn't
supported in Node.js versions earlier than 8.10.0.
  • Loading branch information
watson committed Mar 15, 2020
1 parent 8c0195d commit 37d8bb2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
language: node_js
node_js:
- 8.10.0
- 8
- 10
- 12
Expand Down
4 changes: 2 additions & 2 deletions bin/cmd.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ var match = process.version.match(/v(\d+)\.(\d+)/)
var major = parseInt(match[1], 10)
var minor = parseInt(match[2], 10)

if (major >= 9 || (major === 8 && minor >= 6)) {
if (major >= 9 || (major === 8 && minor >= 10)) {
require('standard-engine').cli(require('../options'))
} else {
console.error('standard: Node 8 or greater is required. `standard` did not run.')
console.error('standard: Node 8.10.0 or greater is required. `standard` did not run.')
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"tape": "^4.6.0"
},
"engines": {
"node": ">=8"
"node": ">=8.10.0"
},
"homepage": "https://standardjs.com",
"keywords": [
Expand Down

0 comments on commit 37d8bb2

Please sign in to comment.