Skip to content

Commit

Permalink
Eslint Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
madprops committed Dec 30, 2024
1 parent e3054b5 commit 6d34f0f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node ./server/www"
"start": "node ./server/www",
"lint": "eslint --cache -c eslint.config.mjs",
"fix": "eslint --fix -c eslint.config.mjs"
},
"dependencies": {
"bcrypt": "~5.0.1",
Expand Down
8 changes: 2 additions & 6 deletions utils/check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@ last_tag=$(git describe --tags --abbrev=0)
changed_files=$(git diff --name-only $last_tag HEAD -- '*.js')

if [ -n "$changed_files" ]; then
npx eslint --cache $changed_files
npm run --silent lint $changed_files
else
echo "No files have changed since the last tag."
fi

# npx eslint --cache public/static/assets/js/main/*.js
# npx eslint --cache public/static/assets/js/libs/utilz.js
# npx eslint --cache server/sockets/modules/*.js
fi
6 changes: 3 additions & 3 deletions utils/fix.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash

npx eslint --fix -c eslint.config.mjs public/static/assets/js/main/*.js
npx eslint --fix -c eslint.config.mjs public/static/assets/js/libs/utilz.js
npx eslint --fix -c eslint.config.mjs server/sockets/modules/*.js
npm run --silent lint public/static/assets/js/main/*.js
npm run --silent lint public/static/assets/js/libs/utilz.js
npm run --silent lint server/sockets/modules/*.js

0 comments on commit 6d34f0f

Please sign in to comment.