mirror of
https://github.com/dotFionn/iassure-wx.git
synced 2026-03-21 06:22:56 -05:00
move types to shared, add first stuff
This commit is contained in:
31
shared/.eslintrc.json
Normal file
31
shared/.eslintrc.json
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"env": {
|
||||
"es2021": true,
|
||||
"node": true
|
||||
},
|
||||
"extends": [
|
||||
"airbnb-typescript/base",
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/eslint-recommended",
|
||||
"plugin:@typescript-eslint/recommended"
|
||||
],
|
||||
"root": true,
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"plugins": [
|
||||
"@typescript-eslint",
|
||||
"import",
|
||||
"promise"
|
||||
],
|
||||
"overrides": [],
|
||||
"parserOptions": {
|
||||
"ecmaVersion": "latest",
|
||||
"sourceType": "module",
|
||||
"project": "./tsconfig.json"
|
||||
},
|
||||
"rules": {
|
||||
"eol-last": [
|
||||
"error",
|
||||
"always"
|
||||
]
|
||||
}
|
||||
}
|
||||
10
shared/package.json
Normal file
10
shared/package.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"devDependencies": {
|
||||
"@types/node": "^18.6.2",
|
||||
"eslint": "^8.23.1",
|
||||
"eslint-config-airbnb-typescript": "^17.0.0",
|
||||
"eslint-plugin-import": "^2.26.0",
|
||||
"eslint-plugin-n": "^15.2.5",
|
||||
"eslint-plugin-promise": "^6.0.1"
|
||||
}
|
||||
}
|
||||
14
shared/src/types/config.types.ts
Normal file
14
shared/src/types/config.types.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
export interface WxConfig {
|
||||
regions: WxRegion[];
|
||||
}
|
||||
|
||||
export interface WxRegion {
|
||||
identifier: string;
|
||||
fixes: WxFix[];
|
||||
}
|
||||
|
||||
export interface WxFix {
|
||||
name: string;
|
||||
lat: number;
|
||||
lon: number;
|
||||
}
|
||||
27
shared/src/types/wx.types.ts
Normal file
27
shared/src/types/wx.types.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
export interface WxLevelData {
|
||||
'T(K)': string;
|
||||
windspeed: string;
|
||||
windhdg: string;
|
||||
}
|
||||
|
||||
export interface WxFixData {
|
||||
coords: {
|
||||
lat: string;
|
||||
long: string;
|
||||
};
|
||||
|
||||
levels: {
|
||||
[key: string]: WxLevelData;
|
||||
}
|
||||
}
|
||||
|
||||
export interface WxData {
|
||||
info: {
|
||||
date: string;
|
||||
datestring: string;
|
||||
legal: string;
|
||||
};
|
||||
data: {
|
||||
[key: string]: WxFixData;
|
||||
}
|
||||
}
|
||||
16
shared/tsconfig.json
Normal file
16
shared/tsconfig.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"compileOnSave": false,
|
||||
"compilerOptions": {
|
||||
"outDir": "dist",
|
||||
"baseUrl": "./src",
|
||||
"module": "ES2022",
|
||||
"target": "ES2022",
|
||||
"lib": ["ES2022"],
|
||||
"sourceMap": true,
|
||||
"strictNullChecks": true,
|
||||
"noImplicitAny": false,
|
||||
"preserveConstEnums": true,
|
||||
"removeComments": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user