GitHub actions and some cleanup (#158)
This commit is contained in:
parent
c6b867d888
commit
a0d2a5b82a
16
.github/workflows/lint.yml
vendored
16
.github/workflows/lint.yml
vendored
@ -2,9 +2,6 @@ name: Lint
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
lint:
|
||||||
@ -13,12 +10,13 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
|
|
||||||
- name: Setup Node.js 12.x
|
- name: Setup Node.js 14.x
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: 12.x
|
node-version: 14.x
|
||||||
|
|
||||||
- name: Install and lint
|
- name: Install dependencies
|
||||||
run: |
|
run: yarn
|
||||||
yarn
|
|
||||||
yarn lint
|
- name: Lint
|
||||||
|
run: yarn lint
|
||||||
|
22
.github/workflows/test.yml
vendored
Normal file
22
.github/workflows/test.yml
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
name: Test
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
|
||||||
|
- name: Setup Node.js 14.x
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: 14.x
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: yarn
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
run: yarn test
|
79
package.json
79
package.json
@ -1,72 +1,25 @@
|
|||||||
{
|
{
|
||||||
"name": "excalidraw-room",
|
"name": "excalidraw-portal",
|
||||||
"version": "1.0.0",
|
"dependencies": {
|
||||||
"description": "Excalidraw collaboration server",
|
"@types/debug": "4.1.5",
|
||||||
"main": "index.js",
|
"@types/express": "4.17.11",
|
||||||
|
"@types/node": "14.14.21",
|
||||||
|
"@types/socket.io": "2.1.4",
|
||||||
|
"debug": "4.3.1",
|
||||||
|
"express": "4.17.1",
|
||||||
|
"prettier": "2.2.1",
|
||||||
|
"socket.io": "2.3.0",
|
||||||
|
"typescript": "4.1.3"
|
||||||
|
},
|
||||||
|
"license": "MIT",
|
||||||
|
"main": "dist/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc",
|
"build": "tsc",
|
||||||
"fix": "yarn prettier --write",
|
"format": "yarn prettier --write",
|
||||||
"lint": "yarn prettier --list-different",
|
"lint": "yarn prettier --list-different",
|
||||||
"prettier": "prettier \"**/*.{ts,md,json,yaml,yml}\"",
|
"prettier": "prettier \"**/*.{ts,md,json,yaml,yml}\"",
|
||||||
"start": "node dist/index.js",
|
"start": "node dist/index.js",
|
||||||
"test": "yarn lint"
|
"test": "yarn lint"
|
||||||
},
|
},
|
||||||
"repository": {
|
"version": "1.0.0"
|
||||||
"type": "git",
|
|
||||||
"url": "git+https://github.com/excalidraw/excalidraw-room.git"
|
|
||||||
},
|
|
||||||
"keywords": [],
|
|
||||||
"author": "",
|
|
||||||
"license": "MIT",
|
|
||||||
"bugs": {
|
|
||||||
"url": "https://github.com/excalidraw/excalidraw-room/issues"
|
|
||||||
},
|
|
||||||
"homepage": "https://github.com/excalidraw/excalidraw-room#readme",
|
|
||||||
"dependencies": {
|
|
||||||
"debug": "4.3.1",
|
|
||||||
"eslint": "7.3.1",
|
|
||||||
"eslint-config-prettier": "7.0.0",
|
|
||||||
"eslint-plugin-prettier": "3.3.1",
|
|
||||||
"express": "4.17.1",
|
|
||||||
"prettier": "2.2.1",
|
|
||||||
"socket.io": "2.3.0"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@types/socket.io": "2.1.4",
|
|
||||||
"@types/debug": "4.1.5",
|
|
||||||
"@types/express": "4.17.11",
|
|
||||||
"@types/node": "14.14.12",
|
|
||||||
"typescript": "4.1.3"
|
|
||||||
},
|
|
||||||
"eslintConfig": {
|
|
||||||
"extends": [
|
|
||||||
"prettier"
|
|
||||||
],
|
|
||||||
"plugins": [
|
|
||||||
"prettier"
|
|
||||||
],
|
|
||||||
"rules": {
|
|
||||||
"curly": "warn",
|
|
||||||
"no-console": [
|
|
||||||
"warn",
|
|
||||||
{
|
|
||||||
"allow": [
|
|
||||||
"warn",
|
|
||||||
"error",
|
|
||||||
"info"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"no-else-return": "warn",
|
|
||||||
"no-useless-return": "warn",
|
|
||||||
"prefer-const": [
|
|
||||||
"warn",
|
|
||||||
{
|
|
||||||
"destructuring": "all"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"prefer-template": "warn",
|
|
||||||
"prettier/prettier": "warn"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user