chore: fix util lint issues
This commit is contained in:
parent
75b00bec3d
commit
e7f940daa1
4
apps/frontend/.prettierrc
Normal file
4
apps/frontend/.prettierrc
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"endOfLine": "auto",
|
||||
"plugins": ["prettier-plugin-tailwindcss"]
|
||||
}
|
||||
@ -1,12 +1,12 @@
|
||||
import eslint from '@eslint/js'
|
||||
import tseslint from 'typescript-eslint'
|
||||
import prettierEslint from 'eslint-plugin-prettier/recommended'
|
||||
import simpleImportSort from 'eslint-plugin-simple-import-sort'
|
||||
|
||||
export default tseslint.config(
|
||||
eslint.configs.recommended,
|
||||
tseslint.configs.recommendedTypeChecked,
|
||||
prettierEslint,
|
||||
...common,
|
||||
{
|
||||
languageOptions: {
|
||||
parserOptions: {
|
||||
@ -17,24 +17,4 @@ export default tseslint.config(
|
||||
{
|
||||
ignores: ['node_modules/', 'dist/', 'build/'],
|
||||
},
|
||||
{
|
||||
plugins: {
|
||||
'simple-import-sort': simpleImportSort,
|
||||
},
|
||||
rules: {
|
||||
'simple-import-sort/imports': 'error',
|
||||
'simple-import-sort/exports': 'error',
|
||||
},
|
||||
},
|
||||
{
|
||||
rules: {
|
||||
'@typescript-eslint/no-type-alias': [
|
||||
'error',
|
||||
{
|
||||
allowGenerics: 'always',
|
||||
},
|
||||
],
|
||||
'@typescript-eslint/ban-ts-comment': 'off',
|
||||
},
|
||||
},
|
||||
)
|
||||
|
||||
20
packages/tooling-config/eslint/common.mjs
Normal file
20
packages/tooling-config/eslint/common.mjs
Normal file
@ -0,0 +1,20 @@
|
||||
import simpleImportSort from 'eslint-plugin-simple-import-sort'
|
||||
|
||||
export default [
|
||||
{
|
||||
plugins: {
|
||||
'simple-import-sort': simpleImportSort,
|
||||
},
|
||||
rules: {
|
||||
'simple-import-sort/imports': 'error',
|
||||
'simple-import-sort/exports': 'error',
|
||||
},
|
||||
},
|
||||
{
|
||||
rules: {
|
||||
'@typescript-eslint/no-type-alias': 'off',
|
||||
'@typescript-eslint/ban-ts-comment': 'off',
|
||||
'@typescript-eslint/prefer-literal-enum-member': 'off',
|
||||
},
|
||||
},
|
||||
]
|
||||
@ -1,9 +1,10 @@
|
||||
import { createConfigForNuxt } from '@nuxt/eslint-config/flat'
|
||||
import { fixupPluginRules } from '@eslint/compat'
|
||||
import turboPlugin from 'eslint-plugin-turbo'
|
||||
import simpleImportSort from 'eslint-plugin-simple-import-sort'
|
||||
import common from './common.mjs'
|
||||
|
||||
export const configurationNuxtToAppend = [
|
||||
...common,
|
||||
{
|
||||
name: 'turbo',
|
||||
plugins: {
|
||||
@ -25,20 +26,6 @@ export const configurationNuxtToAppend = [
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
plugins: {
|
||||
'simple-import-sort': simpleImportSort,
|
||||
},
|
||||
rules: {
|
||||
'simple-import-sort/imports': 'error',
|
||||
'simple-import-sort/exports': 'error',
|
||||
},
|
||||
},
|
||||
{
|
||||
rules: {
|
||||
'@typescript-eslint/ban-ts-comment': 'off',
|
||||
},
|
||||
},
|
||||
]
|
||||
|
||||
export default createConfigForNuxt().append(configurationNuxtToAppend)
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-nocheck
|
||||
|
||||
export const getCurrency = (userCountry) => {
|
||||
|
||||
@ -1,11 +1,10 @@
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-nocheck
|
||||
|
||||
import { insertNewlineAndIndent } from '@codemirror/commands'
|
||||
import { deleteMarkupBackward } from '@codemirror/lang-markdown'
|
||||
import { getIndentation, indentString, syntaxTree } from '@codemirror/language'
|
||||
import { type EditorState, type Transaction } from '@codemirror/state'
|
||||
import { type EditorView, type Command, type KeyBinding } from '@codemirror/view'
|
||||
import type { EditorState, Transaction } from '@codemirror/state'
|
||||
import type { Command, EditorView, KeyBinding } from '@codemirror/view'
|
||||
|
||||
const toggleBold: Command = ({ state, dispatch }) => {
|
||||
return toggleAround(state, dispatch, '**', '**')
|
||||
|
||||
@ -1,20 +1,21 @@
|
||||
import hljs from 'highlight.js/lib/core'
|
||||
// Scripting
|
||||
import javascript from 'highlight.js/lib/languages/javascript'
|
||||
import lua from 'highlight.js/lib/languages/lua'
|
||||
import python from 'highlight.js/lib/languages/python'
|
||||
// Coding
|
||||
import groovy from 'highlight.js/lib/languages/groovy'
|
||||
import java from 'highlight.js/lib/languages/java'
|
||||
import kotlin from 'highlight.js/lib/languages/kotlin'
|
||||
import scala from 'highlight.js/lib/languages/scala'
|
||||
// Configs
|
||||
import gradle from 'highlight.js/lib/languages/gradle'
|
||||
// Coding
|
||||
import groovy from 'highlight.js/lib/languages/groovy'
|
||||
import ini from 'highlight.js/lib/languages/ini'
|
||||
import java from 'highlight.js/lib/languages/java'
|
||||
// Scripting
|
||||
import javascript from 'highlight.js/lib/languages/javascript'
|
||||
import json from 'highlight.js/lib/languages/json'
|
||||
import kotlin from 'highlight.js/lib/languages/kotlin'
|
||||
import lua from 'highlight.js/lib/languages/lua'
|
||||
import properties from 'highlight.js/lib/languages/properties'
|
||||
import python from 'highlight.js/lib/languages/python'
|
||||
import scala from 'highlight.js/lib/languages/scala'
|
||||
import xml from 'highlight.js/lib/languages/xml'
|
||||
import yaml from 'highlight.js/lib/languages/yaml'
|
||||
|
||||
import { configuredXss, md } from './parse'
|
||||
|
||||
/* REGISTRATION */
|
||||
|
||||
@ -4,8 +4,8 @@ export * from './highlight'
|
||||
export * from './licenses'
|
||||
export * from './parse'
|
||||
export * from './projects'
|
||||
export * from './servers'
|
||||
export * from './three/skin-rendering'
|
||||
export * from './types'
|
||||
export * from './users'
|
||||
export * from './utils'
|
||||
export * from './servers'
|
||||
export * from './three/skin-rendering'
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
export * from './modrinth-servers-multi-error'
|
||||
export * from './modrinth-servers-fetch-error'
|
||||
export * from './modrinth-server-error'
|
||||
export * from './modrinth-servers-fetch-error'
|
||||
export * from './modrinth-servers-multi-error'
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import { FetchError } from 'ofetch'
|
||||
import { V1ErrorInfo } from '../types'
|
||||
|
||||
import type { V1ErrorInfo } from '../types'
|
||||
|
||||
export class ModrinthServerError extends Error {
|
||||
constructor(
|
||||
|
||||
@ -17,11 +17,9 @@ export class ModrinthServersMultiError extends Error {
|
||||
}
|
||||
|
||||
private buildErrorMessage(): string {
|
||||
return (
|
||||
Array.from(this.errors.entries())
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
return Array.from(this.errors.entries())
|
||||
|
||||
.map(([_module, error]) => error.message)
|
||||
.join('\n')
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { ModrinthServerError } from '../errors'
|
||||
import type { ModrinthServerError } from '../errors'
|
||||
|
||||
export interface V1ErrorInfo {
|
||||
context?: string
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import type { WSBackupTask, WSBackupState } from './websocket'
|
||||
import type { WSBackupState, WSBackupTask } from './websocket'
|
||||
|
||||
export interface Backup {
|
||||
id: string
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import type { Project } from '../../types'
|
||||
import { Allocation } from './server'
|
||||
import { ServerBackup } from './backup'
|
||||
import { Mod } from './content'
|
||||
import type { ServerBackup } from './backup'
|
||||
import type { Mod } from './content'
|
||||
import type { Allocation } from './server'
|
||||
|
||||
export type ServerNotice = {
|
||||
id: number
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { FSQueuedOp, FilesystemOp } from './websocket'
|
||||
import { JWTAuth } from './api'
|
||||
import type { JWTAuth } from './api'
|
||||
import type { FilesystemOp, FSQueuedOp } from './websocket'
|
||||
|
||||
export interface DirectoryItem {
|
||||
name: string
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
export * from './api'
|
||||
export * from './content'
|
||||
export * from './server'
|
||||
export * from './backup'
|
||||
export * from './filesystem'
|
||||
export * from './websocket'
|
||||
export * from './stats'
|
||||
export * from './common'
|
||||
export * from './content'
|
||||
export * from './filesystem'
|
||||
export * from './server'
|
||||
export * from './stats'
|
||||
export * from './websocket'
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { Stats } from './stats'
|
||||
import type { ServerState } from './server'
|
||||
import type { Stats } from './stats'
|
||||
|
||||
export interface WSAuth {
|
||||
url: string
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
// noinspection JSUnusedGlobalSymbols
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
|
||||
// @ts-nocheck
|
||||
|
||||
import dayjs from 'dayjs'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user