sudo: false
language: node_js
node_js:
  - '11'
  - '10'
  - '8'
  - '6'
  - '4'
before_install:
  - 'nvm install-latest-npm'
before_script:
  - 'if [ -n "${ESLINT-}" ]; then npm install --no-save "eslint@${ESLINT}" ; fi'
script:
  - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi'
  - 'if [ -n "${TEST-}" ]; then npm run unit-test ; fi'
env:
  global:
    - TEST=true
  matrix:
    - ESLINT=5
    - ESLINT=4
    - ESLINT=3
after_success:
  - 'if [ -n "${TEST-}" ]; then npm run coveralls ; fi'
matrix:
  fast_finish: true
  include:
    - node_js: 'lts/*'
      env: PRETEST=true
  exclude:
    - node_js: '4'
      env: ESLINT=5
  allow_failures:
    - node_js: '11'

sudo: false
language: node_js
node_js:
  - '12'
  - '11'
  - '10'
  - '8'
before_install:
  - 'nvm install-latest-npm'
before_script:
  - 'if [ -n "${ESLINT-}" ]; then npm install --no-save "eslint@${ESLINT}" ; fi'
script:
  - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi'
  - 'if [ -n "${TEST-}" ]; then npm run unit-test ; fi'
env:
  global:
    - TEST=true
  matrix:
    - ESLINT=5
    - ESLINT=4
    - ESLINT=3
after_success:
  - 'if [ -n "${TEST-}" ]; then npm run coveralls ; fi'
matrix:
  fast_finish: true
  include:
    - node_js: 'lts/*'
      env: PRETEST=true
  allow_failures:
    - node_js: '11'

Add Node 12 and remove Node 4/6 from Travis
Add Node 12 and remove Node 4/6 from Travis
