starting to add models and eslint for common

This commit is contained in:
Arjun Patel
2022-01-31 15:17:29 -08:00
parent 8c14106a10
commit 2f8b23e664
8 changed files with 2576 additions and 15 deletions
+16
View File
@@ -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"
}
+17
View File
@@ -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
}
}
+2450
View File
File diff suppressed because it is too large Load Diff
+9 -1
View File
@@ -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"
}
}
+9
View File
@@ -0,0 +1,9 @@
{
"compilerOptions": {
"noImplicitReturns": true,
"noUnusedLocals": true,
"strict": true,
"strictNullChecks": true
},
"compileOnSave": true
}
+5 -14
View File
@@ -1,11 +1,7 @@
{
"compilerOptions": {
"target": "es5",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": false,
@@ -17,14 +13,9 @@
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve"
"jsx": "preserve",
"strictNullChecks": true
},
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx"
],
"exclude": [
"node_modules"
]
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
}