@arnaud-barre/eslint-plugin-custom
Advanced tools
Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "@arnaud-barre/eslint-plugin-custom", | ||
"description": "Custom rules for @arnaud-barre/eslint-config", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "author": "Arnaud Barré (https://github.com/ArnaudBarre)", |
@@ -17,2 +17,8 @@ "use strict"; | ||
return; | ||
const value = node.quasis[0].value.raw; | ||
if (value.includes("'") && value.includes('"')) | ||
return; | ||
if (node.loc.start.line !== node.loc.end.line) | ||
return; | ||
const replacer = value.includes('"') ? "'" : '"'; | ||
context.report({ | ||
@@ -22,4 +28,4 @@ messageId: "error", | ||
fix: (fixer) => [ | ||
fixer.replaceTextRange([node.range[0], node.range[0] + 1], '"'), | ||
fixer.replaceTextRange([node.range[1] - 1, node.range[1]], '"'), | ||
fixer.replaceTextRange([node.range[0], node.range[0] + 1], replacer), | ||
fixer.replaceTextRange([node.range[1] - 1, node.range[1]], replacer), | ||
], | ||
@@ -26,0 +32,0 @@ }); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8134
161