Run eslint through npm.
This commit is contained in:
parent
85f22bf0dd
commit
7849a011ce
5 changed files with 1234 additions and 15 deletions
|
|
@ -27,6 +27,7 @@ rules:
|
|||
no-fallthrough: error
|
||||
no-mixed-spaces-and-tabs: error
|
||||
no-multiple-empty-lines: ["error", {"max": 1, "maxEOF": 1}]
|
||||
no-prototype-builtins: off
|
||||
no-unused-vars: off
|
||||
no-use-before-define: error
|
||||
padded-blocks: ["error", "never"]
|
||||
|
|
|
|||
16
.github/workflows/lint.yml
vendored
16
.github/workflows/lint.yml
vendored
|
|
@ -9,14 +9,24 @@ on:
|
|||
jobs:
|
||||
eslint:
|
||||
runs-on: ubuntu-latest
|
||||
container: nextcloudci/eslint:eslint-1
|
||||
|
||||
name: eslint
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [16.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Lint
|
||||
run: ./run-eslint.sh
|
||||
run: npm run lint
|
||||
|
||||
stylelint:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
|
|||
1217
package-lock.json
generated
1217
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -6,7 +6,8 @@
|
|||
"author": "struktur AG <opensource@struktur.de>",
|
||||
"scripts": {
|
||||
"build": "NODE_ENV=production webpack --progress --config webpack.js",
|
||||
"dev": "NODE_ENV=development webpack --config webpack.js"
|
||||
"dev": "NODE_ENV=development webpack --config webpack.js",
|
||||
"lint": "eslint src"
|
||||
},
|
||||
"dependencies": {
|
||||
"@jaames/iro": "5.5.2",
|
||||
|
|
@ -18,6 +19,7 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"copy-webpack-plugin": "6.4.1",
|
||||
"eslint": "8.2.0",
|
||||
"webpack": "4.46.0",
|
||||
"webpack-cli": "4.9.1"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +0,0 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
ESLINT=$(which eslint || true)
|
||||
if [ -z "$ESLINT" ]; then
|
||||
echo "Can't find command \"eslint\" in $PATH"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo Checking scripts with $ESLINT ...
|
||||
find . -type d -name node_modules -prune -o -name "*.js" -print0 | xargs -0 $ESLINT
|
||||
Loading…
Reference in a new issue