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/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.

- - + + + - -