-
Notifications
You must be signed in to change notification settings - Fork 342
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
After upgrade to version 3.x, json files are broken #1876
Comments
@yp05327 can you provide me with a GitHub repository I can clone that demos this. Problems like this are sensitive to versions (elint, plugins, ...) and I want to ensure we are using the same setup. |
I tried to reproduce this but failed. A GitHub repository to clone is highly appreciated. |
I'm using a payed Vue template, so I can't push all of them. I will try to provide a demo later. |
@dbaeumer Reproduce:
I notice that the following two things effecting this issue:
I have tested it in my local PC in a clean space again, so I'm sure you can reproduce it. I didn't modify |
So this issue comes from eslint self but not the extension? |
It sounds strange. May be the extension doesn't work when downgraded :-). Does it work in general? |
I notice that the missing rules
So the correct command is
|
I confirmed that this is partly caused by #1787 And then because of the bad logic here: Maybe a fix can be checking whether user enabled the plugin in eslint config file, then mark |
Happy to hear you could get it to work Actually the code checks if the plugin is enabled by loading the configuration of the file. In your setup the following plug-ins are available according the the eslint npm package. I don't check config files since configuration can come from many many place. So I check what ESLint tells me the configuration looks like. I think the problem is that |
I double checked the code and IMO it does the right thing. I will close the issue. Please ping if you think somethings should be done. |
In my demo, you can see that jsonc is in eslint.plugins list, but I don't have it in |
But ESLint does the same thing on the command line. Since I use the same code (and I don't want to do my own parsing of config files) I get the same result. What I can think of is to enforce the validate setting. If a user has defined it and the file type is not in the list it will not validate the file. This would be an equal behavior as specifying things on the command line. |
I opened #1892 for the validate setting |
It works well in 2.4.4, but after I upgrade to the latest 3.x.x, it seems that it will lint all
.json
asjs/ts
fileIn 2.4.4:
In 3.0.8 and 3.0.10:
The text was updated successfully, but these errors were encountered: