Skip to content

Commit

Permalink
fix: use relative imports (#795)
Browse files Browse the repository at this point in the history
  • Loading branch information
ph-fritsche committed Nov 28, 2021
1 parent 4873895 commit 4adb909
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 13 deletions.
4 changes: 3 additions & 1 deletion .eslintrc.js
@@ -1,6 +1,8 @@
module.exports = {
extends: './node_modules/kcd-scripts/eslint.js',
parser: '@typescript-eslint/parser',
parserOptions: {
project: ['./tsconfig.json', './tests/tsconfig.json'],
},
settings: {
'import/resolver': {
typescript: {},
Expand Down
10 changes: 8 additions & 2 deletions src/utility/upload.ts
@@ -1,7 +1,13 @@
import {fireEvent} from '@testing-library/dom'
import {blur, createFileList, focus, isDisabled, isElementType} from '../utils'
import {
blur,
createFileList,
focus,
isDisabled,
isElementType,
setFiles,
} from '../utils'
import {Config, UserEvent} from '../setup'
import {setFiles} from '#src/utils/edit/setFiles'

export interface uploadInit {
changeInit?: EventInit
Expand Down
1 change: 1 addition & 0 deletions src/utils/index.ts
Expand Up @@ -15,6 +15,7 @@ export * from './edit/isValidDateValue'
export * from './edit/isValidInputTimeValue'
export * from './edit/maxLength'
export * from './edit/prepareInput'
export * from './edit/setFiles'

export * from './focus/blur'
export * from './focus/copySelection'
Expand Down
12 changes: 12 additions & 0 deletions tests/tsconfig.json
@@ -0,0 +1,12 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"baseUrl": "..",
"paths": {
"#src": ["./src/index"],
"#src/*": ["./src/*"],
"#testHelpers/*": ["./tests/_helpers/*"]
}
},
"include": ["."]
}
3 changes: 1 addition & 2 deletions tests/utils/edit/setFiles.ts
@@ -1,5 +1,4 @@
import {createFileList} from '#src/utils'
import {setFiles} from '#src/utils/edit/setFiles'
import {createFileList, setFiles} from '#src/utils'
import {setup} from '#testHelpers/utils'

test('set files', () => {
Expand Down
File renamed without changes.
File renamed without changes.
11 changes: 3 additions & 8 deletions tsconfig.json
@@ -1,16 +1,11 @@
{
"extends": "./node_modules/kcd-scripts/shared-tsconfig.json",
"compilerOptions": {
"allowJs": true,
"esModuleInterop": true,
"target": "ES5",
"baseUrl": ".",
"paths": {
"#src": ["./src/index"],
"#src/*": ["./src/*"],
"#testHelpers/*": ["./tests/_helpers/*"]
},
"baseUrl": "/dev/null",
"paths": {},
"noEmit": true
},
"include": ["./src", "./tests"]
"include": ["./src"]
}

0 comments on commit 4adb909

Please sign in to comment.