@@ -0,0 +1,34 @@
+name: "Lint"
+
+on:
+ pull_request:
+ # The branches below must be a subset of the branches above
+ branches: [ main, develop ] # runs on every push
+jobs:
+ lint:
+ name: Lint
+ runs-on: ubuntu-latest
+ timeout-minutes: 10
+ strategy:
+ fail-fast: false
+ matrix:
+ node-version: [14.x]
+ steps:
+ - uses: actions/checkout@v1 # checkout latest commit
+ - name: Use Node.js ${{ matrix.node-version }} # set up Node.js
+ uses: actions/setup-node@v1
+ with:
+ node-version: ${{ matrix.node-version }}
+ - name: Clean install of dependencies # runs the npm ci command to install all dependencies
+ run: npm ci
+ env:
+ CI: "true"
+ - name: Lint # runs ESLint
+ run: npm run lint
@@ -5,6 +5,7 @@
"main": "BetterYTM.user.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
+ "lint": "eslint .",
"minify": "minify BetterYTM.user.js > BetterYTM.min.user.js"
},
"repository": {