Open kavsingh opened 8 months ago
Pull requests are welcome! It would probably be good to include the following settings as well.
"settings": {
"import/parsers": {
"astro-eslint-parser": [".astro"],
"espree": [".js"],
"...": [".ts", ...]
}
}
After adding Astro View Transitions to my project, I encountered the following error:
error Unable to resolve path to module 'astro:transitions' import/no-unresolved
The above error is fixed by the following patch:
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -66,8 +66,9 @@ module.exports = {
settings: {
'import/resolver': {
typescript: {
project: '.'
}
- }
+ },
+ 'import/core-modules': ['astro:transitions']
}
}
Perhaps this will be of help to others.
Description
One thing i always forget when setting up an astro project with
eslint-plugin-astro
+eslint-plugin-import
, is how to resolveimport/no-unresolved
errors forastro:content
.My usual way of handling it is adding
astro:content
to core modulesIs that approach right, and would it be worth adding it (or the actual right thing to do) as a note in the configuration docs? Does it even belong in these docs?