starting to add models and eslint for common
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"root": true,
|
||||
"plugins": ["@typescript-eslint"],
|
||||
"extends": [
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"prettier",
|
||||
"eslint:recommended"
|
||||
],
|
||||
"rules": {
|
||||
// I suggest you add those two rules:
|
||||
"@typescript-eslint/no-unused-vars": "error",
|
||||
"@typescript-eslint/no-explicit-any": "error",
|
||||
"prefer-const": "error"
|
||||
},
|
||||
"parser": "@typescript-eslint/parser"
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import { v4 as uuid } from "uuid";
|
||||
import { Timestamp } from "firebase/firestore";
|
||||
|
||||
export default class Conversation {
|
||||
id: string = uuid();
|
||||
|
||||
name: string; // engineering, general, arjun and jacob...
|
||||
|
||||
createdDate: Timestamp = Timestamp.now()
|
||||
createdByUserId: string
|
||||
|
||||
|
||||
constructor(name: string createdByUserId: string) {
|
||||
this.name = name;
|
||||
this.createdByUserId = createdByUserId
|
||||
}
|
||||
}
|
||||
Generated
+2450
File diff suppressed because it is too large
Load Diff
@@ -3,5 +3,13 @@
|
||||
"version": "1.0.0",
|
||||
"main": "index.js",
|
||||
"license": "MIT",
|
||||
"private": false
|
||||
"private": false,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "^5.10.2",
|
||||
"typescript": "^4.5.5",
|
||||
"uuid": "^8.3.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/uuid": "^8.3.4"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"noImplicitReturns": true,
|
||||
"noUnusedLocals": true,
|
||||
"strict": true,
|
||||
"strictNullChecks": true
|
||||
},
|
||||
"compileOnSave": true
|
||||
}
|
||||
Reference in New Issue
Block a user