Closed
Description
Before You File a Bug Report Please Confirm You Have Done The Following...
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest version of the packages.
- I have searched for related issues and found none that matched my issue.
- I have read the FAQ and my problem is not listed.
Playground Link
Repro Code
var packageData = require(`../package.json`);
ESLint Config
module.exports = {
parser: "@typescript-eslint/parser",
rules: {
"@typescript-eslint/<rule-name>": ["error", { allow: ['\\.json$'] }],
},
};
tsconfig
Expected Result
This should be allowed.
Actual Result
Require statement not part of import statement.
Because the rule doesn't look at template literals inside call expressions, it still gets the complaint.
Additional Info
Note that the production site won't have the allow
option in the playground until the next release. I'm filing this as a fast follow from #7710 (comment)