-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(typescript): convert to typescript
update tests to tsx match types version with dep versions generic type change to main/types to exports change build to dist change target to es6 update types/react to 18 to provide modern context type switched to vitest and react-testing-library updated to stricter eslint update to react@17
- Loading branch information
Showing
17 changed files
with
23,430 additions
and
17,942 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"presets": [ | ||
"amex" | ||
"amex", | ||
"@babel/preset-typescript" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,50 @@ | ||
{ | ||
"extends": "amex" | ||
"extends": ["amex", "plugin:@typescript-eslint/recommended", "prettier"], | ||
"settings": { "import/resolver": { "typescript": {} } }, | ||
"parserOptions": { | ||
"project": true, | ||
"extraFileExtensions": [".json"] | ||
}, | ||
"parser": "@typescript-eslint/parser", | ||
"plugins": ["@typescript-eslint"], | ||
"ignorePatterns": ["dist/**/*", "commitlint.config.js"], | ||
"overrides": [ | ||
{ | ||
"files": ["__tests__/**"], | ||
"extends": ["amex/test", "plugin:@typescript-eslint/recommended", "prettier"], | ||
"rules": { | ||
"import/extensions": [ | ||
"error", | ||
"ignorePackages", | ||
{ | ||
"ts": "never", | ||
"tsx": "never", | ||
"js": "never", | ||
"jsx": "never" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"files": ["src/**"], | ||
"extends": [ | ||
"amex", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:@typescript-eslint/strict-type-checked", | ||
"prettier" | ||
], | ||
"rules": { | ||
"import/extensions": [ | ||
"error", | ||
"ignorePackages", | ||
{ | ||
"ts": "never", | ||
"tsx": "never", | ||
"js": "never", | ||
"jsx": "never" | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
node_modules | ||
test-results | ||
.jest-cache | ||
coverage | ||
.jest-cache | ||
dist |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { afterEach } from 'vitest'; | ||
import { cleanup } from '@testing-library/react'; | ||
|
||
// Use locked timezone for predictable testing environment | ||
process.env.TZ = 'UTC'; | ||
|
||
afterEach(() => { | ||
cleanup(); | ||
}); |
Oops, something went wrong.