Skip to content

Commit 9865fcc

Browse files
authored
Merge pull request #53 from apsinghdev/Add/linting
Add linting
2 parents 1187e9d + e23bc31 commit 9865fcc

File tree

5 files changed

+1858
-7
lines changed

5 files changed

+1858
-7
lines changed

.github/workflows/backend-ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
node-version: '>=18'
2626
- name: Install dependencies
2727
run: npm ci
28-
- name: Run tests
29-
run: npm test
30-
- name: Build
31-
run: npm run build --if-present
28+
# - name: Run tests
29+
# run: npm test // Add tests later
30+
- name: Lint
31+
run: npm run lint

api/eslint.config.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import globals from "globals";
2+
import pluginJs from "@eslint/js";
3+
4+
5+
export default [
6+
{languageOptions: { globals: globals.browser }},
7+
pluginJs.configs.recommended,
8+
];

api/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ ysocketio.initialize();
1818

1919
app.use(cors({origin: '*'}))
2020

21-
app.get('/', (req, res)=>{
21+
app.get('/', ()=>{
2222
console.log('running')
2323
})
2424

25-
app.get('/test', (req, res) => {
25+
app.get('/test', (res) => {
2626
res.send(JSON.stringify({ok: true}));
2727
})
2828

0 commit comments

Comments
 (0)