Skip to content

Commit

Permalink
Enforce consistent type definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
Trinovantes committed Oct 6, 2022
1 parent 0dc609e commit c684366
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,5 +182,7 @@ module.exports = {
allowNullableBoolean: true,
allowNullableString: true,
}],

'@typescript-eslint/consistent-type-definitions': ['error', 'type'],
},
}
2 changes: 1 addition & 1 deletion example/src/AppContext.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { SSRContext } from '@vue/server-renderer'
import type express from 'express'

interface QuasarSsrContext {
type QuasarSsrContext = {
req: express.Request
res: express.Response
_modules: Set<unknown>
Expand Down
4 changes: 2 additions & 2 deletions example/src/createVueApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import { createAppRouter } from './router'
import type { AppContext } from './AppContext'
import type { createRouter } from 'vue-router'

interface CreatedApp {
type VueApp = {
app: ReturnType<typeof createSSRApp>
router: ReturnType<typeof createRouter>
}

export async function createVueApp(ssrContext?: AppContext): Promise<CreatedApp> {
export async function createVueApp(ssrContext?: AppContext): Promise<VueApp> {
// Vue
const app = createSSRApp(App)

Expand Down
2 changes: 1 addition & 1 deletion src/webpack/QuasarUnusedLoaderOptions.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export interface QuasarUnusedLoaderOptions {
export type QuasarUnusedLoaderOptions = {
usedComponents: Array<string>
}
2 changes: 1 addition & 1 deletion src/webpack/QuasarUnusedPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { QuasarUnusedPluginOptions, validateQuasarUnusedPluginOptions } from './
import { ReplaceValueDependency } from './ReplaceValueDependency'
import type { QuasarUnusedLoaderOptions } from './QuasarUnusedLoaderOptions'

interface QuasarAutoImport {
type QuasarAutoImport = {
importName: Record<string, string>
regex: {
components: string
Expand Down
2 changes: 1 addition & 1 deletion src/webpack/QuasarUnusedPluginOptions.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Ajv from 'ajv'
import { QUASAR_SIDE_EFFECTS } from '../Constants'

export interface QuasarUnusedPluginOptions {
export type QuasarUnusedPluginOptions = {
sideEffectsOverride?: boolean | Array<string>
enableSsr?: boolean
enablePwa?: boolean
Expand Down

0 comments on commit c684366

Please sign in to comment.