Skip to content

Commit b8b626a

Browse files
committed
chore(eslint): add esling stylistic plugin
After an update of `nuxt` the `nuxt eslint module` did not work any more.
1 parent 16bbdc5 commit b8b626a

File tree

14 files changed

+851
-788
lines changed

14 files changed

+851
-788
lines changed

frontend/components/bc/BcColor.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<script setup lang="ts">
2-
export type Color =
3-
| 'gray'
4-
| 'green'
5-
| 'red'
6-
| 'yellow'
2+
export type Color
3+
= | 'gray'
4+
| 'green'
5+
| 'red'
6+
| 'yellow'
77
88
defineProps<{
99
color?: Color,

frontend/components/bc/format/BcFormatAmount.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ type FormatAmountOptions = (
1919
sourceCurrency?: never,
2020
value?: never,
2121
}
22-
|
23-
{
22+
| {
2423
currencyItems?: never,
2524
sourceCurrency?: 'clCurrency' | 'elCurrency' | CurrencyCode,
2625
value: `${number}` | string,

frontend/components/bc/icon/BcIcon.vue

Lines changed: 79 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -2,88 +2,88 @@
22
import { LazyBcRotate } from '#components'
33
import type { Rotation } from '~/components/BcRotate.vue'
44
5-
export type Icon =
6-
| 'alarm-snooze'
7-
| 'arrow-down'
8-
| 'arrow-left-right'
9-
| 'arrow-up'
10-
| 'arrow-upright-from-square'
11-
| 'bars'
12-
| 'bolt'
13-
| 'chart-column'
14-
| 'chart-line-up'
15-
| 'check'
16-
| 'chevron-down'
17-
| 'chevron-left'
18-
| 'chevron-right'
19-
| 'chevrons-left'
20-
| 'circle-info'
21-
| 'circle-plus'
22-
| 'circle-user'
23-
| 'clock'
24-
| 'copy'
25-
| 'cube'
26-
| 'cubes'
27-
| 'desktop'
28-
| 'edit'
29-
| 'eye'
30-
| 'file-signature'
31-
| 'fire'
32-
| 'flag'
33-
| 'gauge-simple-max'
34-
| 'gear'
35-
| 'gem'
36-
| 'globe'
37-
| 'hand-holding-hand'
38-
| 'hashtag'
39-
| 'magnifying-glass'
40-
| 'minus'
41-
| 'money-bill'
42-
| 'monitor-wave-form'
43-
| 'moon'
44-
| 'network-wired'
45-
| 'paper-plane'
46-
| 'people-group'
47-
| 'percent'
48-
| 'plus'
49-
| 'power-off'
50-
| 'right-from-bracket'
51-
| 'rocket'
52-
| 'rotate'
53-
| 'share'
54-
| 'sigma'
55-
| 'snooze'
56-
| 'sun'
57-
| 'sync'
58-
| 'table'
59-
| 'trash'
60-
| 'user'
61-
| 'user-slash'
62-
| 'wallet'
63-
| 'xmark'
64-
| IconCrypto
65-
| IconCustom
66-
| IconFlag
5+
export type Icon
6+
= | 'alarm-snooze'
7+
| 'arrow-down'
8+
| 'arrow-left-right'
9+
| 'arrow-up'
10+
| 'arrow-upright-from-square'
11+
| 'bars'
12+
| 'bolt'
13+
| 'chart-column'
14+
| 'chart-line-up'
15+
| 'check'
16+
| 'chevron-down'
17+
| 'chevron-left'
18+
| 'chevron-right'
19+
| 'chevrons-left'
20+
| 'circle-info'
21+
| 'circle-plus'
22+
| 'circle-user'
23+
| 'clock'
24+
| 'copy'
25+
| 'cube'
26+
| 'cubes'
27+
| 'desktop'
28+
| 'edit'
29+
| 'eye'
30+
| 'file-signature'
31+
| 'fire'
32+
| 'flag'
33+
| 'gauge-simple-max'
34+
| 'gear'
35+
| 'gem'
36+
| 'globe'
37+
| 'hand-holding-hand'
38+
| 'hashtag'
39+
| 'magnifying-glass'
40+
| 'minus'
41+
| 'money-bill'
42+
| 'monitor-wave-form'
43+
| 'moon'
44+
| 'network-wired'
45+
| 'paper-plane'
46+
| 'people-group'
47+
| 'percent'
48+
| 'plus'
49+
| 'power-off'
50+
| 'right-from-bracket'
51+
| 'rocket'
52+
| 'rotate'
53+
| 'share'
54+
| 'sigma'
55+
| 'snooze'
56+
| 'sun'
57+
| 'sync'
58+
| 'table'
59+
| 'trash'
60+
| 'user'
61+
| 'user-slash'
62+
| 'wallet'
63+
| 'xmark'
64+
| IconCrypto
65+
| IconCustom
66+
| IconFlag
6767
68-
type IconCrypto =
69-
| 'crypto-eth'
70-
| 'crypto-gno'
71-
| 'crypto-xdai'
68+
type IconCrypto
69+
= | 'crypto-eth'
70+
| 'crypto-gno'
71+
| 'crypto-xdai'
7272
73-
type IconCustom =
74-
| 'attestaion-head'
75-
| 'attestaion-source'
76-
| 'attestaion-target'
77-
| 'circle-power-off'
73+
type IconCustom
74+
= | 'attestaion-head'
75+
| 'attestaion-source'
76+
| 'attestaion-target'
77+
| 'circle-power-off'
7878
79-
type IconFlag =
80-
| 'flag-au'
81-
| 'flag-ca'
82-
| 'flag-cn'
83-
| 'flag-eu'
84-
| 'flag-gb'
85-
| 'flag-jp'
86-
| 'flag-us'
79+
type IconFlag
80+
= | 'flag-au'
81+
| 'flag-ca'
82+
| 'flag-cn'
83+
| 'flag-eu'
84+
| 'flag-gb'
85+
| 'flag-jp'
86+
| 'flag-us'
8787
8888
const {
8989
rotation,

frontend/components/bc/input/BcInputNumber.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ const {
88
{
99
ariaLabel: string,
1010
label?: never,
11-
} |
12-
{
11+
}
12+
| {
1313
ariaLabel?: never,
1414
label: string,
1515
}

frontend/components/dashboard/validator/subset/DashboardValidatorSubsetList.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ const v1Domain = useV1Domain()
7777
function createDutyLinksData(
7878
dutyObjects?: number[],
7979
): {
80-
label: string,
81-
to?: string,
82-
}[] {
80+
label: string,
81+
to?: string,
82+
}[] {
8383
if (!dutyObjects) {
8484
return []
8585
}

frontend/composables/useTranslation.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ export const useTranslation = () => {
55
// https://vue-i18n.intlify.dev/guide/advanced/typescript.html#resource-keys-completion-supporting
66
return { ...useI18n<{ message: MessageSchema }>({ useScope: 'global' }) }
77
}
8-
export type TranslationInput =
9-
| TranslationKey
10-
| TranslationWithMessageInterpolation
8+
export type TranslationInput
9+
= | TranslationKey
10+
| TranslationWithMessageInterpolation
1111

1212
export type TranslationKey = GetObjectPaths<MessageSchema>
1313

@@ -21,8 +21,8 @@ export type TranslationKey = GetObjectPaths<MessageSchema>
2121
*
2222
* @see https://vue-i18n.intlify.dev/api/injection.html#component-injections
2323
*/
24-
type TranslationWithMessageInterpolation =
25-
| {
24+
type TranslationWithMessageInterpolation
25+
= | {
2626
interpolation: number,
2727
key: TranslationKey,
2828
}

frontend/eslint.config.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@ import perfectionist from 'eslint-plugin-perfectionist'
44
import eslintPluginJsonc from 'eslint-plugin-jsonc'
55

66
import withNuxt from './.nuxt/eslint.config.mjs'
7+
import stylistic from '@stylistic/eslint-plugin'
78

89
export default withNuxt({
10+
plugins: {
11+
'@stylistic': stylistic,
12+
},
913
rules: {
1014
'@stylistic/array-bracket-newline': [
1115
'error',

0 commit comments

Comments
 (0)