Files
react-native-devtools-frontend/node_modules/stylelint/lib/rules/string-quotes
Tim van der Lippe 382089011b Run npm audit
This syncs our dependencies to the latest version. There is still
a reported vulnerability in postcss, but we are luckily unaffected.
However, we can't upgrade postcss yet, as stylelint requires it
and can not use postcss 8 yet:
https://github.com/stylelint/stylelint/issues/4942#issuecomment-823513767

Also updated manage_node_deps.py to not run the full install when
running `ls`, to allow for easier inspection of our dependency graph.

R=jacktfranklin@chromium.org

Bug: none
Change-Id: I1c9e4836fca25500e2e7277ec82b13bf2b881dca
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2887731
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-05-11 16:18:42 +00:00
..
2021-05-11 16:18:42 +00:00
2020-06-11 06:20:04 +00:00

string-quotes

Specify single or double quotes around strings.

a[id="foo"] { content: "x"; }
/**  ↑   ↑             ↑ ↑
 * These quotes and these quotes */

Quotes within comments are ignored.

/* "This is fine" */
/* 'And this is also fine' */

Single quotes in a charset @-rule are ignored as using single quotes in this context is incorrect according the CSS specification.

@charset "utf-8"
/* fine regardless of configuration */

The fix option can automatically fix most of the problems reported by this rule.

Options

string: "single"|"double"

"single"

Strings must always be wrapped with single quotes.

The following patterns are considered violations:

a { content: "x"; }
a[id="foo"] {}

The following patterns are not considered violations:

a { content: 'x'; }
a[id='foo'] {}
a { content: "x'y'z"; }

"double"

Strings must always be wrapped with double quotes.

The following patterns are considered violations:

a { content: 'x'; }
a[id='foo'] {}

The following patterns are not considered violations:

a { content: "x"; }
a[id="foo"] {}
a { content: 'x"y"z'; }

Optional secondary options

avoidEscape: true|false, defaults to true

Allows strings to use single-quotes or double-quotes so long as the string contains a quote that would have to be escaped otherwise.

For example, with "single", { "avoidEscape" : false }.

The following patterns are considered violations:

a { content: "x'y'z"; }
a[id="foo'bar'baz"] {}

The following patterns are not considered violations:

a { content: 'x'; }
a[id='foo'] {}