Skip to content

Commit e2a1628

Browse files
chore(deps): update eslint (minor) (#1628)
* chore(deps): update eslint * fix: style imports and lint * fix: readme and obsolete vscode recs * fix: try fixing lint for conditions * fix: missed instances of import in scss * fix: darken to color.adjust --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: tehkai <[email protected]>
1 parent 8f222f3 commit e2a1628

21 files changed

+335
-268
lines changed

.vscode/extensions.json

-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
"stylelint.vscode-stylelint",
66
"mrmlnc.vscode-scss",
77
"Vue.volar",
8-
"Vue.vscode-typescript-vue-plugin",
9-
"mrmlnc.vscode-scss"
108
],
119
"unwantedRecommendations": []
1210
}

README.md

+150-114
Large diffs are not rendered by default.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"@digitalroute/cz-conventional-changelog-for-jira": "^8.0.1",
5454
"@evilmartians/lefthook": "^1.11.3",
5555
"@kong/design-tokens": "^1.17.3",
56-
"@kong/eslint-config-kong-ui": "^1.1.3",
56+
"@kong/eslint-config-kong-ui": "^1.2.4",
5757
"@kong/kongponents": "^9.24.2",
5858
"@semantic-release/changelog": "^6.0.3",
5959
"@semantic-release/git": "^10.0.1",
@@ -64,7 +64,7 @@
6464
"cross-env": "^7.0.3",
6565
"cypress": "^14.1.0",
6666
"cz-conventional-changelog": "3.3.0",
67-
"eslint": "^9.17.0",
67+
"eslint": "^9.19.0",
6868
"postcss-custom-properties": "^14.0.4",
6969
"postcss-html": "^1.8.0",
7070
"rollup-plugin-visualizer": "^5.14.0",

sandbox/shared/AppNav.vue

+7-5
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,16 @@ const route = useRoute()
3030
</script>
3131

3232
<style lang="scss">
33+
@use "sass:color";
34+
3335
$blue: #1155cb;
3436
$green: #07a88d;
3537
3638
.app-nav {
39+
border: 1px solid color.adjust($blue, $lightness: -20%);
3740
display: flex;
3841
justify-content: center;
3942
width: 100%;
40-
border: 1px solid darken($blue, 20%);
4143
4244
ul {
4345
display: flex;
@@ -48,26 +50,26 @@ $green: #07a88d;
4850
width: 100%;
4951
5052
li {
51-
border-bottom: 1px solid darken($blue, 20%);
53+
border-bottom: 1px solid color.adjust($blue, $lightness: -20%);
5254
font-size: 16px;
5355
5456
&:last-of-type {
5557
border-bottom: 0;
5658
}
5759
5860
a {
61+
align-items: center;
62+
background-color: $blue;
5963
border-bottom: 1px solid transparent;
6064
color: #fff;
61-
background-color: $blue;
6265
display: flex;
63-
align-items: center;
6466
justify-content: space-between;
6567
padding: 8px 16px;
6668
text-decoration: none;
6769
transition: all .2s ease-in-out;
6870
6971
&:hover {
70-
background-color: darken($blue, 10%);
72+
background-color: color.adjust($blue, $lightness: -10%);
7173
}
7274
7375
&.router-link-active {

src/assets/styles/_elements.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Import Kong Design Tokens
2-
@import "@kong/design-tokens/tokens/scss/variables";
2+
@use "@kong/design-tokens/tokens/scss/variables" as *;
33

44
// REGISTER
55
.kong-auth-register-form {

src/assets/styles/app.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
@use "sass:meta";
44
// Import Kong Design Tokens - has to be done here afer `sass:meta`
5-
@import "@kong/design-tokens/tokens/scss/variables";
5+
@use "@kong/design-tokens/tokens/scss/variables" as *;
66

77
.kong-auth-element {
88
// Import Kongponents styles

src/components/AcceptInvitationForm.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -261,5 +261,5 @@ onMounted(async () => {
261261
<style lang="scss" scoped>
262262
/*! KONG_AUTH_INJECT_STYLES */
263263
// No styles should be added to this component; add styles to the /assets/styles/_elements.scss partial
264-
@import "@/assets/styles/elements";
264+
@use "@/assets/styles/elements" as *;
265265
</style>

src/components/BaseCustomElement.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ const { injectedStyles } = useInjectStyles()
2727
2828
// Import custom app styles from a single entrypoint
2929
// (since this is wrapping all custom elements)
30-
@import "@/assets/styles/app";
30+
@use "@/assets/styles/app" as *;
3131
</style>

src/components/ChangePasswordForm.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -304,5 +304,5 @@ const submitForm = async (): Promise<void> => {
304304
<style lang="scss" scoped>
305305
/*! KONG_AUTH_INJECT_STYLES */
306306
// No styles should be added to this component; add styles to the /assets/styles/_elements.scss partial
307-
@import "@/assets/styles/elements";
307+
@use "@/assets/styles/elements" as *;
308308
</style>

src/components/ErrorMessage.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,5 +116,5 @@ onMounted(() => {
116116
<style lang="scss" scoped>
117117
/*! KONG_AUTH_INJECT_STYLES */
118118
// No styles should be added to this component; add styles to the /assets/styles/_elements.scss partial
119-
@import "@/assets/styles/elements";
119+
@use "@/assets/styles/elements" as *;
120120
</style>

src/components/ForgotPasswordForm.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -232,5 +232,5 @@ const submitForm = async (): Promise<void> => {
232232
<style lang="scss" scoped>
233233
/*! KONG_AUTH_INJECT_STYLES */
234234
// No styles should be added to this component; add styles to the /assets/styles/_elements.scss partial
235-
@import "@/assets/styles/elements";
235+
@use "@/assets/styles/elements" as *;
236236
</style>

src/components/LoginForm.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -529,5 +529,5 @@ onMounted(async () => {
529529
<style lang="scss" scoped>
530530
/*! KONG_AUTH_INJECT_STYLES */
531531
// No styles should be added to this component; add styles to the /assets/styles/_elements.scss partial
532-
@import "@/assets/styles/elements";
532+
@use "@/assets/styles/elements" as *;
533533
</style>

src/components/RegisterForm.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ const processRecaptchaAndSubmit = () => {
341341
} else {
342342
submitForm()
343343
}
344-
} catch (err) {
344+
} catch {
345345
// Fallback to just submitting the form
346346
submitForm(true)
347347
}
@@ -462,5 +462,5 @@ onMounted(() => {
462462
<style lang="scss" scoped>
463463
/*! KONG_AUTH_INJECT_STYLES */
464464
// No styles should be added to this component; add styles to the /assets/styles/_elements.scss partial
465-
@import "@/assets/styles/elements";
465+
@use "@/assets/styles/elements" as *;
466466
</style>

src/components/ResetPasswordForm.vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@ const btnDisabled = computed((): boolean => {
152152
const { axiosInstance: axiosInstanceV1 } = useAxios({}, 'v1')
153153
154154
const resetPassword = async (credentials: {
155-
password: string,
156-
token: string,
155+
password: string
156+
token: string
157157
}) => {
158158
if (userEntity === 'developer') {
159159
return await axiosInstanceV1.post('/api/v2/developer/reset-password', credentials)
@@ -249,5 +249,5 @@ onMounted(() => {
249249
<style lang="scss" scoped>
250250
/*! KONG_AUTH_INJECT_STYLES */
251251
// No styles should be added to this component; add styles to the /assets/styles/_elements.scss partial
252-
@import "@/assets/styles/elements";
252+
@use "@/assets/styles/elements" as *;
253253
</style>

src/composables/useIdentityProvider.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export default function useIdentityProvider(
109109

110110
// Encode for query string param
111111
returnToParam = `returnTo=${encodeURIComponent(returnToUrl.href)}`
112-
} catch (_) {
112+
} catch {
113113
idpIsLoading.value = false
114114
// Console warning references the element prop name instead of local variable
115115

@@ -127,7 +127,7 @@ export default function useIdentityProvider(
127127

128128
// Encode for query string param
129129
callbackUrlParam = `callback_url=${encodeURIComponent(oidcCallbackUrl.href)}`
130-
} catch (_) {
130+
} catch {
131131
idpIsLoading.value = false
132132
// Console warning references the element prop name instead of local variable
133133

@@ -188,7 +188,7 @@ export default function useIdentityProvider(
188188
// Create new URL from returnTo, wrapped in try/catch to construct the URL object
189189
const currentUrl = new URL(win.getLocationHref())
190190
oidcQueryParams.value = new URLSearchParams(currentUrl.search)
191-
} catch (_) {
191+
} catch {
192192
oidcQueryParams.value = null
193193
console.error(
194194
"'shouldTriggerIdpAuthentication' could not extract the required OIDC query parameters",

src/elements/kong-auth-accept-invitation/KongAuthAcceptInvitation.ce.vue

+3-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ defineEmits(acceptInvitationEmits)
3131
3232
// Message props: These provided values default to useI18n() message text so
3333
// they must be provided in this format so the default value can be set in the child component.
34-
props.subheaderText && provide('invite-subheader-text', computed((): string => props.subheaderText))
34+
if (props.subheaderText) {
35+
provide('invite-subheader-text', computed((): string => props.subheaderText))
36+
}
3537
</script>
3638

3739
<style lang="scss">

src/elements/kong-auth-change-password/KongAuthChangePassword.ce.vue

+3-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ provide(
4444
)
4545
// Message props: These provided values default to useI18n() message text so
4646
// they must be provided in this format so the default value can be set in the child component.
47-
props.changePasswordButtonText && provide('change-password-button-text', computed((): string => props.changePasswordButtonText))
47+
if (props.changePasswordButtonText) {
48+
provide('change-password-button-text', computed((): string => props.changePasswordButtonText))
49+
}
4850
</script>
4951

5052
<style lang="scss" scoped>

src/elements/kong-auth-forgot-password/KongAuthForgotPassword.ce.vue

+7-2
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,13 @@ provide(
7676
7777
// Message props: These provided values default to useI18n() message text so
7878
// they must be provided in this format so the default value can be set in the child component.
79-
props.loginLinkText && provide('login-link-text', computed((): string => props.loginLinkText))
80-
props.successText && provide('success-text', computed((): string => props.successText))
79+
if (props.loginLinkText) {
80+
provide('login-link-text', computed((): string => props.loginLinkText))
81+
}
82+
83+
if (props.successText) {
84+
provide('success-text', computed((): string => props.successText))
85+
}
8186
</script>
8287

8388
<style lang="scss" scoped>

src/elements/kong-auth-login/KongAuthLogin.ce.vue

+23-6
Original file line numberDiff line numberDiff line change
@@ -143,12 +143,29 @@ provide(
143143
144144
// Message props: These provided values default to useI18n() message text so
145145
// they must be provided in this format so the default value can be set in the child component.
146-
props.forgotPasswordLinkText && provide('forgot-password-link-text', computed((): string => props.forgotPasswordLinkText))
147-
props.registerLinkHelpText && provide('register-link-help-text', computed((): string => props.registerLinkHelpText))
148-
props.registerLinkText && provide('register-link-text', computed((): string => props.registerLinkText))
149-
props.registerSuccessText && provide('register-success-text', computed((): string => props.registerSuccessText))
150-
props.loginSsoButtonText && provide('login-sso-button-text', computed((): string => props.loginSsoButtonText))
151-
props.loginButtonText && provide('login-button-text', computed((): string => props.loginButtonText))
146+
if (props.forgotPasswordLinkText) {
147+
provide('forgot-password-link-text', computed((): string => props.forgotPasswordLinkText))
148+
}
149+
150+
if (props.registerLinkHelpText) {
151+
provide('register-link-help-text', computed((): string => props.registerLinkHelpText))
152+
}
153+
154+
if (props.registerLinkText) {
155+
provide('register-link-text', computed((): string => props.registerLinkText))
156+
}
157+
158+
if (props.registerSuccessText) {
159+
provide('register-success-text', computed((): string => props.registerSuccessText))
160+
}
161+
162+
if (props.loginSsoButtonText) {
163+
provide('login-sso-button-text', computed((): string => props.loginSsoButtonText))
164+
}
165+
166+
if (props.loginButtonText) {
167+
provide('login-button-text', computed((): string => props.loginButtonText))
168+
}
152169
</script>
153170

154171
<style lang="scss">

src/elements/kong-auth-register/KongAuthRegister.ce.vue

+3-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,9 @@ provide(
7878
7979
// Message props: These provided values default to useI18n() message text so
8080
// they must be provided in this format so the default value can be set in the child component.
81-
props.registerButtonText && provide('register-button-text', computed((): string => props.registerButtonText))
81+
if (props.registerButtonText) {
82+
provide('register-button-text', computed((): string => props.registerButtonText))
83+
}
8284
</script>
8385

8486
<style lang="scss">

0 commit comments

Comments
 (0)