feat(lint): enforce definePage layout meta on pages-v2
Adds a custom ESLint rule (local-rules/require-v2-layout-meta) that
fails any src/pages-v2/**.vue page missing
definePage({ meta: { layout: 'OrganizerLayoutV2' } }) (or PortalLayoutV2
under pages-v2/portal), preventing a silent wrong-shell fallback to the
default layout (RFC-WS-GUI-REDESIGN AD-G2). Wires eslint-plugin-local-rules
+ a pages-v2 override. The RuleTester spec is called at top level (ESLint
RuleTester self-manages describe/it under Vitest) and vitest.config.ts
gains the eslint-rules test glob so the spec is discovered.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -33,6 +33,7 @@ module.exports = {
|
||||
'regex',
|
||||
'regexp',
|
||||
'boundaries',
|
||||
'local-rules',
|
||||
],
|
||||
ignorePatterns: [
|
||||
'src/plugins/iconify/*.js',
|
||||
@@ -328,6 +329,12 @@ module.exports = {
|
||||
'boundaries/include': ['src/**/*.{ts,vue,tsx}'],
|
||||
},
|
||||
overrides: [
|
||||
{
|
||||
files: ['src/pages-v2/**/*.vue'],
|
||||
rules: {
|
||||
'local-rules/require-v2-layout-meta': 'error',
|
||||
},
|
||||
},
|
||||
// Vue SFCs: the base lines-around-comment rule conflicts with
|
||||
// vue/block-tag-newline at the <script setup>/comment boundary
|
||||
// (the <script> tag isn't a JS block-start so allowBlockStart
|
||||
|
||||
Reference in New Issue
Block a user