Compare commits

..

No commits in common. "master" and "0.3.3" have entirely different histories.

13 changed files with 6133 additions and 235 deletions

1
.eslintignore Normal file
View File

@ -0,0 +1 @@
/dist

50
.eslintrc.yml Normal file
View File

@ -0,0 +1,50 @@
---
parser: '@typescript-eslint/parser'
env:
node: true
es6: true
settings:
import/resolver:
node:
extensions:
- ".js"
- ".ts"
extends:
- eslint:recommended
- prettier
- plugin:import/errors
- plugin:import/warnings
- plugin:import/typescript
plugins:
- '@typescript-eslint'
- prettier
- modules-newline
rules:
indent: [2, 2, { "SwitchCase": 1 }]
semi:
- error
- always
comma-dangle:
- error
- always-multiline
import/extensions: 0
object-curly-spacing:
- error
- always
object-curly-newline: [1, {
"ImportDeclaration": { "multiline": true, "minProperties": 2 },
"ExportDeclaration": { "multiline": true, "minProperties": 1 }
}]
modules-newline/import-declaration-newline: 1
modules-newline/export-declaration-newline: 1
quotes:
- error
- single
no-console: 0
no-plusplus: 0
import/no-extraneous-dependencies: 0
no-undef: 1
no-unused-vars: 0
'@typescript-eslint/no-unused-vars': 1
no-shadow: 0
'@typescript-eslint/no-shadow': 2

View File

@ -9,8 +9,3 @@ updates:
directory: "/" # Location of package manifests
schedule:
interval: "daily"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"

View File

@ -21,9 +21,9 @@ jobs:
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci

View File

@ -1,3 +1,6 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
name: Node.js Package
on:
@ -5,20 +8,33 @@ on:
types: [created]
jobs:
publish:
build:
runs-on: ubuntu-latest
env:
NPM_GITHUB_TOKEN: ${{ secrets.NPM_GITHUB_PAT_PUBLISH }}
NPM_GITHUB_TOKEN: ${{ secrets.NPM_GITHUB_PAT }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
- run: npm ci
- run: npm run lint
publish-gpr:
needs: build
runs-on: ubuntu-latest
env:
NPM_GITHUB_TOKEN: ${{ secrets.NPM_GITHUB_PAT }}
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
registry-url: https://npm.pkg.github.com/
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_GITHUB_PAT_PUBLISH }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -3,8 +3,7 @@
// for the documentation about the extensions.json format
"recommendations": [
"editorconfig.editorconfig",
"davidanson.vscode-markdownlint",
"streetsidesoftware.code-spell-checker",
"rome.rome"
"dbaeumer.vscode-eslint",
"davidanson.vscode-markdownlint"
]
}

12
.vscode/settings.json vendored
View File

@ -1,13 +1,3 @@
{
"typescript.tsdk": "node_modules/typescript/lib",
"editor.formatOnSave": true,
"[jsonc]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"[typescript]": {
"editor.defaultFormatter": "rome.rome"
},
"[javascript]": {
"editor.defaultFormatter": "rome.rome"
}
"typescript.tsdk": "node_modules/typescript/lib"
}

6155
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
{
"name": "@hyper-tuner/types",
"description": "HyperTuner common TypeScript types",
"version": "0.4.2",
"version": "0.3.3",
"license": "MIT",
"repository": {
"type": "git",
@ -14,16 +14,15 @@
],
"scripts": {
"build": "tsc",
"prepare": "npm run build",
"prepublishOnly": "npm run build",
"start": "tsc --watch",
"lint": "tsc && npm run lint:rome",
"lint:rome": "rome ci src",
"lint:fix": "rome format --write src && rome check --apply src",
"lint:fix:unsafe": "rome check --apply-unsafe src"
"lint": "tsc && eslint --max-warnings=0 src/**/*.ts src/*.ts"
},
"devDependencies": {
"@types/node": "^20.6.0",
"rome": "^12.1.3",
"typescript": "^5.2.2"
"@hyper-tuner/eslint-config": "^0.1.6",
"@types/node": "^17.0.33",
"eslint-plugin-modules-newline": "^0.0.6",
"eslint-plugin-prettier": "^4.2.1",
"typescript": "^4.5.3"
}
}

View File

@ -1,43 +0,0 @@
{
"formatter": {
"enabled": true,
"indentStyle": "space",
"lineWidth": 100,
"indentSize": 2,
"ignore": [
"node_modules",
"build"
]
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"trailingComma": "all"
}
},
"linter": {
"enabled": true,
"rules": {
"all": true,
"correctness": {
"all": true,
"noUnusedVariables": "warn"
},
"style": {
"all": true,
"noImplicitBoolean": "off",
"useEnumInitializers": "off",
"noNonNullAssertion": "off"
},
"suspicious": {
"all": true,
"noExplicitAny": "off"
},
"nursery": {
"all": true,
"useExhaustiveDependencies": "off",
"noForEach": "off"
}
}
}
}

View File

@ -1,26 +0,0 @@
{
"typescript.tsdk": "node_modules/typescript/lib",
"editor.formatOnSave": true,
"cSpell.words": [
"hypertuner",
"kbar",
"pocketbase",
"prefs",
"rusefi",
"typegen",
"vite",
"vitejs"
],
"[jsonc]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"[less]": {
"editor.defaultFormatter": "vscode.css-language-features"
},
"[typescript]": {
"editor.defaultFormatter": "rome.rome"
},
"[javascript]": {
"editor.defaultFormatter": "rome.rome"
}
}

View File

@ -37,30 +37,16 @@ export interface Dialogs {
[name: string]: Dialog;
}
export interface GroupChildMenu {
title: string;
condition: string;
}
export interface SubMenu {
type: 'subMenu';
title: string;
page: number;
condition: string;
}
export interface GroupMenu {
type: 'groupMenu';
title: string;
groupChildMenus: {
[name: string]: GroupChildMenu;
};
}
export interface Menu {
title: string;
subMenus: {
[name: string]: SubMenu | GroupMenu;
[name: string]: SubMenu;
};
}
@ -190,7 +176,6 @@ export interface DatalogEntry {
export interface Config {
[key: string]: any;
megaTune: {
// rome-ignore lint/suspicious/noRedeclare: <explanation>
[key: string]: any;
signature: string;
MTversion: number;
@ -198,7 +183,6 @@ export interface Config {
versionInfo: string;
};
tunerStudio: {
// rome-ignore lint/suspicious/noRedeclare: <explanation>
[key: string]: any;
iniSpecVersion: number;
};
@ -212,20 +196,16 @@ export interface Config {
menus: Menus;
help: Help;
dialogs: {
// rome-ignore lint/suspicious/noRedeclare: <explanation>
[name: string]: Dialog;
};
curves: {
// rome-ignore lint/suspicious/noRedeclare: <explanation>
[name: string]: Curve;
};
tables: {
// rome-ignore lint/suspicious/noRedeclare: <explanation>
[name: string]: Table;
};
outputChannels: OutputChannels;
datalog: {
// rome-ignore lint/suspicious/noRedeclare: <explanation>
[name: string]: DatalogEntry;
};
}

View File

@ -1,5 +1,5 @@
export interface LogEntry {
[id: string]: number | string;
[id: string]: number | string,
}
export type Logs = LogEntry[];