Skip to content

Commit 1a99771

Browse files
authored
ci: enable more oxlint rules (#1599)
1 parent 2d37279 commit 1a99771

25 files changed

+43
-24
lines changed

Diff for: .oxlintrc.json

+21-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,33 @@
11
{
22
"plugins": ["import", "typescript", "unicorn", "promise"],
33
"rules": {
4-
"eslint/no-unused-vars": "off",
54
"no-console": "error",
5+
"eslint/no-unused-vars": "off",
6+
"unicorn/prefer-array-some": "error",
67
"unicorn/no-useless-promise-resolve-reject": "error",
8+
"unicorn/no-unnecessary-await": "error",
9+
"unicorn/no-useless-fallback-in-spread": "error",
10+
"unicorn/filename-case": [
11+
"error",
12+
{
13+
"case": "kebabCase"
14+
}
15+
],
16+
"unicorn/prefer-date-now": "error",
17+
"unicorn/prefer-blob-reading-methods": "error",
18+
"unicorn/no-typeof-undefined": "error",
19+
"unicorn/no-new-array": "error",
720
"import/no-cycle": [
821
"error",
922
{
1023
"ignoreTypes": true
1124
}
12-
]
25+
],
26+
"import/sort-imports": "error",
27+
"import/no-duplicates": "error",
28+
"import/no-import-assign": "error",
29+
"import/no-self-import": "error",
30+
"typescript/consistent-type-imports": "error",
31+
"typescript/no-import-type-side-effects": "error"
1332
}
1433
}

Diff for: e2e/tests/misc/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Page } from '@playwright/test'
1+
import type { Page } from '@playwright/test'
22
import fs from 'node:fs/promises'
33
import path from 'node:path'
44

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

Diff for: packages/crepe/src/icons/index.ts

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
export * from './alignCenter'
2-
export * from './alignLeft'
3-
export * from './alignRight'
1+
export * from './align-center'
2+
export * from './align-left'
3+
export * from './align-right'
44
export * from './bold'
55
export * from './bullet'
6-
export * from './bulletList'
6+
export * from './bullet-list'
77
export * from './caption'
8-
export * from './checkBoxChecked'
9-
export * from './checkBoxUnchecked'
10-
export * from './chevronDown'
8+
export * from './check-box-checked'
9+
export * from './check-box-unchecked'
10+
export * from './chevron-down'
1111
export * from './clear'
1212
export * from './code'
1313
export * from './confirm'
1414
export * from './copy'
1515
export * from './divider'
16-
export * from './dragHandle'
16+
export * from './drag-handle'
1717
export * from './edit'
1818
export * from './h1'
1919
export * from './h2'
@@ -25,12 +25,12 @@ export * from './image'
2525
export * from './italic'
2626
export * from './link'
2727
export * from './menu'
28-
export * from './orderedList'
28+
export * from './ordered-list'
2929
export * from './plus'
3030
export * from './quote'
3131
export * from './remove'
3232
export * from './search'
3333
export * from './strikethrough'
3434
export * from './table'
3535
export * from './text'
36-
export * from './todoList'
36+
export * from './todo-list'
File renamed without changes.
File renamed without changes.

Diff for: packages/integrations/react/src/Editor.tsx renamed to packages/integrations/react/src/editor.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { FC, ReactNode } from 'react'
33
import React, { useMemo, useRef, useState } from 'react'
44

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

88
export const Milkdown: FC = () => {
99
const domRef = useGetEditor()

Diff for: packages/integrations/react/src/index.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export * from './Editor'
1+
export * from './editor'
22
export * from './types'
3-
export * from './useEditor'
4-
export * from './useInstance'
3+
export * from './use-editor'
4+
export * from './use-instance'

Diff for: packages/integrations/react/src/useEditor.ts renamed to packages/integrations/react/src/use-editor.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { DependencyList } from 'react'
22
import { useCallback, useContext, useLayoutEffect } from 'react'
33

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

77
export function useEditor(
88
getEditor: GetEditor,

Diff for: packages/integrations/react/src/useInstance.ts renamed to packages/integrations/react/src/use-instance.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { Editor } from '@milkdown/core'
22
import { useCallback, useContext } from 'react'
3-
import { editorInfoContext } from './useGetEditor'
3+
import { editorInfoContext } from './use-get-editor'
44

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

Diff for: packages/integrations/vue/src/Editor.tsx renamed to packages/integrations/vue/src/editor.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { Ref } from 'vue'
33
import { Fragment, defineComponent, h, provide, ref } from 'vue'
44

55
import type { GetEditor } from './types'
6-
import { useGetEditor } from './useGetEditor'
6+
import { useGetEditor } from './use-get-editor'
77
import { editorInfoCtxKey } from './consts'
88

99
h

Diff for: packages/integrations/vue/src/index.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export * from './Editor'
1+
export * from './editor'
22
export * from './types'
3-
export * from './useEditor'
4-
export * from './useInstance'
3+
export * from './use-editor'
4+
export * from './use-instance'

Diff for: packages/utils/src/composable/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export * from './$command'
2-
export * from './$inputRule'
2+
export * from './$input-rule'
33
export * from './$mark'
44
export * from './$node'
55
export * from './$prose'

0 commit comments

Comments
 (0)