diff options
author | 2023-07-23 20:08:52 -0600 | |
---|---|---|
committer | 2023-07-25 07:45:23 +0000 | |
commit | 8c131073730ec684145c2cc8ee8d6b39bbe9278d (patch) | |
tree | 1129d432ae88475909f0e5d38960395b75364902 /src/models | |
parent | 6.4.1-nightly.11 [skip ci] (diff) | |
download | ferdium-app-8c131073730ec684145c2cc8ee8d6b39bbe9278d.tar.gz ferdium-app-8c131073730ec684145c2cc8ee8d6b39bbe9278d.tar.zst ferdium-app-8c131073730ec684145c2cc8ee8d6b39bbe9278d.zip |
chore: improve lint setup
- update eslint config
- merged eslint rules for JS and TS to avoid duplicates
- extended stricter lint ruleset from typescript-eslint
- corrected wrong setup for certain eslint rulesets
- opt in to reportUnusedDisableDirectives config option
- fix or disable a lot of lint issues throughout codebase
- remove trailingComma: all from prettier config which is default in prettier v3
- add volta configuration to package.json to autoload correct node and pnpm versions
- upgrade all eslint and prettier related dependencies to latest
- remove config options from settings.json which are default anyways
- remove config options from settings.json which are outdated/unknown
- set up prettier as default formatter in settings.json
Diffstat (limited to 'src/models')
-rw-r--r-- | src/models/Recipe.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/models/Recipe.ts b/src/models/Recipe.ts index a03d3447f..35e8d4979 100644 --- a/src/models/Recipe.ts +++ b/src/models/Recipe.ts | |||
@@ -50,11 +50,15 @@ export interface IRecipe { | |||
50 | partition: string; | 50 | partition: string; |
51 | local: boolean; | 51 | local: boolean; |
52 | 52 | ||
53 | // eslint-disable-next-line @typescript-eslint/ban-types | ||
53 | readonly overrideUserAgent?: null | Function; | 54 | readonly overrideUserAgent?: null | Function; |
55 | // eslint-disable-next-line @typescript-eslint/ban-types | ||
54 | readonly buildUrl?: null | Function; | 56 | readonly buildUrl?: null | Function; |
57 | // eslint-disable-next-line @typescript-eslint/ban-types | ||
55 | readonly modifyRequestHeaders?: null | Function; | 58 | readonly modifyRequestHeaders?: null | Function; |
59 | // eslint-disable-next-line @typescript-eslint/ban-types | ||
56 | readonly knownCertificateHosts?: null | Function; | 60 | readonly knownCertificateHosts?: null | Function; |
57 | readonly events?: null | { (key: string): string }; | 61 | readonly events?: null | ((key: string) => string); |
58 | 62 | ||
59 | // TODO: [TS DEBT] Need to check if below properties are needed and where is inherited / implemented from | 63 | // TODO: [TS DEBT] Need to check if below properties are needed and where is inherited / implemented from |
60 | author?: string[]; | 64 | author?: string[]; |
@@ -132,7 +136,7 @@ export default class Recipe implements IRecipe { | |||
132 | this.id = ifUndefined<string>(data.id, this.id); | 136 | this.id = ifUndefined<string>(data.id, this.id); |
133 | this.name = ifUndefined<string>(data.name, this.name); | 137 | this.name = ifUndefined<string>(data.name, this.name); |
134 | this.version = ifUndefined<string>(data.version, this.version); | 138 | this.version = ifUndefined<string>(data.version, this.version); |
135 | this.aliases = ifUndefined<Array<string>>(data.aliases, this.aliases); | 139 | this.aliases = ifUndefined<string[]>(data.aliases, this.aliases); |
136 | this.serviceURL = ifUndefined<string>( | 140 | this.serviceURL = ifUndefined<string>( |
137 | data.config.serviceURL, | 141 | data.config.serviceURL, |
138 | this.serviceURL, | 142 | this.serviceURL, |