From eb9b41ffb5b6148484b0ecd3eeab54cb69626109 Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Fri, 17 Mar 2017 17:52:35 -0700 Subject: [PATCH] Relax rule: Allow tagged template string expressions (no-unused-expressions) Fixes: https://github.com/feross/standard/issues/822 Fixes "Expected an assignment or function call and instead saw an expression." error when using a standalone tagged template string like: ```js var css = require('sheetify') css` .js-yellow { color: #f7df1e } .bg-js-yellow { background-color: #f7df1e } ` ``` --- eslintrc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eslintrc.json b/eslintrc.json index 681f84c8..db2b86fa 100644 --- a/eslintrc.json +++ b/eslintrc.json @@ -126,7 +126,7 @@ "no-unreachable": "error", "no-unsafe-finally": "error", "no-unsafe-negation": "error", - "no-unused-expressions": ["error", { "allowShortCircuit": true, "allowTernary": true }], + "no-unused-expressions": ["error", { "allowShortCircuit": true, "allowTernary": true, "allowTaggedTemplates": true }], "no-unused-vars": ["error", { "vars": "all", "args": "none" }], "no-use-before-define": ["error", { "functions": false, "classes": false, "variables": false }], "no-useless-call": "error",