mirror of
https://github.com/element-plus/element-plus.git
synced 2025-04-06 16:30:35 +08:00
chore(eslint-config): add newline-after-import
rules (#20309)
chore: add `newline-after-import` rules
This commit is contained in:
parent
4ef26b935c
commit
1084071fcf
@ -121,7 +121,6 @@ module.exports = defineConfig({
|
||||
],
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
files: ['**/*.md/*.js', '**/*.md/*.ts'],
|
||||
rules: {
|
||||
@ -130,6 +129,12 @@ module.exports = defineConfig({
|
||||
'@typescript-eslint/no-unused-vars': 'off',
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['!docs/**/*.{js,ts,vue}'],
|
||||
rules: {
|
||||
'import/newline-after-import': ['error', { count: 1 }],
|
||||
},
|
||||
},
|
||||
],
|
||||
rules: {
|
||||
// js/ts
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { withInstall } from '@element-plus/utils'
|
||||
import Affix from './src/affix.vue'
|
||||
import type { SFCWithInstall } from '@element-plus/utils'
|
||||
|
||||
export const ElAffix: SFCWithInstall<typeof Affix> = withInstall(Affix)
|
||||
export default ElAffix
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
// @ts-nocheck
|
||||
import { defineComponent, h } from 'vue'
|
||||
import { useNamespace } from '@element-plus/hooks'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'NodeContent',
|
||||
setup() {
|
||||
|
@ -75,6 +75,7 @@ import { DArrowLeft, DArrowRight, MoreFilled } from '@element-plus/icons-vue'
|
||||
import { useLocale, useNamespace } from '@element-plus/hooks'
|
||||
import { CHANGE_EVENT } from '@element-plus/constants'
|
||||
import { paginationPagerProps } from './pager'
|
||||
|
||||
defineOptions({
|
||||
name: 'ElPaginationPager',
|
||||
})
|
||||
|
@ -8,6 +8,7 @@ import { radioGroupKey } from './constants'
|
||||
import type { RadioButtonProps } from './radio-button'
|
||||
import type { SetupContext } from 'vue'
|
||||
import type { RadioEmits, RadioProps } from './radio'
|
||||
|
||||
export const useRadio = (
|
||||
props: RadioProps | RadioButtonProps,
|
||||
emit?: SetupContext<RadioEmits>['emit']
|
||||
|
@ -13,6 +13,7 @@ import {
|
||||
ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY,
|
||||
} from '../src/tokens'
|
||||
import ElRovingFocusItem from '../src/roving-focus-item.vue'
|
||||
|
||||
const AXIOM = 'rem is the best girl'
|
||||
const focusItemKls = 'item-kls'
|
||||
|
||||
|
@ -7,6 +7,7 @@ import type {
|
||||
} from 'vue'
|
||||
import type { ISelectProps } from './select'
|
||||
import type { optionProps } from './option'
|
||||
|
||||
export interface SelectGroupContext {
|
||||
disabled: boolean
|
||||
}
|
||||
|
@ -8,6 +8,7 @@ import type { Store } from '../store'
|
||||
|
||||
import type { PropType } from 'vue'
|
||||
import type { DefaultRow, Sort, SummaryMethod } from '../table/defaults'
|
||||
|
||||
export interface TableFooter<T> {
|
||||
fixed: string
|
||||
store: Store<T>
|
||||
|
@ -21,6 +21,7 @@ import useUtils from './utils-helper'
|
||||
import type { ComponentInternalInstance, PropType, Ref } from 'vue'
|
||||
import type { DefaultRow, Sort } from '../table/defaults'
|
||||
import type { Store } from '../store'
|
||||
|
||||
export interface TableHeader extends ComponentInternalInstance {
|
||||
state: {
|
||||
onColumnsChange
|
||||
|
@ -9,6 +9,7 @@ import type { TableColumnCtx } from './table-column/defaults'
|
||||
import type { TableHeader } from './table-header'
|
||||
import type { Table } from './table/defaults'
|
||||
import type { Store } from './store'
|
||||
|
||||
class TableLayout<T> {
|
||||
observers: TableHeader[]
|
||||
table: Table<T>
|
||||
|
@ -7,6 +7,7 @@ import Picker from './common/picker.vue'
|
||||
import TimePickPanel from './time-picker-com/panel-time-pick.vue'
|
||||
import TimeRangePanel from './time-picker-com/panel-time-range.vue'
|
||||
import { timePickerDefaultProps } from './common/props'
|
||||
|
||||
dayjs.extend(customParseFormat)
|
||||
|
||||
export default defineComponent({
|
||||
|
@ -3,6 +3,7 @@ import { isArray, isDate, isEmpty } from '@element-plus/utils'
|
||||
|
||||
import type { Dayjs } from 'dayjs'
|
||||
import type { DateOrDates, DayOrDays } from './common/props'
|
||||
|
||||
export type TimeList = [number | undefined, number, undefined | number]
|
||||
|
||||
export const buildTimeList = (value: number, bound: number): TimeList => {
|
||||
|
@ -6,6 +6,7 @@ import customParseFormat from 'dayjs/plugin/customParseFormat.js'
|
||||
import Select from '@element-plus/components/select'
|
||||
import { ElFormItem } from '@element-plus/components/form'
|
||||
import TimeSelect from '../src/time-select.vue'
|
||||
|
||||
dayjs.extend(customParseFormat)
|
||||
|
||||
const { Option } = Select
|
||||
|
@ -12,6 +12,7 @@ import { DynamicSizeList } from '..'
|
||||
import setupMock from './setup-mock'
|
||||
|
||||
import type { ListExposes } from '../src/types'
|
||||
|
||||
type ListRef = ListExposes
|
||||
|
||||
const onItemRendered = vi.fn()
|
||||
|
@ -16,6 +16,7 @@ import setupMock from './setup-mock'
|
||||
|
||||
import type { SpyInstance } from 'vitest'
|
||||
import type { ListExposes } from '../src/types'
|
||||
|
||||
type ListRef = ListExposes
|
||||
|
||||
const onItemRendered = vi.fn()
|
||||
|
@ -18,6 +18,7 @@ import { virtualizedScrollbarProps } from '../props'
|
||||
import { renderThumbStyle } from '../utils'
|
||||
|
||||
import type { CSSProperties } from 'vue'
|
||||
|
||||
interface ScrollState {
|
||||
isDragging: boolean
|
||||
traveled: number
|
||||
|
@ -8,6 +8,7 @@
|
||||
import { computed } from 'vue'
|
||||
import { visualHiddenProps } from './visual-hidden'
|
||||
import type { StyleValue } from 'vue'
|
||||
|
||||
const props = defineProps(visualHiddenProps)
|
||||
|
||||
defineOptions({
|
||||
|
@ -1,4 +1,5 @@
|
||||
import installer from './defaults'
|
||||
|
||||
export * from '@element-plus/components'
|
||||
export * from '@element-plus/constants'
|
||||
export * from '@element-plus/directives'
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { capitalize as toCapitalize } from '@vue/shared'
|
||||
|
||||
export {
|
||||
camelize,
|
||||
hyphenate,
|
||||
|
Loading…
x
Reference in New Issue
Block a user