Skip to content

Commit

Permalink
Move eslint to npm scripts (#819)
Browse files Browse the repository at this point in the history
* Move eslint to npm scripts

* CI: run lint once
  • Loading branch information
XhmikosR authored Oct 6, 2021
1 parent fabf9a1 commit dd3481b
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 48 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,29 @@ on:

env:
FORCE_COLOR: 2
NODE_LINT: 14 # The Node.js version to run lint

jobs:
lint:
name: Lint
runs-on: ubuntu-latest

steps:
- name: Clone repository
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE_LINT }}
cache: npm

- name: Install npm dependencies
run: npm ci

- name: Lint
run: npm run lint

test:
name: Node ${{ matrix.node }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
Expand Down
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@
"node": ">=12"
},
"scripts": {
"test": "mocha test"
"lint": "eslint --report-unused-disable-directives --ignore-path .gitignore .",
"fix": "npm run eslint -- --fix",
"mocha": "mocha",
"test": "mocha"
},
"repository": {
"type": "git",
"url": "git://github.com/dlmanning/gulp-sass"
"url": "git+https://github.com/dlmanning/gulp-sass.git"
},
"keywords": [
"gulpplugin",
Expand All @@ -23,6 +26,7 @@
"bugs": {
"url": "https://github.com/dlmanning/gulp-sass/issues"
},
"homepage": "https://github.com/dlmanning/gulp-sass#readme",
"files": [
"index.js"
],
Expand Down
46 changes: 0 additions & 46 deletions test/lint.js

This file was deleted.

0 comments on commit dd3481b

Please sign in to comment.