Comments (4)
VSCode only supports JSX syntax on files with .jsx extension,
Not anymore ::-): if you enable Salsa, please see the release notes https://code.visualstudio.com/Updates#_javascript-salsa-preview
You can still use eslint for linting. The vscode-eslint extension supports linting of .jsx files. You need to do is to enable the rule in the .eslintrc
{
"ecmaFeatures": {
"jsx": true,
...
}
...
}
from vscode-eslint.
Here is my .eslintrc
{
"extends": "airbnb",
"rules": {
"prefer-template": 0
},
"plugins": ["react"],
"ecmaFeatures": {
"jsx": true
}
}
I still don't get any linting on jsx files, and the documentation for the js-is-jsx extension states that
Notice when you install this extension you will
loose all the existing language support provided for .js
Which is not really what I am after, I guess it's not possible at the moment
from vscode-eslint.
Notice when you install this extension you will loose all the existing language support provided for .js
This is no longer the case when you enable Salsa. Salsa understands jsx constructs in the .js files as described in the release notes (not sure how I can make this more clear than it is written now). When you enable Salsa all the js-is-jsx extension does is to enable the jsx coloring for js files. I will update the description of js-is-jsx. Thanks for pointing this out.
I will verify the eslint later, but in the implementation of vscode-eslint the javascriptReact language mode is enabled.
from vscode-eslint.
Ah I see, thank you for explaining. I will try out Salsa.
from vscode-eslint.
Related Issues (20)
- Files are not analized when opened HOT 2
- When the user provides eslint.options, remove the requirement for a eslint.config.js file HOT 1
- "eslint.options.fixTypes" Not Working in "Format Document with: ESLint"
- No ESLint configuration (e.g .eslintrc) found for file
- `eslint.packageManager` deprecated but error message says to use it
- How Can I Display All ESLint Errors and Warnings for All Files in VSCode? HOT 1
- "eslint.onIgnoredFiles" seems not working on v3.0.10
- Issues with Rules and Prettier Integration in Versions 3.0.10 and 3.0.8 HOT 6
- Bug: In VSCode, when an incorrect config breaks the ESLint server, the "Restart ESLint Server" command does not work
- After upgrade to version 3.x, json files are broken HOT 19
- Not work of "source.fixAll.eslint": "explicit" on v3.0.10 HOT 3
- Tslint takes hours to process HOT 1
- Document behavior and defaults of useFlatConfig across ESLint v8, v9, v10 HOT 2
- [Suggestion] Mark `warn` eslint level as vscode `DiagnosticSeverity.Information` `info` level HOT 3
- `eslint.execArgv` Configuration is Not Working HOT 3
- JSON schema for useFlatConfig can be more specific HOT 1
- Should plugins still have `eslint.experimental.useFlatConfig` in their settings? HOT 1
- Support custom clickable links in eslint error tooltips HOT 1
- The extension does not show any errors anymore HOT 3
- Enfore validate list
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-eslint.