all-rules-with-exclusions

This commit is contained in:
Untone 2024-02-05 18:49:08 +03:00
parent 361c916687
commit 075072cd36
10 changed files with 50 additions and 17 deletions

View File

@ -32,13 +32,15 @@
"ignore": ["*.scss", "*.md", ".DS_Store", "*.svg"],
"enabled": true,
"rules": {
"recommended": true,
"all": true,
"complexity": {
"all": true,
"noForEach": "off",
"useOptionalChain": "warn",
"useLiteralKeys": "off"
},
"correctness": {
"useHookAtTopLevel": "off"
},
"a11y": {
"useHeadingContent": "off",
"useKeyWithClickEvents": "off",
@ -52,13 +54,11 @@
"noSvgWithoutTitle": "off"
},
"nursery": {
"all": true,
"useImportRestrictions": "off",
"useImportType": "off",
"useFilenamingConvention": "off"
},
"style": {
"all": true,
"useBlockStatements": "off",
"noImplicitBoolean": "off",
"useNamingConvention": "off",

View File

@ -1,4 +1,3 @@
// biome-ignore lint/nursery/noNodejsModules: TODO: maybe cause problems
import { Buffer } from 'node:buffer'
import { clsx } from 'clsx'

View File

@ -28,7 +28,6 @@ const embedData = (data) => {
const result: { src: string; width?: string; height?: string } = { src: '' }
// biome-ignore lint/nursery/useForOf: <explanation>
for (let i = 0; i < attributes.length; i++) {
const attribute = attributes[i]
result[attribute.name] = attribute.value

View File

@ -51,8 +51,9 @@ export const Panel = (props: Props) => {
publishShout(form)
}
const html = useEditorHTML(() => editorRef.current())
const handleFixTypographyClick = () => {
const html = useEditorHTML(() => editorRef.current())
editorRef.current().commands.setContent(typograf.execute(html()))
setIsTypographyFixed(true)
}

View File

@ -135,7 +135,7 @@ export const Header = (props: Props) => {
clearTimeout(timer)
}
const hideSubnavigation = (event, time = 500) => {
const hideSubnavigation = (_event, time = 500) => {
timer = setTimeout(() => {
toggleSubnavigation(false)
}, time)

View File

@ -22,7 +22,7 @@ export const Snackbar = () => {
<Transition
enterClass={styles.enter}
exitToClass={styles.exitTo}
onExit={(el, done) => setTimeout(() => done(), 300)}
onExit={(_el, done) => setTimeout(() => done(), 300)}
>
<Show when={snackbarMessage()}>
<div class={styles.content}>

View File

@ -16,7 +16,7 @@ type Props = {
}
export const DropdownSelect = (props: Props) => {
const [selected, setSelected] = createSignal<FilterItem>(props.selectItems[0])
const [selected, _setSelected] = createSignal<FilterItem>(props.selectItems[0])
const [isDropDownVisible, setIsDropDownVisible] = createSignal(false)
const containerRef: { current: HTMLElement } = {

View File

@ -62,7 +62,7 @@ export const InviteMembers = (props: Props) => {
return authors?.slice(start, end)
}
const [pages, infiniteScrollLoader, { end }] = createInfiniteScroll(fetcher)
const [pages, _infiniteScrollLoader, { end }] = createInfiniteScroll(fetcher)
createEffect(
on(

View File

@ -1,6 +1,43 @@
import 'solid-js'
import { AutoplayOptions, SwiperOptions } from 'swiper'
import { SwiperSlideProps } from 'swiper/react'
import { JSX, JSXElement, Ref } from 'solid-js'
import { AutoplayOptions, SlideData, Swiper, SwiperOptions } from 'swiper'
type SwiperSlideProps = {
/**
* Slide tag
*
* @default 'div'
*/
tag?: string
/**
* Enables additional wrapper required for zoom mode
*
* @default false
*/
zoom?: boolean
/**
* Adds lazy preloader to the slide
*
* @default false
*/
lazy?: boolean
/**
* Slide's index in slides array/collection
*
* @default false
*/
virtualIndex?: number
/**
* Slide's child element or render function
*
* @default undefined
*/
children?: JSX.Element | ((slideData: SlideData) => JSX.Element)
}
type Kebab<T extends string, A extends string = ''> = T extends `${infer F}${infer R}`
? Kebab<R, `${A}${F extends Lowercase<F> ? '' : '-'}${Lowercase<F>}`>
@ -27,8 +64,6 @@ type KebabObjectKeys<T> = {
type SwiperRef = HTMLElement & { swiper: Swiper; initialize: () => void }
declare module 'solid-js' {
// biome-ignore lint/style/useNamingConvention: JSX is ok
// biome-ignore lint/style/noNamespace: TODO: explain why
namespace JSX {
interface IntrinsicElements {
'swiper-container': SwiperContainerAttributes
@ -36,7 +71,7 @@ declare module 'solid-js' {
}
interface SwiperContainerAttributes extends KebabObjectKeys<SwiperOptions> {
ref?: RefObject<SwiperRef>
ref?: Ref<SwiperRef>
children?: JSX.Element
onSlideChange?: () => void
onBeforeSlideChangeStart?: () => void

View File

@ -70,7 +70,6 @@ export type SessionContextType = {
authorizer: () => Authorizer
}
// biome-ignore lint/nursery/noEmptyBlockStatements: noop
const noop = () => {}
const SessionContext = createContext<SessionContextType>()