Skip to content

Commit dcdfb65

Browse files
authored
Update example of flatConfig to include typescript
Was having an issue for a few hours trying to get import/no-unresolved not picking up relative imports that don't include the extension like so: ```ts import { add } from './utils'; ``` After asking inside Discord, kkapp helped me by pointing out that I may need to configure the resolver to look for "ts" extensions. After adding it I went on a crusade to figure out how I had managed to miss that when migrating to flat configs. The example given for non-flat configs tells you to include the typescript config, but the flatConfig variant does not, so for an out-of-the-box experience when migrating, it can cause a headache.
1 parent fa36d49 commit dcdfb65

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ export default tseslint.config(
205205
// other configs...
206206
{
207207
files: ['**/*.{ts,tsx}'],
208-
extends: [importPlugin.flatConfigs.recommended],
208+
extends: [importPlugin.flatConfigs.recommended, importPlugin.flatConfigs.typescript],
209209
// other configs...
210210
}
211211
);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy