]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/dashboard: Avoid escaped quotes using TSLint
authorStephan Müller <smueller@suse.com>
Thu, 21 Nov 2019 15:40:51 +0000 (16:40 +0100)
committerStephan Müller <smueller@suse.com>
Fri, 13 Dec 2019 14:43:45 +0000 (15:43 +0100)
The problem was that the TSLint linting hasn't matched the
linting of prettier regarding the quotes of a string.

Explanation:
'\'' will be converted to "'" with prettier, but TSLint thrown an
error that it wanted the string to look like '\''.

Now TSLint will not error if it sees an single quote inside a double
quote to match the behavior of prettier.

Fixes: https://tracker.ceph.com/issues/38287
Signed-off-by: Stephan Müller <smueller@suse.com>
src/pybind/mgr/dashboard/frontend/tslint.json

index 509e26632b15e3c064bcfc911ccd84ce3725075f..f3e62b3a92e3af4ea6d9064ba20f67fee5bac94d 100644 (file)
@@ -45,7 +45,7 @@
     "object-literal-sort-keys": false,
     "one-line": [true, "check-open-brace", "check-catch", "check-else", "check-whitespace"],
     "prefer-const": true,
-    "quotemark": [true, "single"],
+    "quotemark": [true, "single", "avoid-escape"],
     "radix": true,
     "semicolon": [true, "always"],
     "triple-equals": [true, "allow-null-check"],