Skip to content

Commit fd74fdd

Browse files
authored
Merge pull request #43 from CMU-313/add-jshint
feat: install and run jshint
2 parents 892a902 + 0de6d5d commit fd74fdd

5 files changed

Lines changed: 3090 additions & 0 deletions

File tree

.github/workflows/jshint,yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Run JSHint
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- master
8+
- develop
9+
pull_request:
10+
branches:
11+
- main
12+
- master
13+
- develop
14+
15+
defaults:
16+
run:
17+
shell: bash
18+
19+
permissions:
20+
contents: read
21+
22+
jobs:
23+
analysis:
24+
runs-on: ubuntu-latest
25+
26+
steps:
27+
- uses: actions/checkout@v4
28+
29+
- run: cp install/package.json package.json
30+
31+
- name: Install Node
32+
uses: actions/setup-node@v4
33+
with:
34+
node-version: 22
35+
36+
- name: NPM Install
37+
uses: bahmutov/npm-install@v1
38+
with:
39+
useLockFile: false
40+
41+
- name: Run JShint
42+
- run: ./node_modules/.bin/jshint .

.jshintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
build

.jshintrc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"node": true,
3+
"jquery": true,
4+
"browser": true,
5+
"esversion": 11,
6+
"mocha": true,
7+
"globals": {
8+
"config": true,
9+
"ajaxify": true,
10+
"define": true,
11+
"app": true,
12+
"utils": true,
13+
"socket": true
14+
}
15+
}

install/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@
174174
"grunt-contrib-watch": "1.1.0",
175175
"husky": "8.0.3",
176176
"jsdom": "27.4.0",
177+
"jshint": "2.13.6",
177178
"lint-staged": "16.2.7",
178179
"mocha": "11.7.5",
179180
"mocha-lcov-reporter": "1.3.0",

0 commit comments

Comments
 (0)