1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-07-05 11:37:01 +02:00

Add eslint dependency within Node.js package (#3813)

This commit is contained in:
Manish Jethani 2021-08-13 16:13:20 +05:30 committed by GitHub
parent f98666f7a3
commit daff6b3a34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 4 deletions

View File

@ -28,12 +28,10 @@ dist/build/uBlock0.nodejs: tools/make-nodejs.sh $(sources) $(platform) $(assets)
nodejs: dist/build/uBlock0.nodejs
lint: nodejs
eslint -c platform/nodejs/eslintrc.json \
dist/build/uBlock0.nodejs/js \
dist/build/uBlock0.nodejs/*.js
cd dist/build/uBlock0.nodejs && npm install && npm run lint
test: nodejs
cd dist/build/uBlock0.nodejs && npm run test
cd dist/build/uBlock0.nodejs && npm install && npm run test
# Update submodules.
update-submodules:

View File

@ -6,6 +6,7 @@
"main": "index.js",
"scripts": {
"build": "node build.js",
"lint": "eslint js/ *.js",
"test": "node test.js"
},
"repository": {
@ -27,5 +28,8 @@
"engines": {
"node": ">=14.0.0",
"npm": ">=6.14.4"
},
"devDependencies": {
"eslint": "^7.32.0"
}
}

View File

@ -52,6 +52,7 @@ node -pe "JSON.stringify(fs.readFileSync('$THIRDPARTY/easylist.txt', 'utf8'))" \
node -pe "JSON.stringify(fs.readFileSync('$THIRDPARTY/easyprivacy.txt', 'utf8'))" \
> $DES/data/easyprivacy.json
cp platform/nodejs/.*.json $DES/
cp platform/nodejs/*.js $DES/
cp platform/nodejs/*.json $DES/
cp platform/nodejs/README.md $DES/