VSCode will pick up the ESLint configuration for your workspace if you have a .eslintrc file in the root of your project, which our project does. But I found that my files were not being validated by ESLint. It turns out that the default configuration for Microsoft's ESLint plugin is to validate javascript and javascriptreact files (.js and .jsx files), but not TypeScript files. In order to enable validation of Typescript files you need to edit your settings, find the entry for eslint.validate, copy it to your user settings file, and then update it to include typescript and typescriptreact (for .ts and .tsx files): If you're not sure if things are correctly configured and running properly, you can view the output of the ESLint process using the command ESLint: Show Output Channel, which will show something like this:
0 Comments
Leave a Reply. |
Author
I am a software developer currently focusing on web development, who works for Mozilla. ArchivesCategories |