Compare commits
4 Commits
4ea66d18f6
...
5512e22f2b
| Author | SHA1 | Date | |
|---|---|---|---|
| 5512e22f2b | |||
| b164a4979d | |||
| 2fc2a569e7 | |||
| f4e0de0e4e |
@@ -63,7 +63,7 @@ module.exports = {
|
||||
// Vuexy reference (which sets this off) — Crewli's stricter posture.
|
||||
'@typescript-eslint/no-explicit-any': 'error',
|
||||
|
||||
'indent': ['error', 2],
|
||||
'indent': ['error', 2, { SwitchCase: 1 }],
|
||||
'comma-dangle': ['error', 'always-multiline'],
|
||||
'object-curly-spacing': ['error', 'always'],
|
||||
'camelcase': 'error',
|
||||
@@ -207,4 +207,27 @@ module.exports = {
|
||||
typescript: {},
|
||||
},
|
||||
},
|
||||
overrides: [
|
||||
// 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
|
||||
// doesn't kick in, while vue/block-tag-newline forbids the blank
|
||||
// line that lines-around-comment wants). Disable both
|
||||
// beforeBlockComment and beforeLineComment for *.vue so a leading
|
||||
// comment in <script setup> is allowed without a preceding blank.
|
||||
{
|
||||
files: ['*.vue'],
|
||||
rules: {
|
||||
'lines-around-comment': ['error', {
|
||||
beforeBlockComment: false,
|
||||
beforeLineComment: false,
|
||||
allowBlockStart: true,
|
||||
allowClassStart: true,
|
||||
allowObjectStart: true,
|
||||
allowArrayStart: true,
|
||||
ignorePattern: '!SECTION',
|
||||
}],
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ apiClient.interceptors.response.use(
|
||||
|
||||
return response
|
||||
},
|
||||
error => {
|
||||
async error => {
|
||||
if (import.meta.env.DEV)
|
||||
console.error(`❌ ${error.response?.status} ${error.config?.url}`, error.response?.data)
|
||||
|
||||
@@ -58,23 +58,21 @@ apiClient.interceptors.response.use(
|
||||
|
||||
// Handle impersonation session expiry
|
||||
if (status === 403 && error.response?.data?.impersonation_ended) {
|
||||
void import('@/stores/useImpersonationStore').then(({ useImpersonationStore }) => {
|
||||
const impersonationStore = useImpersonationStore()
|
||||
const { useImpersonationStore } = await import('@/stores/useImpersonationStore')
|
||||
const impersonationStore = useImpersonationStore()
|
||||
|
||||
impersonationStore.clearState()
|
||||
window.location.href = '/platform'
|
||||
})
|
||||
impersonationStore.clearState()
|
||||
window.location.href = '/platform'
|
||||
|
||||
return Promise.reject(error)
|
||||
throw error
|
||||
}
|
||||
|
||||
if (status === 401) {
|
||||
// Lazy import to avoid circular dependency
|
||||
void import('@/stores/useAuthStore').then(({ useAuthStore }) => {
|
||||
const authStore = useAuthStore()
|
||||
if (authStore.isInitialized)
|
||||
authStore.handleUnauthorized()
|
||||
})
|
||||
const { useAuthStore } = await import('@/stores/useAuthStore')
|
||||
const authStore = useAuthStore()
|
||||
if (authStore.isInitialized)
|
||||
authStore.handleUnauthorized()
|
||||
}
|
||||
else if (status === 403) {
|
||||
notificationStore.show('You don\'t have permission for this action.', 'error')
|
||||
@@ -99,7 +97,7 @@ apiClient.interceptors.response.use(
|
||||
notificationStore.show('Unable to connect to the server. Check your internet connection.', 'error')
|
||||
}
|
||||
|
||||
return Promise.reject(error)
|
||||
throw error
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
@@ -530,6 +530,27 @@ Zie §4 voor scope en stappen.
|
||||
codebase's `SwitchCase: 1` style), en 2 promise/no-promise-in-callback
|
||||
warnings in `lib/axios.ts:61,73` (Q4's `void` prefix recipe blijkt
|
||||
empirisch de rule niet te kalmeren — vraag voor 1b-iii).
|
||||
- **Sessie 1b-iii (2026-04-29)** — _lint baseline mop-up, klaar._
|
||||
Drie restpunten uit 1b-ii afgesloten via twee `.eslintrc.cjs`
|
||||
tweaks en één axios refactor: (1) `indent` rule krijgt
|
||||
`{ SwitchCase: 1 }` om de codebase-style te matchen (resolveert 24
|
||||
items in useTimeSlotDropdown.ts in één config-regel, geen code-rewrite
|
||||
nodig); (2) per-`*.vue` override op `lines-around-comment` met
|
||||
`beforeBlockComment: false` + `beforeLineComment: false` zodat
|
||||
SFC `<script>`-tag-aangrenzende comments het rule niet meer triggeren
|
||||
(resolveert 3 items in PortalLayout/PublicLayout/AppKpiCard, lost
|
||||
het 1b-ii-empirisch geconstateerde conflict met `vue/block-tag-newline`
|
||||
op); (3) axios response interceptor herschreven van
|
||||
`error => { void import(...).then(...) }` naar
|
||||
`async error => { ... await import(...) }` — semantisch identiek
|
||||
(de 2 sites navigeren beide via `window.location.href` weg) maar
|
||||
voldoet wel aan `promise/no-promise-in-callback`. Build smoke
|
||||
groen (12.13s). Baseline ging van **32 → 1**. Het laatste item is
|
||||
een pre-existing `sonarjs/no-collapsible-if` op
|
||||
`useImpersonationStore.ts:103` — niet in scope van 1b-iii's
|
||||
drie geplande wijzigingen, doorschuiven naar follow-up. WS-3 lint
|
||||
cleanup workstream effectief afgerond; sessie 1c
|
||||
(eslint-plugin-boundaries) kan starten op een schone baseline.
|
||||
|
||||
**Klaar-criteria:**
|
||||
- `apps/portal/` is verwijderd
|
||||
|
||||
Reference in New Issue
Block a user