Skip to content

Commit

Permalink
Build: Add npm run lint-fix shortcut
Browse files Browse the repository at this point in the history
Also attempt to do something about the unsolicited checks GitHub began
showing in diffs this week.
  • Loading branch information
Krinkle committed Mar 26, 2022
1 parent 5a1b243 commit 527087c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 15 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,34 +16,37 @@ jobs:
# https://github.com/actions/virtual-environments/blob/ubuntu20/20210302.0/images/linux/Ubuntu2004-README.md
os: ubuntu-20.04
node: 14.x
# Run the lint step only once because, in March 2022, GitHub began
# automatically extracting ESLint warnings from build logs and turning them into
# checks shown inline in PR diffs, but doesn't de-duplicate these.
script: npm test

- name: "Linux: Node 12"
os: ubuntu-20.04
node: 12.x
script: npm test
script: npm run test-nolint

- name: "Linux: Node 10"
os: ubuntu-20.04
node: 10.x
script: npm test
script: npm run test-nolint

- name: "Integration"
os: ubuntu-20.04
node: 12.x
script: npm run test:integration
script: npm run test-integration

# On Windows, cannot test CLI yet.
# https://github.com/qunitjs/qunit/issues/1359
- name: "Windows: Node 14"
os: windows-latest
node: 14.x
script: npm test
script: npm run test-nolint

- name: "macOS: Node 14"
os: macos-latest
node: 14.x
script: npm test
script: npm run test-nolint

name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
Expand Down
22 changes: 12 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,18 +79,20 @@
},
"scripts": {
"build": "rollup -c && grunt copy:src-css",
"build:coverage": "rollup -c --environment BUILD_TARGET:coverage && grunt copy:src-css",
"test": "npm run test:lint && npm run build && grunt test && node bin/qunit.js test/cli/*.js",
"test:lint": "eslint --cache .",
"test:main": "npm run build && grunt test",
"test:cli": "npm run build && node bin/qunit.js test/main/ test/cli/*.js",
"test:integration": "npm run build && node bin/qunit.js test/integration/*.js",
"build:dev": "node build/watch.js",
"build-coverage": "rollup -c --environment BUILD_TARGET:coverage && grunt copy:src-css",
"build-dev": "node build/watch.js",
"lint": "eslint --cache .",
"lint-fix": "eslint --cache --fix .",
"test-main": "grunt test",
"test-cli": "node bin/qunit.js test/main/ test/cli/*.js",
"test": "npm run lint && npm run build && npm run test-main && npm run test-cli",
"test-nolint": "npm run build && npm run test-main && npm run test-cli",
"test-integration": "npm run build && node bin/qunit.js test/integration/*.js",
"browserstack": "browserstack-runner -v",
"authors": "grunt authors",
"coverage": "npm run build:coverage && npm run coverage:_cli && npm run coverage:_main && nyc report",
"coverage:_cli": "nyc --use-spawn-wrap --silent bin/qunit.js test/cli/*.js",
"coverage:_main": "nyc instrument --in-place qunit/ && grunt connect:base qunit",
"coverage": "npm run build-coverage && npm run coverage-cli && npm run coverage-main && nyc report",
"coverage-cli": "nyc --use-spawn-wrap --silent bin/qunit.js test/cli/*.js",
"coverage-main": "nyc instrument --in-place qunit/ && grunt connect:base qunit",
"coveralls-upload": "cat coverage/lcov.info | coveralls"
},
"nyc": {
Expand Down

0 comments on commit 527087c

Please sign in to comment.