Open Brittany-Reid opened 3 years ago
I need to investigate the eslint configuration, for the 2 million code snippets, the list of errors has some oddities.
We have errors such as alphabetize/_
from an eslint plugin, where the name is not very descriptive. I believe the config was originally only using default fixes but then I added some environment options, it's possible that's where this is coming from?
But we have odder cases: errors named rule-code
[rule-code]
and <rule>
, what are these meant to even be?
We need to be able to explain the errors that appear in our data.
I ran with the rule object empty and now only get parsing errors and the odd cases. Found this, seems it may be using our project config file that I use for the eslint VSCode plugin:
If so, these cases are still odd for our config. They should have names and belong to a project.
It's not that, we're using the Linter object that shouldn't use our config.
Printed the code for one of the errors and received this:
/* eslint @fasttime/no-spaces-in-call-expression: "error" */\n\nfn ();
This inline rule says to error at this line. We can disable it with allowInlineConfig
.
Cool, it works. The info now only shows parser errors and rules from the defined ruleset.
An analysis of errors can be found here: info.log
I printed 10 examples for each error, except in cases where there were less than 10 occurrences. The printed snippets are not a random sample, so show the first 10 occurances in the dataset (you will notice for common errors the package names they come from tend to be at the start of the alphabet). It may be a good idea to randomize on the next run.
ESLint provides us with error messages and fixes for code snippets, with a basic implemention in branch v2.0, however, there may be room to improve these. Possibilities include:
Todo:
The error statistics are related to issue #48