Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Fix lint errors & warnings #903

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
],
"rules": {
"require-await": 0,
"no-useless-constructor": 0
"no-useless-constructor": 0,
// Correct support for unused var detection in Typescript:
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unused-vars.md
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["error"]
}
}
14 changes: 7 additions & 7 deletions demo/pages/login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -110,18 +110,12 @@
</div>
</template>

<style scoped>
.login-button {
border: 0;
}
</style>

<script>
import busyOverlay from '~/components/busy-overlay'

export default {
middleware: ['auth'],
components: { busyOverlay },
middleware: ['auth'],
data () {
return {
username: '',
Expand Down Expand Up @@ -251,3 +245,9 @@ export default {
}
}
</script>

<style scoped>
.login-button {
border: 0;
}
</style>
17 changes: 9 additions & 8 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,6 @@ export { AxiosRequestConfig as HTTPRequest }
export { AxiosResponse as HTTPResponse }

export type Auth = _Auth
export type Scheme = _Scheme<SchemeOptions | any> & {
token?: Token,
refreshToken?: RefreshToken
requestHandler?: RequestHandler
refreshTokens?: Function
check?: (checkStatus: boolean) => SchemeCheck
reset?: Function
}

export type SchemeOptions = {
name: string,
Expand All @@ -30,6 +22,15 @@ export type SchemeCheck = {
isRefreshable?: boolean
}

export type Scheme = _Scheme<SchemeOptions | any> & {
token?: Token,
refreshToken?: RefreshToken
requestHandler?: RequestHandler
refreshTokens?: Function
check?: (checkStatus: boolean) => SchemeCheck
reset?: Function
}

export type AuthOptions = {
resetOnError: boolean | Function
defaultStrategy: string
Expand Down