mirror of
https://github.com/warp-tech/warpgate.git
synced 2024-11-10 09:12:56 +08:00
b65a1899ca
#### Description This PR upgrades the TypeScript and Svelte versions used in the Warpgate project. The specific changes include: 1. **TypeScript Upgrade** - Upgraded TypeScript version from `4.9.4` to `5.0.0` in `package.json`. - Updated related TypeScript dependencies in `package.json`. 2. **Svelte Upgrade** - Upgraded Svelte version from `3.58.0` to `4.0.0` in `package.json`. - Updated `svelte-eslint-parser` settings in `.eslintrc.yaml`. - Replaced `sveltestrap` imports with `@sveltestrap/sveltestrap` across various Svelte components. 3. **ESLint Configuration** - Added `plugin:svelte/recommended` to `.eslintrc.yaml`. - Updated `eslint` and related plugins to compatible versions. 4. **Other Dependencies** - Updated several other dependencies in `package.json` and `yarn.lock` to their latest versions to ensure compatibility with TypeScript 5 and Svelte 4. #### Changes Summary - `.eslintrc.yaml`: Adjusted ESLint configurations for the new Svelte parser and updated TypeScript rules. - `openapitools.json`: Upgraded `openapi-generator-cli` version to `7.7.0`. - `package.json`: Updated versions of TypeScript, Svelte, ESLint, and other dependencies. - Various `.svelte` files: Replaced `sveltestrap` imports with `@sveltestrap/sveltestrap` and made minor type adjustments for TypeScript 5 compatibility. - `tsconfig.json`: Minor configuration adjustment to support new TypeScript features.
162 lines
4.5 KiB
YAML
162 lines
4.5 KiB
YAML
parser: '@typescript-eslint/parser'
|
|
parserOptions:
|
|
sourceType: module
|
|
project:
|
|
- ./tsconfig.json
|
|
extraFileExtensions:
|
|
- .svelte
|
|
env:
|
|
es6: true
|
|
browser: true
|
|
extends:
|
|
- 'plugin:import/recommended'
|
|
- 'plugin:import/typescript'
|
|
- 'plugin:@typescript-eslint/all'
|
|
- 'plugin:svelte/recommended'
|
|
plugins:
|
|
- import
|
|
- '@typescript-eslint/eslint-plugin'
|
|
settings:
|
|
import/resolver:
|
|
typescript: {}
|
|
rules:
|
|
'@typescript-eslint/semi':
|
|
- error
|
|
- never
|
|
'@typescript-eslint/indent':
|
|
- error
|
|
- 4
|
|
'@typescript-eslint/explicit-member-accessibility':
|
|
- error
|
|
- accessibility: no-public
|
|
overrides:
|
|
parameterProperties: explicit
|
|
'@typescript-eslint/no-require-imports': 'off'
|
|
'@typescript-eslint/no-parameter-properties': 'off'
|
|
'@typescript-eslint/explicit-function-return-type': 'off'
|
|
'@typescript-eslint/no-explicit-any': 'off'
|
|
'@typescript-eslint/no-magic-numbers': 'off'
|
|
'@typescript-eslint/member-delimiter-style': 'off'
|
|
'@typescript-eslint/promise-function-async': 'off'
|
|
'@typescript-eslint/require-array-sort-compare': 'off'
|
|
'@typescript-eslint/no-floating-promises': 'off'
|
|
'@typescript-eslint/prefer-readonly': 'off'
|
|
'@typescript-eslint/require-await': 'off'
|
|
'@typescript-eslint/strict-boolean-expressions': 'off'
|
|
'@typescript-eslint/no-misused-promises':
|
|
- error
|
|
- checksVoidReturn: false
|
|
'@typescript-eslint/typedef': 'off'
|
|
'@typescript-eslint/consistent-type-imports': 'off'
|
|
'@typescript-eslint/sort-type-union-intersection-members': 'off'
|
|
'@typescript-eslint/no-use-before-define':
|
|
- error
|
|
- classes: false
|
|
functions: false
|
|
no-duplicate-imports: error
|
|
array-bracket-spacing:
|
|
- error
|
|
- never
|
|
block-scoped-var: error
|
|
brace-style: 'off'
|
|
'@typescript-eslint/brace-style':
|
|
- error
|
|
- 1tbs
|
|
- allowSingleLine: true
|
|
computed-property-spacing:
|
|
- error
|
|
- never
|
|
curly: error
|
|
eol-last: error
|
|
eqeqeq:
|
|
- error
|
|
- smart
|
|
max-depth:
|
|
- 1
|
|
- 5
|
|
max-statements:
|
|
- 1
|
|
- 80
|
|
no-multiple-empty-lines: error
|
|
no-mixed-spaces-and-tabs: error
|
|
no-trailing-spaces: error
|
|
'@typescript-eslint/no-unused-vars':
|
|
- error
|
|
- vars: all
|
|
args: after-used
|
|
argsIgnorePattern: ^_
|
|
no-undef: error
|
|
no-var: error
|
|
object-curly-spacing: 'off'
|
|
'@typescript-eslint/object-curly-spacing':
|
|
- error
|
|
- always
|
|
quote-props:
|
|
- warn
|
|
- as-needed
|
|
- keywords: true
|
|
numbers: true
|
|
quotes: 'off'
|
|
'@typescript-eslint/quotes':
|
|
- error
|
|
- single
|
|
- allowTemplateLiterals: true
|
|
'@typescript-eslint/no-confusing-void-expression':
|
|
- error
|
|
- ignoreArrowShorthand: true
|
|
'@typescript-eslint/no-non-null-assertion': 'off'
|
|
'@typescript-eslint/no-unnecessary-condition':
|
|
- error
|
|
- allowConstantLoopConditions: true
|
|
'@typescript-eslint/restrict-template-expressions': 'off'
|
|
'@typescript-eslint/prefer-readonly-parameter-types': 'off'
|
|
'@typescript-eslint/no-unsafe-member-access': 'off'
|
|
'@typescript-eslint/no-unsafe-call': 'off'
|
|
'@typescript-eslint/no-unsafe-return': 'off'
|
|
'@typescript-eslint/no-unsafe-assignment': 'off'
|
|
'@typescript-eslint/naming-convention': 'off'
|
|
'@typescript-eslint/lines-between-class-members':
|
|
- error
|
|
- always
|
|
- exceptAfterSingleLine: true
|
|
'@typescript-eslint/dot-notation': 'off'
|
|
'@typescript-eslint/no-implicit-any-catch': 'off'
|
|
'@typescript-eslint/member-ordering': 'off'
|
|
'@typescript-eslint/no-var-requires': 'off'
|
|
'@typescript-eslint/no-unsafe-argument': 'off'
|
|
'@typescript-eslint/restrict-plus-operands': 'off'
|
|
'@typescript-eslint/space-infix-ops': 'off'
|
|
'@typescript-eslint/no-type-alias':
|
|
- error
|
|
- allowAliases: in-unions-and-intersections
|
|
allowLiterals: always
|
|
allowCallbacks: always
|
|
'@typescript-eslint/comma-dangle':
|
|
- error
|
|
- arrays: always-multiline
|
|
objects: always-multiline
|
|
imports: always-multiline
|
|
exports: always-multiline
|
|
functions: only-multiline
|
|
|
|
overrides:
|
|
- files: '*.svelte'
|
|
parser: 'svelte-eslint-parser'
|
|
parserOptions:
|
|
parser:
|
|
ts: '@typescript-eslint/parser'
|
|
js: 'espree'
|
|
typescript: '@typescript-eslint/parser'
|
|
rules:
|
|
# To allow prop definitions
|
|
'@typescript-eslint/init-declarations': off
|
|
# False positives for {#if}
|
|
'@typescript-eslint/no-unnecessary-condition': off
|
|
# False positives for FontAwesome
|
|
import/no-named-as-default: off
|
|
import/no-named-as-default-member: off
|
|
|
|
ignorePatterns:
|
|
- svelte.config.js
|
|
- vite.config.ts
|
|
- src/*/lib/api-client/**
|