Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion .github/workflows/jshint,yaml → .github/workflows/jshint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- run: cp install/package.json package.json

Expand All @@ -39,4 +41,14 @@ jobs:
useLockFile: false

- name: Run JShint
- run: ./node_modules/.bin/jshint .
run: |
git fetch origin main
FILES=$(git diff --name-only origin/main...HEAD | grep '\.js$' || true)

if [ -z "$FILES" ]; then
echo "No JS files changed"
else
echo "Running JSHint on:"
echo "$FILES"
./node_modules/.bin/jshint $FILES || echo "JSHint found potential issues in modified files."
fi
2 changes: 1 addition & 1 deletion src/admin/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,4 @@ module.exports.filterDirectories = filterDirectories;
module.exports.simplify = simplify;
module.exports.sanitize = sanitize;

require('../promisify')(module.exports);
require('../promisify')(module.exports);
2 changes: 1 addition & 1 deletion src/api/categories.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,4 +247,4 @@ categoriesAPI.setModerator = async (caller, { cid, member, set }) => {

const privilegeList = await privileges.categories.getUserPrivilegeList();
await categoriesAPI.setPrivilege(caller, { cid, privilege: privilegeList, member, set });
};
};
Loading