Skip to content

Commit

Permalink
chore: fix lint errors (#920)
Browse files Browse the repository at this point in the history
* chore(eslint): update .eslintignore

* chore: fix Vue component ordering

* Adopt correct unused vars for typescript

* chore: suppress specific errors instead of ignore file

Co-authored-by: Brendan Mulholland <[email protected]>
  • Loading branch information
JoaoPedroAS51 and bmulholland authored Dec 9, 2020
1 parent 035aa86 commit 1febcb8
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ templates/
node_modules
.nuxt
dist
types
docs/static/sw.js
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>
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,14 @@ declare module 'vue/types/vue' {
}

declare module 'vue/types/options' {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
interface ComponentOptions<V extends Vue> {
auth?: true | false | 'guest';
}
}

declare module 'vuex/types/index' {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
interface Store<S> {
$auth: Auth;
}
Expand Down

0 comments on commit 1febcb8

Please sign in to comment.