mirror of https://github.com/hyper-tuner/types.git
Switch from ESlint to Rome (#125)
This commit is contained in:
parent
b5fa771130
commit
817d170e8b
|
@ -1 +0,0 @@
|
||||||
/dist
|
|
|
@ -1,50 +0,0 @@
|
||||||
---
|
|
||||||
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
|
|
|
@ -3,7 +3,8 @@
|
||||||
// for the documentation about the extensions.json format
|
// for the documentation about the extensions.json format
|
||||||
"recommendations": [
|
"recommendations": [
|
||||||
"editorconfig.editorconfig",
|
"editorconfig.editorconfig",
|
||||||
"dbaeumer.vscode-eslint",
|
"davidanson.vscode-markdownlint",
|
||||||
"davidanson.vscode-markdownlint"
|
"streetsidesoftware.code-spell-checker",
|
||||||
|
"rome.rome"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,13 @@
|
||||||
{
|
{
|
||||||
"typescript.tsdk": "node_modules/typescript/lib"
|
"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"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -16,13 +16,13 @@
|
||||||
"build": "tsc",
|
"build": "tsc",
|
||||||
"prepare": "npm run build",
|
"prepare": "npm run build",
|
||||||
"start": "tsc --watch",
|
"start": "tsc --watch",
|
||||||
"lint": "tsc && eslint --max-warnings=0 src/**/*.ts src/*.ts"
|
"lint": "tsc && rome ci src",
|
||||||
|
"lint:fix": "rome format --write src && rome check --apply src",
|
||||||
|
"lint:fix:suggested": "rome check --apply-suggested src"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@hyper-tuner/eslint-config": "git+https://github.com/hyper-tuner/eslint-config.git",
|
|
||||||
"@types/node": "^18.11.9",
|
"@types/node": "^18.11.9",
|
||||||
"eslint-plugin-modules-newline": "^0.0.6",
|
"rome": "^10.0.1",
|
||||||
"eslint-plugin-prettier": "^4.2.1",
|
|
||||||
"typescript": "^4.8.4"
|
"typescript": "^4.8.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
"formatter": {
|
||||||
|
"enabled": true,
|
||||||
|
"indentStyle": "space",
|
||||||
|
"lineWidth": 100,
|
||||||
|
"indentSize": 2,
|
||||||
|
"ignore": [
|
||||||
|
"node_modules",
|
||||||
|
"build"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"javascript": {
|
||||||
|
"formatter": {
|
||||||
|
"quoteStyle": "single",
|
||||||
|
"trailingComma": "all"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"linter": {
|
||||||
|
"enabled": true,
|
||||||
|
"rules": {
|
||||||
|
"recommended": true,
|
||||||
|
"style": {
|
||||||
|
"noImplicitBoolean": "off"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,26 @@
|
||||||
|
{
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
}
|
|
@ -43,14 +43,14 @@ export interface GroupChildMenu {
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SubMenu {
|
export interface SubMenu {
|
||||||
type: 'subMenu',
|
type: 'subMenu';
|
||||||
title: string;
|
title: string;
|
||||||
page: number;
|
page: number;
|
||||||
condition: string;
|
condition: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface GroupMenu {
|
export interface GroupMenu {
|
||||||
type: 'groupMenu',
|
type: 'groupMenu';
|
||||||
title: string;
|
title: string;
|
||||||
groupChildMenus: {
|
groupChildMenus: {
|
||||||
[name: string]: GroupChildMenu;
|
[name: string]: GroupChildMenu;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
export interface LogEntry {
|
export interface LogEntry {
|
||||||
[id: string]: number | string,
|
[id: string]: number | string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type Logs = LogEntry[];
|
export type Logs = LogEntry[];
|
||||||
|
|
Loading…
Reference in New Issue