Skip to content
Open
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
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,24 @@ Enhance your collaborative experience with diagrams, drawings, and more using th
make deploy YOUR_USERNAME=${username} YOUR_PASSWORD=${password}
```

## Code style

We maintain a consistent code style and adhere to best practices using ESLint. Our lint rules are enforced through a pre-commit hook to ensure commits follow the established guidelines.

To check for code style issues in both the client and whiteboard directories, you can use the following command:

```sh
npm run lint
```

To automatically fix some of the linting issues, you can use the following command:

```sh
npm run lint:fix
```

These commands help maintain a clean and uniform codebase, ensuring readability and adherence to coding standards.

## Gitpod Setup Guide

Follow these steps to set up your development environment using Gitpod:
Expand Down
23 changes: 23 additions & 0 deletions client/.eslintric.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended"
],
"settings": {
"react": {
"version": "detect"
}
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["@typescript-eslint", "react"],
"rules": {}
}
4 changes: 3 additions & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
"scripts": {
"dev": "webpack serve",
"build": "webpack --mode development",
"build:excalidraw": "node scripts/build.js"
"build:excalidraw": "node scripts/build.js",
"lint": "eslint --ext .js,.ts,.jsx,.tsx src",
"lint:fix": "eslint --ext .js,.ts,.jsx,.tsx src --fix"
},
"dependencies": {
"@dwelle/tunnel-rat": "^0.1.1",
Expand Down
23 changes: 23 additions & 0 deletions whiteboard/.eslintric.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended"
],
"settings": {
"react": {
"version": "detect"
}
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["@typescript-eslint", "react"],
"rules": {}
}
10 changes: 10 additions & 0 deletions whiteboard/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
{
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint . --fix"
},
"devDependencies": {
"@rocket.chat/apps-engine": "^1.40.0",
"@types/node": "14.14.6",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"eslint": "^8.56.0",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.5",
"tslint": "^5.10.0",
"typescript": "^4.0.5"
}
Expand Down