File tree Expand file tree Collapse file tree 7 files changed +466
-497
lines changed Expand file tree Collapse file tree 7 files changed +466
-497
lines changed Original file line number Diff line number Diff line change 1+ // @ts -check
2+ /** @type {import('eslint').Linter.LegacyConfig } */
13module . exports = {
24 root : true ,
35 extends : [ 'eslint:recommended' ] ,
46 rules : {
57 eqeqeq : [ 'error' , 'always' ]
68 } ,
7- parserOptions : { ecmaVersion : 11 } ,
9+ parserOptions : { ecmaVersion : 11 , sourceType : 'module' } ,
810 env : { es6 : true , node : true }
911} ;
Original file line number Diff line number Diff line change 1+ name : Run CI
2+ on :
3+ push :
4+ branches :
5+ - ng
6+ pull_request :
7+ branches :
8+ - ng
9+
10+ jobs :
11+ lint :
12+ runs-on : ubuntu-latest
13+ steps :
14+ - name : Checkout repository
15+ uses : actions/checkout@v4
16+ - name : Set up Node.js
17+ uses : actions/setup-node@v4
18+ with :
19+ node-version : 22
20+ cache : yarn
21+ - name : Install dependencies
22+ run : yarn install --frozen-lockfile
23+ - name : Run lint
24+ run : yarn lint
Original file line number Diff line number Diff line change 1+ 22.14.0
Original file line number Diff line number Diff line change 33 "singleQuote" : true ,
44 "printWidth" : 100 ,
55 "arrowParens" : " always" ,
6- "trailingComma" : " none"
6+ "trailingComma" : " none" ,
7+ "endOfLine" : " auto"
78}
Original file line number Diff line number Diff line change 1- const Koa = require ( 'koa' ) ;
2- const bodyParser = require ( 'koa-bodyparser' ) ;
3- const cors = require ( '@koa/cors' ) ;
4- const websocket = require ( 'koa-easy-ws' ) ;
5- const WebSocketJSONStream = require ( '@teamwork/websocket-json-stream' ) ;
6- const ShareDB = require ( 'sharedb' ) ;
7- const uuid = require ( 'uuid' ) . v4 ;
1+ // @ts -check
2+ import cors from '@koa/cors' ;
3+ import WebSocketJSONStream from '@teamwork/websocket-json-stream' ;
4+ import Koa from 'koa' ;
5+ import bodyParser from 'koa-bodyparser' ;
6+ import websocket from 'koa-easy-ws' ;
7+ import ShareDB from 'sharedb' ;
8+ import { v4 as uuid } from 'uuid' ;
89
910const COLLECTION_NAME = 'sa' ;
1011
Original file line number Diff line number Diff line change 22 "name" : " sharedb-ace-backend" ,
33 "version" : " 0.0.1" ,
44 "description" : " ShareDB-powered backend for collaborative editing in the Source Academy." ,
5+ "type" : " module" ,
56 "main" : " index.js" ,
67 "repository" : " https://github.com/source-academy/sharedb-ace-backend" ,
78 "license" : " Apache-2.0" ,
89 "private" : true ,
910 "scripts" : {
1011 "eslint" : " eslint index.js" ,
11- "format" : " eslint --fix index.js && prettier index.js" ,
12+ "format" : " eslint --fix index.js && prettier --write index.js" ,
13+ "lint" : " eslint --report-unused-disable-directives --max-warnings 0 index.js && prettier --check index.js" ,
1214 "start" : " node index.js"
1315 },
16+ "packageManager" :
" [email protected] +sha1.ac34549e6aa8e7ead463a7407e1c7390f61a6610" ,
1417 "dependencies" : {
1518 "@koa/cors" : " ^5.0.0" ,
1619 "@teamwork/websocket-json-stream" : " ^2.0.0" ,
17- "koa" : " ^2.16 .1" ,
20+ "koa" : " ^3.0 .1" ,
1821 "koa-bodyparser" : " ^4.4.1" ,
1922 "koa-easy-ws" : " ^2.1.0" ,
2023 "sharedb" : " ^5.1.1" ,
2124 "uuid" : " ^11.1.0" ,
2225 "ws" : " ^8.18.0"
2326 },
2427 "devDependencies" : {
25- "eslint" : " ^7.6.0 " ,
26- "prettier" : " 2.1 .2"
28+ "eslint" : " ^8.57.1 " ,
29+ "prettier" : " ^3.6 .2"
2730 }
2831}
You can’t perform that action at this time.
0 commit comments