Merge pull request #4557 from thornbill/absolute-imports

Add support for absolute imports
This commit is contained in:
Bill Thornton 2023-05-09 10:35:46 -04:00 committed by GitHub
commit b7c5063573
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 6 deletions

View file

@ -89,15 +89,23 @@ module.exports = {
react: {
version: 'detect'
},
'import/extensions': [
'.js',
'.ts',
'.jsx',
'.tsx'
],
'import/parsers': {
'@typescript-eslint/parser': [ '.ts', '.tsx' ]
},
'import/resolver': {
node: {
extensions: [
'.js',
'.ts',
'.jsx',
'.tsx'
],
moduleDirectory: [
'node_modules',
'src'
]
}
},
polyfills: [
// Native Promises Only
'Promise',

View file

@ -1,5 +1,6 @@
{
"compilerOptions": {
"baseUrl": "src",
"target": "ES5",
"lib": ["DOM", "DOM.Iterable", "ES2015"],
"allowJs": true,

View file

@ -31,6 +31,7 @@ const config = {
resolve: {
extensions: ['.tsx', '.ts', '.js'],
modules: [
path.resolve(__dirname, 'src'),
path.resolve(__dirname, 'node_modules')
]
},