0
Follow
0
View

ESLint/Prettier rule to disallow template literals without placeholders

edith0312 注册会员
2023-01-25 07:34

The quotes eslint rule helps you enforce single quotes. Add the following to your .eslintrc:

"rules": {
  "quotes": ["error", "single", { "avoidEscape": true }]
}

You can verify that backticks/template literals without any expressions/substitutions are disallowed in the rule test code.