Skip to content

Commit b1d10b6

Browse files
committed
fix: fix lint and add pre-commit hook to enforce lints
1 parent d96b20c commit b1d10b6

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@ repos:
2929
pass_filenames: true
3030
files: '^documentation-ui/(src|stories)/.*\.(ts|tsx|js|jsx|css|json)$'
3131

32+
- id: documentation-ui-lint
33+
name: Lint (documentation-ui)
34+
language: system
35+
entry: bash -c 'cd documentation-ui && npm run lint'
36+
pass_filenames: false
37+
files: '^documentation-ui/src/.*\.(ts|tsx|js|jsx)$'
38+
3239
- id: commitlint
3340
name: commitlint
3441
language: system

documentation-ui/src/custom/docs/components/gdpr/contexts/CookieConsentContext.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,14 @@ function cookieStateReducer(state: CookieState, action: CookieAction): CookieSta
6565
isCookieSettingsDialogVisible: false,
6666
isCookieBannerVisible: !state.isConsentSet,
6767
}
68-
case 'INITIALIZE':
68+
case 'INITIALIZE': {
6969
const isConsentSet = isConsentSetInCookies(action.version)
7070
return {
7171
...state,
7272
isConsentSet,
7373
isCookieBannerVisible: !isConsentSet,
7474
}
75+
}
7576
default:
7677
return state
7778
}

0 commit comments

Comments
 (0)