no-redeclare
loose parser tests
#14315
Labels
accepted
There is consensus among the team that this change meets the criteria for inclusion
archived due to age
This issue has been archived; please open a new issue for any further discussion
chore
This change is not user-facing
The version of ESLint you are using.
v7.24.0
The problem you want to solve.
We have several tests for the
no-redeclare
rule wherelet
andconst
variables are redeclared:eslint/tests/lib/rules/no-redeclare.js
Lines 208 to 216 in 555cbf3
This is normally a syntax error reported by the parser, so the tests are using fixture parser tests/tools/loose-parser.js
The fixture parser requires an internal module from
espree
in order to produce an error-tolerant parser.eslint/tests/tools/loose-parser.js
Line 10 in 555cbf3
The problem is - after we release eslint/js#469, that module will be no more available as it isn't defined by
exports
in espree'spackage.json
. Even if we could bypass this restriction, the module will be ESM so it can't berequire
d.Your take on the correct solution to problem.
Just remove those tests? Core rules are not generally designed to handle code that has syntax errors, at least for now.
Are you willing to submit a pull request to implement this change?
Yes.
The text was updated successfully, but these errors were encountered: