magento-coding-standard
magento-coding-standard copied to clipboard
[eslint] Allow use of double quotes where sensible
This is a small part of https://github.com/magento/magento-coding-standard/pull/347 as suggested in https://github.com/magento/magento-coding-standard/pull/347#issuecomment-999512251.
https://eslint.org/docs/rules/quotes
This is a minor change to the existing rule to allow the use of double quotes where it's sensible to do so. For example, the current rule configuration means that "It's sensible to use double quotes here." must instead be written as 'It\'s sensible to use double quotes here.'. As JavaScript does not interpolate strings the same way as PHP (where ' and " mean different things), there is no harm in using the most sensible quote type. We're preserving the default preference of using single quotes by default / where possible.