Skip to content

Commit

Permalink
ci: enable more oxlint rules (#1599)
Browse files Browse the repository at this point in the history
  • Loading branch information
Saul-Mirone authored Dec 22, 2024
1 parent 2d37279 commit 1a99771
Show file tree
Hide file tree
Showing 25 changed files with 43 additions and 24 deletions.
23 changes: 21 additions & 2 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,33 @@
{
"plugins": ["import", "typescript", "unicorn", "promise"],
"rules": {
"eslint/no-unused-vars": "off",
"no-console": "error",
"eslint/no-unused-vars": "off",
"unicorn/prefer-array-some": "error",
"unicorn/no-useless-promise-resolve-reject": "error",
"unicorn/no-unnecessary-await": "error",
"unicorn/no-useless-fallback-in-spread": "error",
"unicorn/filename-case": [
"error",
{
"case": "kebabCase"
}
],
"unicorn/prefer-date-now": "error",
"unicorn/prefer-blob-reading-methods": "error",
"unicorn/no-typeof-undefined": "error",
"unicorn/no-new-array": "error",
"import/no-cycle": [
"error",
{
"ignoreTypes": true
}
]
],
"import/sort-imports": "error",
"import/no-duplicates": "error",
"import/no-import-assign": "error",
"import/no-self-import": "error",
"typescript/consistent-type-imports": "error",
"typescript/no-import-type-side-effects": "error"
}
}
2 changes: 1 addition & 1 deletion e2e/tests/misc/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Page } from '@playwright/test'
import type { Page } from '@playwright/test'
import fs from 'node:fs/promises'
import path from 'node:path'

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
20 changes: 10 additions & 10 deletions packages/crepe/src/icons/index.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
export * from './alignCenter'
export * from './alignLeft'
export * from './alignRight'
export * from './align-center'
export * from './align-left'
export * from './align-right'
export * from './bold'
export * from './bullet'
export * from './bulletList'
export * from './bullet-list'
export * from './caption'
export * from './checkBoxChecked'
export * from './checkBoxUnchecked'
export * from './chevronDown'
export * from './check-box-checked'
export * from './check-box-unchecked'
export * from './chevron-down'
export * from './clear'
export * from './code'
export * from './confirm'
export * from './copy'
export * from './divider'
export * from './dragHandle'
export * from './drag-handle'
export * from './edit'
export * from './h1'
export * from './h2'
Expand All @@ -25,12 +25,12 @@ export * from './image'
export * from './italic'
export * from './link'
export * from './menu'
export * from './orderedList'
export * from './ordered-list'
export * from './plus'
export * from './quote'
export * from './remove'
export * from './search'
export * from './strikethrough'
export * from './table'
export * from './text'
export * from './todoList'
export * from './todo-list'
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { FC, ReactNode } from 'react'
import React, { useMemo, useRef, useState } from 'react'

import type { EditorInfoCtx, GetEditor } from './types'
import { editorInfoContext, useGetEditor } from './useGetEditor'
import { editorInfoContext, useGetEditor } from './use-get-editor'

export const Milkdown: FC = () => {
const domRef = useGetEditor()
Expand Down
6 changes: 3 additions & 3 deletions packages/integrations/react/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export * from './Editor'
export * from './editor'
export * from './types'
export * from './useEditor'
export * from './useInstance'
export * from './use-editor'
export * from './use-instance'
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { DependencyList } from 'react'
import { useCallback, useContext, useLayoutEffect } from 'react'

import type { GetEditor, UseEditorReturn } from './types'
import { editorInfoContext } from './useGetEditor'
import { editorInfoContext } from './use-get-editor'

export function useEditor(
getEditor: GetEditor,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Editor } from '@milkdown/core'
import { useCallback, useContext } from 'react'
import { editorInfoContext } from './useGetEditor'
import { editorInfoContext } from './use-get-editor'

export type Instance = [true, () => undefined] | [false, () => Editor]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { Ref } from 'vue'
import { Fragment, defineComponent, h, provide, ref } from 'vue'

import type { GetEditor } from './types'
import { useGetEditor } from './useGetEditor'
import { useGetEditor } from './use-get-editor'
import { editorInfoCtxKey } from './consts'

h
Expand Down
6 changes: 3 additions & 3 deletions packages/integrations/vue/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export * from './Editor'
export * from './editor'
export * from './types'
export * from './useEditor'
export * from './useInstance'
export * from './use-editor'
export * from './use-instance'
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion packages/utils/src/composable/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export * from './$command'
export * from './$inputRule'
export * from './$input-rule'
export * from './$mark'
export * from './$node'
export * from './$prose'
Expand Down

0 comments on commit 1a99771

Please sign in to comment.