Browse Source

fix doublequotes rule

CrazyDoctor 2 years ago
parent
commit
a965a25728
1 changed files with 1 additions and 1 deletions
  1. 1 1
      index.js

+ 1 - 1
index.js

@@ -136,7 +136,7 @@ module.exports = {
 			create: function (context) {
 				return {
 					Literal: function (node) {
-						if (typeof node.value === 'string' && node.raw.includes('"')) {
+						if (typeof node.value === 'string' && node.raw[0] === '"') {
 							context.report({
 								node: node,
 								message: 'Avoid using double quotes (use single quotes instead)',