diff --git a/apps/html-storybook/vite.config.ts b/apps/html-storybook/vite.config.ts index 953efa7f..59255b15 100644 --- a/apps/html-storybook/vite.config.ts +++ b/apps/html-storybook/vite.config.ts @@ -3,6 +3,7 @@ import { defineConfig } from 'vite' // https://vitejs.dev/config/ export default defineConfig({ publicDir: './../public/', + // because pnpm and stories are in node_modules resolve: { preserveSymlinks: true }, diff --git a/apps/vue-storybook/.storybook/main.ts b/apps/vue-storybook/.storybook/main.ts index ab846178..a3352184 100644 --- a/apps/vue-storybook/.storybook/main.ts +++ b/apps/vue-storybook/.storybook/main.ts @@ -2,11 +2,8 @@ import remarkGfm from 'remark-gfm' const config = { stories: [ - './../stories/**/*.stories.@(js|jsx|ts|tsx)', - './../stories/**/*.docs.mdx', - './../docs/**/*.stories.@(js|jsx|ts|tsx)', - './../docs/**/*.docs.mdx', - './../../../packages/vue/src/**/*.stories.@(js|jsx|ts|tsx)' + './../node_modules/@explorer-1/vue/src/**/*.stories.@(js|jsx|ts|tsx)', + './../node_modules/@explorer-1/vue/src/**/*.docs.mdx' ], addons: [ { diff --git a/apps/vue-storybook/components.d.ts b/apps/vue-storybook/components.d.ts index ff5686fa..2eed1f1c 100644 --- a/apps/vue-storybook/components.d.ts +++ b/apps/vue-storybook/components.d.ts @@ -73,7 +73,7 @@ declare module 'vue' { HeroListingIndex: typeof import('./node_modules/@explorer-1/vue/src/components/HeroListingIndex/HeroListingIndex.vue')['default'] HeroMedia: typeof import('./node_modules/@explorer-1/vue/src/components/HeroMedia/HeroMedia.vue')['default'] HeroMedium: typeof import('./node_modules/@explorer-1/vue/src/components/HeroMedium/HeroMedium.vue')['default'] - HomePage: typeof import('./node_modules/@explorer-1/vue/src/templates/www/HomePage.vue')['default'] + HomePage: typeof import('./node_modules/@explorer-1/vue/src/templates/www/HomePage/HomePage.vue')['default'] HomepageCarousel: typeof import('./node_modules/@explorer-1/vue/src/components/HomepageCarousel/HomepageCarousel.vue')['default'] HomepageCarouselItem: typeof import('./node_modules/@explorer-1/vue/src/components/HomepageCarouselItem/HomepageCarouselItem.vue')['default'] HomepageEmbedBlock: typeof import('./node_modules/@explorer-1/vue/src/components/HomepageEmbedBlock/HomepageEmbedBlock.vue')['default'] @@ -180,18 +180,18 @@ declare module 'vue' { PageAsteroidWatchContent: typeof import('./node_modules/@explorer-1/vue/src/templates/PageAsteroidWatchContent/PageAsteroidWatchContent.vue')['default'] PageAsteroidWatchIndex: typeof import('./node_modules/@explorer-1/vue/src/templates/PageAsteroidWatchIndex/PageAsteroidWatchIndex.vue')['default'] PageAudioDetail: typeof import('./node_modules/@explorer-1/vue/src/templates/PageAudioDetail/PageAudioDetail.vue')['default'] - PageContent: typeof import('./node_modules/@explorer-1/vue/src/templates/PageContent.vue')['default'] + PageContent: typeof import('./node_modules/@explorer-1/vue/src/templates/PageContent/PageContent.vue')['default'] PageCuratedGallery: typeof import('./node_modules/@explorer-1/vue/src/templates/PageCuratedGallery/PageCuratedGallery.vue')['default'] PageEduNewsDetail: typeof import('./node_modules/@explorer-1/vue/src/templates/edu/PageEduNewsDetail.vue')['default'] PageError: typeof import('./node_modules/@explorer-1/vue/src/templates/PageError/PageError.vue')['default'] - PageEventDetail: typeof import('./node_modules/@explorer-1/vue/src/templates/PageEventDetail.vue')['default'] + PageEventDetail: typeof import('./node_modules/@explorer-1/vue/src/templates/PageEventDetail/PageEventDetail.vue')['default'] PageGoDirectory: typeof import('./node_modules/@explorer-1/vue/src/templates/PageGoDirectory/PageGoDirectory.vue')['default'] PageImageDetail: typeof import('./node_modules/@explorer-1/vue/src/templates/PageImageDetail/PageImageDetail.vue')['default'] PageInfographicDetail: typeof import('./node_modules/@explorer-1/vue/src/templates/PageInfographicDetail/PageInfographicDetail.vue')['default'] PageListingIndex: typeof import('./node_modules/@explorer-1/vue/src/templates/PageListingIndex.vue')['default'] PageMaintenanceMode: typeof import('./node_modules/@explorer-1/vue/src/templates/PageMaintenanceMode/PageMaintenanceMode.vue')['default'] PageMissionDetail: typeof import('./node_modules/@explorer-1/vue/src/templates/PageMissionDetail/PageMissionDetail.vue')['default'] - PageNewsDetail: typeof import('./node_modules/@explorer-1/vue/src/templates/PageNewsDetail.vue')['default'] + PageNewsDetail: typeof import('./node_modules/@explorer-1/vue/src/templates/PageNewsDetail/PageNewsDetail.vue')['default'] PagePodcast: typeof import('./node_modules/@explorer-1/vue/src/templates/PagePodcast/PagePodcast.vue')['default'] PagePodcastSeason: typeof import('./node_modules/@explorer-1/vue/src/templates/PagePodcastSeason/PagePodcastSeason.vue')['default'] PagePressKitIndex: typeof import('./node_modules/@explorer-1/vue/src/templates/PagePressKitIndex/PagePressKitIndex.vue')['default'] diff --git a/apps/vue-storybook/docs/foundation/FontVariants.vue b/apps/vue-storybook/docs/foundation/FontVariants.vue deleted file mode 100644 index 4e3b34d3..00000000 --- a/apps/vue-storybook/docs/foundation/FontVariants.vue +++ /dev/null @@ -1,88 +0,0 @@ - diff --git a/apps/vue-storybook/package.json b/apps/vue-storybook/package.json index db8e6a9d..09e1f3e8 100644 --- a/apps/vue-storybook/package.json +++ b/apps/vue-storybook/package.json @@ -14,8 +14,10 @@ "build": "storybook build -c .storybook -o storybook_compiled", "percy": "percy storybook http://localhost:6006", "percy:dry-run": "percy storybook http://localhost:6006 --dry-run", - "lint": "eslint ./stories", - "lint:fix": "eslint ./stories --fix", + "lint:app": "eslint './.storybook/**/*.@(js|ts)'", + "lint:app:fix": "eslint './.storybook/**/*.@(js|ts)' --fix", + "lint": "eslint './../../packages/vue/src/**/*.stories.@(js|ts|mdx)' && pnpm lint:app", + "lint:fix": "eslint './../../packages/vue/src/**/*.stories.@(js|ts|mdx)' --fix && pnpm lint:app:fix", "init-msw": "msw init public/" }, "dependencies": { diff --git a/apps/vue-storybook/stories/components/BlockDialog.stories.mdx b/apps/vue-storybook/stories/components/BlockDialog.stories.mdx deleted file mode 100644 index 5b04e9f3..00000000 --- a/apps/vue-storybook/stories/components/BlockDialog.stories.mdx +++ /dev/null @@ -1,82 +0,0 @@ -import { Meta, Story, Canvas, ArgsTable } from '@storybook/addon-docs' -import BlockDialog from '@explorer-1/vue/src/components/BlockDialog/BlockDialog.vue' - - - -export const BlockDialogTemplate = (args) => ({ - props: Object.keys(args), - components: { BlockDialog }, - template: ` -
- - -
-

Dialog title

- -
-

- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do - eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut - enim ad minim veniam, quis nostrud exercitation ullamco laboris - nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor - in reprehenderit in voluptate velit esse cillum dolore eu fugiat - nulla pariatur. Excepteur sint occaecat cupidatat non proident, - sunt in culpa qui officia deserunt mollit anim id est laborum. -

-
- -
-
-
-` -}) - -# BlockDialog - -This component is an accessible dialog window that utilizes the efficient and lightweight `a11y-dialog` package. -It adheres to the [Dialog (Modal) pattern](https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/) outlined in the Accessible Rich Internet Applications (ARIA) Authoring Practices Guide. - -Additionally, it is unopinionated with styling. - - - - {BlockDialogTemplate.bind({})} - - - -### Basic Usage - -To trigger dialog opening, use the `data-a11y-dialog-show` attribute with the value set to the `id` of the dialog element you want to open. - -``` - -``` - -See [all documentation in the repository](https://github.com/KittyGiraudel/a11y-dialog). diff --git a/apps/vue-storybook/tailwind.config.ts b/apps/vue-storybook/tailwind.config.ts index 8ca280f8..cad343d0 100644 --- a/apps/vue-storybook/tailwind.config.ts +++ b/apps/vue-storybook/tailwind.config.ts @@ -11,9 +11,8 @@ import explorer1Config from '@explorer-1/common/tailwind.config' export default { ...explorer1Config, content: [ - 'stories/**/*', - 'docs/**/*', - './node_modules/@explorer-1/vue/src/components/**/*.vue', - './node_modules/@explorer-1/vue/src/templates/**/*.vue' + './node_modules/@explorer-1/vue/src/docs/**/*', + './node_modules/@explorer-1/vue/src/components/**/*', + './node_modules/@explorer-1/vue/src/templates/**/*' ] } diff --git a/apps/vue-storybook/vite.config.ts b/apps/vue-storybook/vite.config.ts index 9a8a2469..a56b89d0 100644 --- a/apps/vue-storybook/vite.config.ts +++ b/apps/vue-storybook/vite.config.ts @@ -12,6 +12,11 @@ export default defineConfig({ ] }) ], + publicDir: './../public/', + // because pnpm and stories are in node_modules + resolve: { + preserveSymlinks: true + }, server: { watch: { usePolling: true diff --git a/packages/configs/eslint/index.js b/packages/configs/eslint/index.js index c4ce7f6b..6a40a662 100644 --- a/packages/configs/eslint/index.js +++ b/packages/configs/eslint/index.js @@ -20,7 +20,7 @@ const __dirname = path.dirname(__filename) const compat = new FlatCompat({ baseDirectory: __dirname, recommendedConfig: {}, // Add recommendedConfig property - allConfig: {}, // Add allConfig property + allConfig: {} // Add allConfig property }) export default [ @@ -37,29 +37,22 @@ export default [ '**/*.ts', '**/*.tsx', '**/*.cts', - '**/*.mts', - ], - ignores: [ - '**/*.d.ts', - '**/dist/**/*', - '**/dist/**/*', - '**/.nuxt/*', - '**/node_modules/**/*', - '.gitignore', + '**/*.mts' ], + ignores: ['**/*.d.ts', '**/dist/**/*', '**/.nuxt/*', '**/node_modules/**/*', '.gitignore'], plugins: { '@typescript-eslint': tsPlugin, - '@stylistic': stylistic, + '@stylistic': stylistic }, languageOptions: { parser: vueParser, parserOptions: { - parser: tsParser, + parser: tsParser }, - ecmaVersion: 'latest', + ecmaVersion: 'latest' }, rules: { - 'semi': 'off', + semi: 'off', '@stylistic/semi': ['warn', 'never'], // allow async-await 'generator-star-spacing': 'off', @@ -69,7 +62,7 @@ export default [ 'no-void': 'off', 'multiline-ternary': 'off', 'no-unused-vars': 'warn', - + 'no-undef': 'warn', 'prefer-promise-reject-errors': 'off', @@ -78,11 +71,7 @@ export default [ 'vue/multi-word-component-names': 'warn', // TypeScript - quotes: [ - 'warn', - 'single', - { avoidEscape: true, allowTemplateLiterals: true }, - ], + quotes: ['warn', 'single', { avoidEscape: true, allowTemplateLiterals: true }], '@typescript-eslint/explicit-function-return-type': 'off', '@typescript-eslint/explicit-module-boundary-types': 'off', '@typescript-eslint/no-unnecessary-type-assertion': 'off', @@ -98,8 +87,8 @@ export default [ 'storybook/prefer-pascal-case': 'off', 'storybook/story-exports': 'off', 'vue/singleline-html-element-content-newline': 'off', - 'vue/max-attributes-per-line': 'off', - }, + 'vue/max-attributes-per-line': 'off' + } }, - eslintPluginPrettierRecommended, + eslintPluginPrettierRecommended ] diff --git a/packages/configs/eslint/package.json b/packages/configs/eslint/package.json index 7a7c9819..1bbf4299 100644 --- a/packages/configs/eslint/package.json +++ b/packages/configs/eslint/package.json @@ -8,6 +8,7 @@ "publishConfig": { "access": "public" }, + "prettier": "@explorer-1/prettier-config", "devDependencies": { "@eslint/eslintrc": "^3.1.0", "@eslint/js": "^9.3.0", @@ -21,4 +22,4 @@ "eslint-plugin-vue": "^9.26.0", "vue-eslint-parser": "^9.4.2" } -} \ No newline at end of file +} diff --git a/packages/nuxt/playground/app.vue b/packages/nuxt/playground/app.vue index 36b48e0f..c067693a 100644 --- a/packages/nuxt/playground/app.vue +++ b/packages/nuxt/playground/app.vue @@ -2,80 +2,87 @@
Nuxt Module Playground
- - Button component - + Button component
- +

This is a paragraph, not a component.

- - + + + - -