Fixed some lint

This commit is contained in:
DrMint 2022-07-10 04:12:38 +02:00
parent 1a790a597d
commit bb42e2a56f
4 changed files with 37 additions and 38 deletions

View File

@ -13,12 +13,12 @@ name: "CodeQL"
on: on:
push: push:
branches: [ "main" ] branches: ["main"]
pull_request: pull_request:
# The branches below must be a subset of the branches above # The branches below must be a subset of the branches above
branches: [ "main" ] branches: ["main"]
schedule: schedule:
- cron: '42 0 * * 6' - cron: "42 0 * * 6"
jobs: jobs:
analyze: analyze:
@ -32,7 +32,7 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
language: [ 'javascript' ] language: ["javascript"]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
@ -52,7 +52,6 @@ jobs:
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality # queries: security-extended,security-and-quality
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below) # If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild - name: Autobuild

View File

@ -5,7 +5,7 @@ name: Preflight checks
on: on:
push: push:
branches: [ main ] branches: [main]
pull_request: pull_request:
branches: [main] branches: [main]

View File

@ -3,7 +3,7 @@
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "next dev -p 12499", "dev": "next dev -p 12499",
"precommit": "npm run prettier && npm run unused-exports && npm run eslint && npm run tsc && npm run generate && echo ALL PRECOMMIT CHECKS PASSED SUCCESSFULLY, LET\\'S FUCKING GO!", "precommit": "npm run generate && npm run prettier && npm run unused-exports && npm run eslint && npm run tsc && echo ALL PRECOMMIT CHECKS PASSED SUCCESSFULLY, LET\\'S FUCKING GO!",
"unused-exports": "ts-unused-exports ./tsconfig.json --excludePathsFromReport=src/pages --ignoreFiles=generated", "unused-exports": "ts-unused-exports ./tsconfig.json --excludePathsFromReport=src/pages --ignoreFiles=generated",
"prebuild": "npm run generate", "prebuild": "npm run generate",
"build": "next build", "build": "next build",

View File

@ -34,11 +34,11 @@ type Recursive<T, Path extends unknown[]> = PathHead<Path> extends keyof T
type Split< type Split<
Str, Str,
Cache extends string[] = [] Acc extends string[] = []
> = Str extends `${infer Method}.${infer PathRest}` > = Str extends `${infer Head}.${infer Rest}`
? Split<PathRest, [...Cache, Method]> ? Split<Rest, [...Acc, Head]>
: Str extends `${infer PathLast}` : Str extends `${infer Last}`
? [...Cache, PathLast] ? [...Acc, Last]
: never; : never;
export type SelectiveNonNullable<T, P extends PathDot<T>> = Recursive< export type SelectiveNonNullable<T, P extends PathDot<T>> = Recursive<