fds-vue-core 6.2.2 → 6.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -3
- package/README.md +0 -23
- package/components.d.ts +1 -0
- package/dist/fds-vue-core.cjs.js +91 -59
- package/dist/fds-vue-core.cjs.js.map +1 -1
- package/dist/fds-vue-core.css +1 -1
- package/dist/fds-vue-core.es.js +91 -59
- package/dist/fds-vue-core.es.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/package.json +40 -75
- package/src/assets/icons.ts +1 -0
- package/src/components/Table/FdsTableHead/FdsTableHead.stories.ts +4 -2
- package/src/components/Table/FdsTableHead/FdsTableHead.vue +7 -1
- package/src/components/Table/FdsTableHead/types.ts +1 -0
- package/src/index.ts +33 -0
- package/configs/eslint.config.base.js +0 -262
- package/configs/prettier.config.js +0 -13
- package/configs/tsconfig.base.json +0 -18
- package/configs/vscode-settings.json +0 -74
- package/scripts/cz/.cz-config.cjs +0 -22
- package/scripts/cz/cz-adapter.cjs +0 -112
- package/scripts/release.sh +0 -66
- package/scripts/sync-peers-from-dev.mjs +0 -29
- package/scripts/sync-vscode-settings.mjs +0 -44
- package/scripts/vuln-commit.mjs +0 -129
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fds-vue-core",
|
|
3
|
-
"version": "6.2.
|
|
3
|
+
"version": "6.2.4",
|
|
4
4
|
"description": "FDS Vue Core Component Library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -51,29 +51,6 @@
|
|
|
51
51
|
"engines": {
|
|
52
52
|
"node": "^20.19.0 || >=22.12.0"
|
|
53
53
|
},
|
|
54
|
-
"scripts": {
|
|
55
|
-
"serve": "vite",
|
|
56
|
-
"build": "vite build && npm run build:types && cp ./src/tokens.css ./dist/tokens.css && cp ./src/slot-styles.css ./dist/slot-styles.css && cp ./src/apply.css ./dist/apply.css && cp ./src/fonts.css ./dist/fonts.css && cp -r ./public/assets ./dist/assets && mkdir -p ./dist/assets/img/logos && cp -r ./src/assets/img/logos/* ./dist/assets/img/logos/",
|
|
57
|
-
"build:types": "vue-tsc --project tsconfig.build.json",
|
|
58
|
-
"preview": "vite preview",
|
|
59
|
-
"lint": "eslint . --fix",
|
|
60
|
-
"lint:ts": "vue-tsc --noEmit --project tsconfig.app.json && vue-tsc --noEmit --project tsconfig.node.json",
|
|
61
|
-
"lint:all": "pnpm lint && pnpm lint:ts",
|
|
62
|
-
"format": "prettier --write src/",
|
|
63
|
-
"prepublishOnly": "npm run build",
|
|
64
|
-
"storybook": "STORYBOOK=true storybook dev -p 6006",
|
|
65
|
-
"build-storybook": "STORYBOOK=true storybook build",
|
|
66
|
-
"sync:peers": "node scripts/sync-peers-from-dev.mjs",
|
|
67
|
-
"postinstall": "test -f scripts/sync-peers-from-dev.mjs && node scripts/sync-peers-from-dev.mjs || true",
|
|
68
|
-
"yalc:publish": "npm run build && yalc publish",
|
|
69
|
-
"yalc:push": "npm run build && yalc push",
|
|
70
|
-
"serve:playground": "pnpm --dir playground-consumer dev",
|
|
71
|
-
"create:release": "bash ./scripts/release.sh",
|
|
72
|
-
"commit": "git-cz",
|
|
73
|
-
"commit:vuln": "node scripts/vuln-commit.mjs",
|
|
74
|
-
"vuln-commit": "node scripts/vuln-commit.mjs",
|
|
75
|
-
"cz:config": "node -e \"console.log(require('./scripts/cz/.cz-config.cjs'))\""
|
|
76
|
-
},
|
|
77
54
|
"config": {
|
|
78
55
|
"commitizen": {
|
|
79
56
|
"path": "./scripts/cz/cz-adapter.cjs"
|
|
@@ -83,41 +60,30 @@
|
|
|
83
60
|
"vue": "^3.5.25"
|
|
84
61
|
},
|
|
85
62
|
"dependencies": {
|
|
86
|
-
"axios": "1.15.
|
|
87
|
-
"date-fns": "
|
|
88
|
-
"imask": "
|
|
89
|
-
"tailwindcss": "
|
|
63
|
+
"axios": "1.15.1",
|
|
64
|
+
"date-fns": "4.1.0",
|
|
65
|
+
"imask": "7.6.1",
|
|
66
|
+
"tailwindcss": "4.2.4"
|
|
90
67
|
},
|
|
91
68
|
"devDependencies": {
|
|
92
|
-
"@chromatic-com/storybook": "
|
|
93
|
-
"@storybook/addon-a11y": "
|
|
94
|
-
"@storybook/addon-docs": "
|
|
95
|
-
"@storybook/addon-vitest": "
|
|
96
|
-
"@storybook/vue3": "
|
|
97
|
-
"@storybook/vue3-vite": "
|
|
98
|
-
"@tailwindcss/vite": "
|
|
99
|
-
"@types/node": "
|
|
100
|
-
"@
|
|
101
|
-
"@
|
|
102
|
-
"
|
|
103
|
-
"
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
"
|
|
107
|
-
"
|
|
108
|
-
"
|
|
109
|
-
"
|
|
110
|
-
"eslint-plugin-vue": "~10.6.2",
|
|
111
|
-
"prettier": "3.7.4",
|
|
112
|
-
"storybook": "^10.2.12",
|
|
113
|
-
"typescript": "~5.9.3",
|
|
114
|
-
"vite": "^7.3.1",
|
|
115
|
-
"vite-plugin-dts": "^4.5.4",
|
|
116
|
-
"vite-plugin-vue-devtools": "^8.0.5",
|
|
117
|
-
"vitest": "^3.2.4",
|
|
118
|
-
"vue": "^3.5.25",
|
|
119
|
-
"vue-eslint-parser": "^10.4.0",
|
|
120
|
-
"vue-tsc": "^3.1.8"
|
|
69
|
+
"@chromatic-com/storybook": "5.0.1",
|
|
70
|
+
"@storybook/addon-a11y": "10.1.10",
|
|
71
|
+
"@storybook/addon-docs": "10.1.10",
|
|
72
|
+
"@storybook/addon-vitest": "10.2.12",
|
|
73
|
+
"@storybook/vue3": "10.2.12",
|
|
74
|
+
"@storybook/vue3-vite": "10.2.12",
|
|
75
|
+
"@tailwindcss/vite": "4.2.4",
|
|
76
|
+
"@types/node": "22.16.5",
|
|
77
|
+
"@vitejs/plugin-vue": "6.0.6",
|
|
78
|
+
"@vitest/browser": "3.2.4",
|
|
79
|
+
"eslint-plugin-storybook": "10.1.10",
|
|
80
|
+
"fg-devkit": "1.5.1",
|
|
81
|
+
"storybook": "10.2.12",
|
|
82
|
+
"vite": "7.3.2",
|
|
83
|
+
"vite-plugin-dts": "4.5.4",
|
|
84
|
+
"vite-plugin-vue-devtools": "8.1.1",
|
|
85
|
+
"vitest": "3.2.4",
|
|
86
|
+
"vue": "3.5.32"
|
|
121
87
|
},
|
|
122
88
|
"knip": {
|
|
123
89
|
"ignoreBinaries": [
|
|
@@ -127,24 +93,23 @@
|
|
|
127
93
|
"ignore": [
|
|
128
94
|
"env.d.ts",
|
|
129
95
|
"playground-consumer/**",
|
|
130
|
-
"scripts/sync-vscode-settings.mjs",
|
|
131
96
|
"src/apply.css"
|
|
132
97
|
]
|
|
133
98
|
},
|
|
134
|
-
"
|
|
135
|
-
"
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
"
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
}
|
|
99
|
+
"scripts": {
|
|
100
|
+
"serve": "vite",
|
|
101
|
+
"build": "vite build && pnpm build:types && cp ./src/tokens.css ./dist/tokens.css && cp ./src/slot-styles.css ./dist/slot-styles.css && cp ./src/apply.css ./dist/apply.css && cp ./src/fonts.css ./dist/fonts.css && cp -r ./public/assets ./dist/assets && mkdir -p ./dist/assets/img/logos && cp -r ./src/assets/img/logos/* ./dist/assets/img/logos/",
|
|
102
|
+
"build:types": "pnpm exec fgd typecheck --project tsconfig.build.json",
|
|
103
|
+
"preview": "vite preview",
|
|
104
|
+
"lint": "pnpm exec fgd lint --fix .",
|
|
105
|
+
"lint:ts": "pnpm exec fgd typecheck --noEmit -p tsconfig.app.json",
|
|
106
|
+
"lint:all": "pnpm lint && pnpm lint:ts",
|
|
107
|
+
"format": "prettier --write src/",
|
|
108
|
+
"storybook": "STORYBOOK=true storybook dev -p 6006",
|
|
109
|
+
"build-storybook": "STORYBOOK=true storybook build",
|
|
110
|
+
"yalc:publish": "pnpm build && yalc publish",
|
|
111
|
+
"yalc:push": "pnpm build && yalc push",
|
|
112
|
+
"serve:playground": "pnpm --dir playground-consumer dev",
|
|
113
|
+
"lint-check": "pnpm exec fgd lint ."
|
|
114
|
+
}
|
|
115
|
+
}
|
package/src/assets/icons.ts
CHANGED
|
@@ -9,11 +9,13 @@ const meta: Meta<typeof FdsTableHead> = {
|
|
|
9
9
|
heading: { control: { type: 'text' } },
|
|
10
10
|
align: { control: { type: 'radio' }, options: ['left', 'center', 'right'] },
|
|
11
11
|
icon: { control: { type: 'select' }, options: ['sort', 'ascending', 'descending'] },
|
|
12
|
+
isSortActive: { control: { type: 'boolean' } },
|
|
12
13
|
},
|
|
13
14
|
args: {
|
|
14
15
|
heading: 'Namn',
|
|
15
16
|
align: 'left',
|
|
16
17
|
icon: 'sort',
|
|
18
|
+
isSortActive: false,
|
|
17
19
|
},
|
|
18
20
|
}
|
|
19
21
|
|
|
@@ -63,7 +65,7 @@ export const Sortable: Story = {
|
|
|
63
65
|
}
|
|
64
66
|
|
|
65
67
|
export const SortedAsc: Story = {
|
|
66
|
-
args: { icon: 'ascending' },
|
|
68
|
+
args: { icon: 'ascending', isSortActive: true },
|
|
67
69
|
render: (args: Story['args']) => ({
|
|
68
70
|
components: { FdsTableHead },
|
|
69
71
|
setup: () => ({ args }),
|
|
@@ -85,7 +87,7 @@ export const SortedAsc: Story = {
|
|
|
85
87
|
}
|
|
86
88
|
|
|
87
89
|
export const SortedDesc: Story = {
|
|
88
|
-
args: { icon: 'descending' },
|
|
90
|
+
args: { icon: 'descending', isSortActive: true },
|
|
89
91
|
render: (args: Story['args']) => ({
|
|
90
92
|
components: { FdsTableHead },
|
|
91
93
|
setup: () => ({ args }),
|
|
@@ -9,6 +9,7 @@ const props = withDefaults(defineProps<FdsTableHeadProps>(), {
|
|
|
9
9
|
icon: undefined,
|
|
10
10
|
heading: undefined,
|
|
11
11
|
dataTestid: undefined,
|
|
12
|
+
isSortActive: false,
|
|
12
13
|
})
|
|
13
14
|
|
|
14
15
|
const hasSlot = useHasSlot()
|
|
@@ -21,6 +22,11 @@ const headerClasses = computed(() => [
|
|
|
21
22
|
'text-blue-600! hover:bg-blue_t-200 cursor-pointer focus-visible:outline-dashed focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-blue-500 active:bg-blue_t-300',
|
|
22
23
|
])
|
|
23
24
|
|
|
25
|
+
const iconClasses = computed(() => [
|
|
26
|
+
'fill-blue-500 ml-1 transition-opacity',
|
|
27
|
+
iconName.value && !props.isSortActive && 'opacity-20',
|
|
28
|
+
])
|
|
29
|
+
|
|
24
30
|
/* Sending an icon makes the th sortable */
|
|
25
31
|
const iconName = computed(() => props.icon)
|
|
26
32
|
|
|
@@ -56,7 +62,7 @@ defineSlots<{
|
|
|
56
62
|
>
|
|
57
63
|
<span v-if="hasSlot"><slot /></span>
|
|
58
64
|
<span v-else>{{ heading }}</span>
|
|
59
|
-
<FdsIcon :name="iconName" size="24px" class="
|
|
65
|
+
<FdsIcon :name="iconName" size="24px" :class="iconClasses" />
|
|
60
66
|
</button>
|
|
61
67
|
<div v-else :class="headerClasses">
|
|
62
68
|
<span v-if="hasSlot"><slot /></span>
|
package/src/index.ts
CHANGED
|
@@ -197,61 +197,94 @@ export type { FileSizeValidationResult, FileValidationOptions, FileValidationRes
|
|
|
197
197
|
|
|
198
198
|
// Button component types
|
|
199
199
|
export type { FdsButtonBaseProps } from './components/Buttons/ButtonBaseProps'
|
|
200
|
+
|
|
200
201
|
export type { FdsCopyButtonProps } from './components/Buttons/FdsButtonCopy/types'
|
|
202
|
+
|
|
201
203
|
export type { DownloadOptions, FdsButtonDownloadProps } from './components/Buttons/FdsButtonDownload/types'
|
|
204
|
+
|
|
202
205
|
export type { FdsIconButtonProps } from './components/Buttons/FdsButtonIcon/types'
|
|
203
206
|
|
|
204
207
|
// Button components that use FdsButtonBaseProps
|
|
205
208
|
import type { FdsButtonBaseProps } from './components/Buttons/ButtonBaseProps'
|
|
206
209
|
export type FdsButtonPrimaryProps = FdsButtonBaseProps
|
|
210
|
+
|
|
207
211
|
export type FdsButtonSecondaryProps = FdsButtonBaseProps
|
|
212
|
+
|
|
208
213
|
export type FdsButtonMinorProps = FdsButtonBaseProps
|
|
209
214
|
|
|
210
215
|
// Form component types
|
|
211
216
|
export type { FdsCheckboxProps } from './components/Form/FdsCheckbox/types'
|
|
217
|
+
|
|
212
218
|
export type { FdsInputProps } from './components/Form/FdsInput/types'
|
|
219
|
+
|
|
213
220
|
export type { FdsRadioProps } from './components/Form/FdsRadio/types'
|
|
221
|
+
|
|
214
222
|
export type { FdsSelectProps } from './components/Form/FdsSelect/types'
|
|
223
|
+
|
|
215
224
|
export type { FdsTextareaProps } from './components/Form/FdsTextarea/types'
|
|
216
225
|
|
|
217
226
|
// Table component types
|
|
218
227
|
export type { FdsTableProps } from './components/Table/FdsTable/types'
|
|
228
|
+
|
|
219
229
|
export type { FdsTableHeadProps } from './components/Table/FdsTableHead/types'
|
|
220
230
|
|
|
221
231
|
// Block component types
|
|
222
232
|
// Use relative paths so the generated declarations are resolvable from the published package
|
|
223
233
|
export type { FdsAlertBlockProps } from './components/Blocks/FdsBlockAlert/types'
|
|
234
|
+
|
|
224
235
|
export type { FdsContentBlockProps } from './components/Blocks/FdsBlockContent/types'
|
|
236
|
+
|
|
225
237
|
export type { FdsExpanderBlockProps } from './components/Blocks/FdsBlockExpander/types'
|
|
238
|
+
|
|
226
239
|
export type { FdsBlockInfoProps } from './components/Blocks/FdsBlockInfo/types'
|
|
240
|
+
|
|
227
241
|
export type { FdsInteractionBlockProps } from './components/Blocks/FdsBlockLink/types'
|
|
228
242
|
|
|
229
243
|
// Tab component types
|
|
230
244
|
export type { FdsTabsProps } from './components/Tabs/FdsTabs/types'
|
|
245
|
+
|
|
231
246
|
export type { FdsTabsItemProps } from './components/Tabs/FdsTabsItem/types'
|
|
232
247
|
|
|
233
248
|
// Typography component types
|
|
234
249
|
export type { FdsExitModalProps } from './components/FdsExitModal/types'
|
|
250
|
+
|
|
235
251
|
export type { FdsH1Props } from './components/Typography/FdsH1/types'
|
|
252
|
+
|
|
236
253
|
export type { FdsH2Props } from './components/Typography/FdsH2/types'
|
|
254
|
+
|
|
237
255
|
export type { FdsH3Props } from './components/Typography/FdsH3/types'
|
|
256
|
+
|
|
238
257
|
export type { FdsHrProps } from './components/Typography/FdsHr/types'
|
|
258
|
+
|
|
239
259
|
export type { FdsLabelProps } from './components/Typography/FdsLabel/types'
|
|
260
|
+
|
|
240
261
|
export type { FdsLeadProps } from './components/Typography/FdsLead/types'
|
|
262
|
+
|
|
241
263
|
export type { FdsListHeadingProps } from './components/Typography/FdsListHeading/types'
|
|
264
|
+
|
|
242
265
|
export type { FdsMetaProps } from './components/Typography/FdsMeta/types'
|
|
243
266
|
|
|
244
267
|
// Other component types
|
|
245
268
|
export type { FdsIconName, FdsIconProps } from './components/FdsIcon/types'
|
|
269
|
+
|
|
246
270
|
export type { FdsModalProps } from './components/FdsModal/types'
|
|
271
|
+
|
|
247
272
|
export type { FdsPaginationProps } from './components/FdsPagination/types'
|
|
273
|
+
|
|
248
274
|
export type { FdsPopoverProps } from './components/FdsPopover/types'
|
|
275
|
+
|
|
249
276
|
export type { FdsSearchSelectProps } from './components/FdsSearchSelect/types'
|
|
277
|
+
|
|
250
278
|
export type { FdsSearchSelectProProps } from './components/FdsSearchSelectPro/types'
|
|
279
|
+
|
|
251
280
|
export type { FdsSpinnerProps } from './components/FdsSpinner/types'
|
|
281
|
+
|
|
252
282
|
export type { FdsStickerProps } from './components/FdsSticker/types'
|
|
283
|
+
|
|
253
284
|
export type { FdsTruncatedTextProps } from './components/FdsTruncatedText/types'
|
|
285
|
+
|
|
254
286
|
export type { FdsWeekCalendarLoading, FdsWeekCalendarProps, WeekDateRange } from './components/FdsWeekCalendar/types'
|
|
287
|
+
|
|
255
288
|
export type { FdsWizardGoPayload, FdsWizardProps, FdsWizardRoute } from './components/FdsWizard/types'
|
|
256
289
|
|
|
257
290
|
// Composable types
|
|
@@ -1,262 +0,0 @@
|
|
|
1
|
-
// Base ESLint configuration for fds-vue-core
|
|
2
|
-
// Extend this in your project's eslint.config.js
|
|
3
|
-
|
|
4
|
-
import tseslint from '@typescript-eslint/eslint-plugin'
|
|
5
|
-
import tsparser from '@typescript-eslint/parser'
|
|
6
|
-
import pluginVitest from '@vitest/eslint-plugin'
|
|
7
|
-
import skipFormatting from '@vue/eslint-config-prettier/skip-formatting'
|
|
8
|
-
import pluginVue from 'eslint-plugin-vue'
|
|
9
|
-
import { globalIgnores } from 'eslint/config'
|
|
10
|
-
import vueParser from 'vue-eslint-parser'
|
|
11
|
-
|
|
12
|
-
export default function createBaseConfig(options = {}) {
|
|
13
|
-
const {
|
|
14
|
-
tsconfigRootDir = process.cwd(),
|
|
15
|
-
tsconfigFiles = ['./tsconfig.json'],
|
|
16
|
-
additionalIgnores = [],
|
|
17
|
-
extraNonTypeAwareFiles = [],
|
|
18
|
-
enablePrettier = false,
|
|
19
|
-
enableI18n = false,
|
|
20
|
-
i18nLocaleDir = './src/lang/*.json',
|
|
21
|
-
additionalRules = {},
|
|
22
|
-
additionalPlugins = {},
|
|
23
|
-
additionalSettings = {},
|
|
24
|
-
} = options
|
|
25
|
-
|
|
26
|
-
// Note: Optional plugins should be imported by the consuming project
|
|
27
|
-
// This config accepts them via additionalPlugins option
|
|
28
|
-
|
|
29
|
-
const defaultAdditionalIgnores = [
|
|
30
|
-
'test-results/**',
|
|
31
|
-
'playwright-report/**',
|
|
32
|
-
'blob-report/**',
|
|
33
|
-
'playwright/.cache/**',
|
|
34
|
-
'reports/**',
|
|
35
|
-
'**/fds-vue-core/configs/**',
|
|
36
|
-
]
|
|
37
|
-
|
|
38
|
-
const configs = [
|
|
39
|
-
// Non-type-aware config for config files (must come first)
|
|
40
|
-
{
|
|
41
|
-
name: 'fds-vue-core/config-files',
|
|
42
|
-
files: ['*.config.{ts,mts,js,mjs,cjs}', 'eslint.config.{js,ts}'],
|
|
43
|
-
languageOptions: {
|
|
44
|
-
parserOptions: {
|
|
45
|
-
project: null,
|
|
46
|
-
tsconfigRootDir,
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
name: 'fds-vue-core/base',
|
|
52
|
-
files: ['**/*.{ts,mts,tsx,vue}'],
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
name: 'fds-vue-core/vue-non-type-aware',
|
|
56
|
-
files: ['**/*.vue'],
|
|
57
|
-
languageOptions: {
|
|
58
|
-
parser: vueParser,
|
|
59
|
-
parserOptions: {
|
|
60
|
-
parser: tsparser,
|
|
61
|
-
project: null,
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
name: 'fds-vue-core/typescript',
|
|
67
|
-
files: ['**/*.{ts,mts,tsx}'],
|
|
68
|
-
languageOptions: {
|
|
69
|
-
parser: tsparser,
|
|
70
|
-
parserOptions: {
|
|
71
|
-
project: null,
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
plugins: {
|
|
75
|
-
'@typescript-eslint': tseslint,
|
|
76
|
-
},
|
|
77
|
-
},
|
|
78
|
-
// Non-type-aware config for extra files outside tsconfig
|
|
79
|
-
...(extraNonTypeAwareFiles.length
|
|
80
|
-
? [
|
|
81
|
-
{
|
|
82
|
-
name: 'fds-vue-core/extra-non-type-aware',
|
|
83
|
-
files: extraNonTypeAwareFiles,
|
|
84
|
-
languageOptions: {
|
|
85
|
-
parserOptions: {
|
|
86
|
-
project: null,
|
|
87
|
-
tsconfigRootDir,
|
|
88
|
-
},
|
|
89
|
-
},
|
|
90
|
-
},
|
|
91
|
-
]
|
|
92
|
-
: []),
|
|
93
|
-
// Type-aware config for TypeScript files (if tsconfig files provided)
|
|
94
|
-
...(tsconfigFiles && tsconfigFiles.length > 0
|
|
95
|
-
? [
|
|
96
|
-
{
|
|
97
|
-
name: 'fds-vue-core/type-aware',
|
|
98
|
-
files: ['src/**/*.{ts,mts,tsx}'],
|
|
99
|
-
languageOptions: {
|
|
100
|
-
parser: tsparser,
|
|
101
|
-
parserOptions: {
|
|
102
|
-
project: tsconfigFiles,
|
|
103
|
-
tsconfigRootDir,
|
|
104
|
-
},
|
|
105
|
-
},
|
|
106
|
-
},
|
|
107
|
-
]
|
|
108
|
-
: []),
|
|
109
|
-
globalIgnores([
|
|
110
|
-
'**/dist/**',
|
|
111
|
-
'**/coverage/**',
|
|
112
|
-
'**/.storybook/**',
|
|
113
|
-
'**/node_modules/**',
|
|
114
|
-
'*.min.js',
|
|
115
|
-
'tsconfig.tsbuildinfo',
|
|
116
|
-
'.env.local',
|
|
117
|
-
'.env.*.local',
|
|
118
|
-
'*.config.cjs',
|
|
119
|
-
'.eslintrc.cjs',
|
|
120
|
-
...defaultAdditionalIgnores,
|
|
121
|
-
...additionalIgnores,
|
|
122
|
-
]),
|
|
123
|
-
...pluginVue.configs['flat/essential'],
|
|
124
|
-
{
|
|
125
|
-
...pluginVitest.configs.recommended,
|
|
126
|
-
files: ['**/__tests__/**', '**/*.test.*', '**/*.spec.*'],
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
name: 'fds-vue-core/rules',
|
|
130
|
-
files: ['**/*.vue', '**/*.js', '**/*.jsx', '**/*.cjs', '**/*.mjs', '**/*.ts', '**/*.tsx', '**/*.cts', '**/*.mts'],
|
|
131
|
-
plugins: {
|
|
132
|
-
'@typescript-eslint': tseslint,
|
|
133
|
-
...additionalPlugins,
|
|
134
|
-
},
|
|
135
|
-
settings: {
|
|
136
|
-
...(enableI18n
|
|
137
|
-
? {
|
|
138
|
-
'vue-i18n': {
|
|
139
|
-
localeDir: {
|
|
140
|
-
pattern: i18nLocaleDir,
|
|
141
|
-
localeKey: 'file',
|
|
142
|
-
},
|
|
143
|
-
},
|
|
144
|
-
}
|
|
145
|
-
: {}),
|
|
146
|
-
...additionalSettings,
|
|
147
|
-
},
|
|
148
|
-
rules: {
|
|
149
|
-
'vue/multi-word-component-names': 'off',
|
|
150
|
-
'vue/comment-directive': 'off',
|
|
151
|
-
'vue/no-deprecated-slot-attribute': 'off',
|
|
152
|
-
'no-console': ['error', { allow: ['warn', 'error'] }],
|
|
153
|
-
'arrow-body-style': ['warn', 'as-needed', { requireReturnForObjectLiteral: false }],
|
|
154
|
-
// Vue component recognition - allow fds-* components and router components
|
|
155
|
-
'vue/no-undef-components': [
|
|
156
|
-
'error',
|
|
157
|
-
{
|
|
158
|
-
ignorePatterns: ['^fds-', '^router-', '^Router', '^VueQuery'],
|
|
159
|
-
},
|
|
160
|
-
],
|
|
161
|
-
'object-shorthand': ['error', 'always'],
|
|
162
|
-
'prefer-destructuring': [
|
|
163
|
-
'error',
|
|
164
|
-
{
|
|
165
|
-
array: false,
|
|
166
|
-
object: true,
|
|
167
|
-
},
|
|
168
|
-
],
|
|
169
|
-
'prefer-arrow-callback': 'error',
|
|
170
|
-
'prefer-template': 'error',
|
|
171
|
-
'no-unused-expressions': 'error',
|
|
172
|
-
'no-useless-return': 'error',
|
|
173
|
-
'no-useless-concat': 'error',
|
|
174
|
-
'@typescript-eslint/no-unused-vars': [
|
|
175
|
-
'error',
|
|
176
|
-
{
|
|
177
|
-
argsIgnorePattern: '^_',
|
|
178
|
-
varsIgnorePattern: '^_',
|
|
179
|
-
},
|
|
180
|
-
],
|
|
181
|
-
'@typescript-eslint/ban-ts-comment': 'off',
|
|
182
|
-
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
183
|
-
'@typescript-eslint/no-var-requires': 'off',
|
|
184
|
-
'prefer-const': 'error',
|
|
185
|
-
'no-var': 'error',
|
|
186
|
-
'prefer-spread': 'error',
|
|
187
|
-
'prefer-rest-params': 'error',
|
|
188
|
-
'no-duplicate-imports': 'error',
|
|
189
|
-
'no-useless-rename': 'error',
|
|
190
|
-
'object-curly-spacing': ['error', 'always'],
|
|
191
|
-
'array-bracket-spacing': ['error', 'never'],
|
|
192
|
-
// Note: comma-dangle removed - Prettier handles trailing commas via trailingComma: 'all' setting
|
|
193
|
-
// skipFormatting at the end of config array disables formatting rules that conflict with Prettier
|
|
194
|
-
quotes: ['error', 'single', { avoidEscape: true }],
|
|
195
|
-
semi: ['error', 'never'],
|
|
196
|
-
'no-trailing-spaces': 'error',
|
|
197
|
-
'eol-last': 'error',
|
|
198
|
-
'no-lonely-if': 'error',
|
|
199
|
-
// Prettier integration (if enabled and plugin provided)
|
|
200
|
-
...(enablePrettier && additionalPlugins.prettier ? { 'prettier/prettier': 'warn' } : {}),
|
|
201
|
-
// i18n rules (if enabled and plugin provided)
|
|
202
|
-
...(enableI18n && additionalPlugins['@intlify/vue-i18n']
|
|
203
|
-
? {
|
|
204
|
-
'@intlify/vue-i18n/no-missing-keys': 'error',
|
|
205
|
-
'@intlify/vue-i18n/no-raw-text': [
|
|
206
|
-
'error',
|
|
207
|
-
{
|
|
208
|
-
attributes: {
|
|
209
|
-
'/.+/': [
|
|
210
|
-
'title',
|
|
211
|
-
'aria-label',
|
|
212
|
-
'aria-placeholder',
|
|
213
|
-
'aria-roledescription',
|
|
214
|
-
'aria-valuetext',
|
|
215
|
-
'label',
|
|
216
|
-
'placeholder',
|
|
217
|
-
'alt',
|
|
218
|
-
'meta',
|
|
219
|
-
],
|
|
220
|
-
input: ['placeholder'],
|
|
221
|
-
img: ['alt'],
|
|
222
|
-
},
|
|
223
|
-
ignorePattern: '^[-:/()%,.\'"]+$',
|
|
224
|
-
ignoreNodes: ['md-icon', 'v-icon', 'fds-icon'],
|
|
225
|
-
},
|
|
226
|
-
],
|
|
227
|
-
'@intlify/vue-i18n/no-unused-keys': [
|
|
228
|
-
'warn',
|
|
229
|
-
{
|
|
230
|
-
src: './src',
|
|
231
|
-
extensions: ['.js', '.vue', '.ts'],
|
|
232
|
-
enableFix: false,
|
|
233
|
-
},
|
|
234
|
-
],
|
|
235
|
-
'@intlify/vue-i18n/no-duplicate-keys-in-locale': 'error',
|
|
236
|
-
'@intlify/vue-i18n/no-dynamic-keys': 'warn',
|
|
237
|
-
'@intlify/vue-i18n/key-format-style': [
|
|
238
|
-
'warn',
|
|
239
|
-
'camelCase',
|
|
240
|
-
{
|
|
241
|
-
allowArray: false,
|
|
242
|
-
splitByDots: true,
|
|
243
|
-
},
|
|
244
|
-
],
|
|
245
|
-
}
|
|
246
|
-
: {}),
|
|
247
|
-
// Additional project-specific rules
|
|
248
|
-
...additionalRules,
|
|
249
|
-
},
|
|
250
|
-
},
|
|
251
|
-
// JS/CJS files config
|
|
252
|
-
{
|
|
253
|
-
files: ['**/*.js', '**/*.cjs'],
|
|
254
|
-
rules: {
|
|
255
|
-
'@typescript-eslint/no-var-requires': 'off',
|
|
256
|
-
},
|
|
257
|
-
},
|
|
258
|
-
skipFormatting,
|
|
259
|
-
]
|
|
260
|
-
|
|
261
|
-
return configs
|
|
262
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
semi: false,
|
|
3
|
-
singleQuote: true,
|
|
4
|
-
printWidth: 120,
|
|
5
|
-
trailingComma: 'all',
|
|
6
|
-
tabWidth: 2,
|
|
7
|
-
useTabs: false,
|
|
8
|
-
arrowParens: 'always',
|
|
9
|
-
endOfLine: 'lf',
|
|
10
|
-
singleAttributePerLine: false,
|
|
11
|
-
bracketSameLine: false,
|
|
12
|
-
htmlWhitespaceSensitivity: 'ignore',
|
|
13
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
-
"extends": "@vue/tsconfig/tsconfig.dom.json",
|
|
4
|
-
"compilerOptions": {
|
|
5
|
-
"skipLibCheck": true,
|
|
6
|
-
"resolveJsonModule": true,
|
|
7
|
-
"allowJs": true,
|
|
8
|
-
"noUnusedLocals": true,
|
|
9
|
-
"noUnusedParameters": true,
|
|
10
|
-
"paths": {
|
|
11
|
-
"@/*": ["./src/*"]
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
"vueCompilerOptions": {
|
|
15
|
-
"strictTemplates": true,
|
|
16
|
-
"types": ["fds-vue-core"]
|
|
17
|
-
}
|
|
18
|
-
}
|