Skip to content

Commit 8a8ca60

Browse files
committed
eslint: Enforce absolute imports
1 parent e5e9dd8 commit 8a8ca60

11 files changed

Lines changed: 17 additions & 14 deletions

File tree

.eslintrc.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ module.exports = {
103103
'import/no-unresolved': 'off',
104104
'import/no-extraneous-dependencies': 'off',
105105
'prefer-promise-reject-errors': 'off',
106+
'no-restricted-imports': ['error', {
107+
'patterns': ['.*']
108+
}],
106109

107110
// TypeScript
108111
quotes: ['warn', 'single', { avoidEscape: true }],

src/components/ScreenAbstract.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import SchemaGuideLink from 'components/SchemaGuideLink.vue'
3939
import Stepper from 'components/Stepper.vue'
4040
import StepperActions from 'components/StepperActions.vue'
4141
import { defineComponent } from 'vue'
42-
import { useCff } from '../store/cff'
42+
import { useCff } from 'src/store/cff'
4343
4444
export default defineComponent({
4545
name: 'ScreenAbstract',

src/components/ScreenAuthors.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ import StepperActions from 'components/StepperActions.vue'
8282
import AuthorCardEditing from 'components/AuthorCardEditing.vue'
8383
import AuthorCardViewing from 'components/AuthorCardViewing.vue'
8484
import { AuthorType } from 'src/types'
85-
import { moveDown, moveUp } from '../updown'
85+
import { moveDown, moveUp } from 'src/updown'
8686
import { useCff } from 'src/store/cff'
8787
import { scrollToBottom } from '../scroll-to-bottom'
8888
import { useValidation } from 'src/store/validation'

src/components/ScreenFinishAdvanced.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@
5151

5252
<script lang="ts">
5353
import { defineComponent, computed } from 'vue'
54-
import { useApp } from '../store/app'
55-
import { useCff } from '../store/cff'
54+
import { useApp } from 'src/store/app'
55+
import { useCff } from 'src/store/cff'
5656
import Stepper from 'components/Stepper.vue'
5757
import StepperActions from 'components/StepperActions.vue'
5858
import { useValidation } from 'src/store/validation'

src/components/ScreenFinishMinimum.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151

5252
<script lang="ts">
5353
import { defineComponent, computed } from 'vue'
54-
import { useApp } from '../store/app'
54+
import { useApp } from 'src/store/app'
5555
import Stepper from 'components/Stepper.vue'
5656
import StepperActions from 'components/StepperActions.vue'
5757
import { useValidation } from 'src/store/validation'

src/components/ScreenLicense.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@
4747

4848
<script lang="ts">
4949
import { defineComponent, ref } from 'vue'
50-
import { useCff } from '../store/cff'
50+
import { useCff } from 'src/store/cff'
5151
import { QSelect } from 'quasar'
52-
import schema from '../schemas/1.2.0/schema.json'
52+
import schema from 'src/schemas/1.2.0/schema.json'
5353
import SchemaGuideLink from 'components/SchemaGuideLink.vue'
5454
import Stepper from 'components/Stepper.vue'
5555
import StepperActions from 'components/StepperActions.vue'

src/components/StepperActions.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
</template>
3232

3333
<script lang="ts">
34-
import { useApp } from '../store/app'
34+
import { useApp } from 'src/store/app'
3535
3636
import { defineComponent } from 'vue'
3737

src/router/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import {
55
createWebHashHistory,
66
createWebHistory
77
} from 'vue-router'
8-
import routes from './routes'
9-
import { useApp, StepNameType } from '../store/app'
8+
import routes from 'src/router/routes'
9+
import { useApp, StepNameType } from 'src/store/app'
1010

1111
/*
1212
* If not building with SSR mode, you can

src/store/cff.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { ref, computed } from 'vue'
2-
import { AuthorsType, CffType, IdentifiersType, KeywordsType, TypeType } from '../types'
2+
import { AuthorsType, CffType, IdentifiersType, KeywordsType, TypeType } from 'src/types'
33

44
const getInitialData = () => {
55
return {

src/store/validation.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
22
import Ajv, { ErrorObject } from 'ajv'
33
import addFormats from 'ajv-formats'
4-
import { useCffstr } from './cffstr'
5-
import schema from '../schemas/1.2.0/schema.json'
4+
import { useCffstr } from 'src/store/cffstr'
5+
import schema from 'src/schemas/1.2.0/schema.json'
66
import { computed } from 'vue'
77

88
const ajv = new Ajv({ allErrors: true })

0 commit comments

Comments
 (0)