Closed uhyo closed 4 weeks ago
Hello, thank you for the great tool again 😃
This time I would like to report a wrong behavior when utilizing the disable per line action to fix lint errors found in template literals.
Thanks.
export default [ { files: ["**/*.js"], rules: { eqeqeq: "error" } } ];
const foo = ` This is a template literal ${bar == baz} `;
const foo = ` This is a template literal // eslint-disable-next-line eqeqeq // eslint-disable-next-line eqeqeq // eslint-disable-next-line eqeqeq // eslint-disable-next-line eqeqeq // eslint-disable-next-line eqeqeq // eslint-disable-next-line eqeqeq // eslint-disable-next-line eqeqeq // eslint-disable-next-line eqeqeq // eslint-disable-next-line eqeqeq // eslint-disable-next-line eqeqeq ${bar == baz} `;
Possibly:
const foo = ` This is a template literal ${ // eslint-disable-next-line eqeqeq bar == baz } `;
Or maybe bail out at least without producing wrong fix.
Hello, thank you for the great tool again 😃
This time I would like to report a wrong behavior when utilizing the disable per line action to fix lint errors found in template literals.
Thanks.
Reproduction
ESLint Config
Code before applying fix
Code after applying fix
Expected behavior
Possibly:
Or maybe bail out at least without producing wrong fix.