mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1248855 - [webext] Add "object-curly-spacing" ESLint rule and auto-fix errors. r=billm
MozReview-Commit-ID: BAZ2rRl7eSM
This commit is contained in:
parent
575bd7a423
commit
1ca36cb9c8
@ -34,43 +34,43 @@ add_task(function* testDetailsObjects() {
|
||||
{details: {"path": "a.png"},
|
||||
resolutions: {
|
||||
"1": browser.runtime.getURL("data/a.png"),
|
||||
"2": browser.runtime.getURL("data/a.png"), } },
|
||||
"2": browser.runtime.getURL("data/a.png")}},
|
||||
{details: {"path": "/a.png"},
|
||||
resolutions: {
|
||||
"1": browser.runtime.getURL("a.png"),
|
||||
"2": browser.runtime.getURL("a.png"), } },
|
||||
"2": browser.runtime.getURL("a.png")}},
|
||||
{details: {"path": {"19": "a.png"}},
|
||||
resolutions: {
|
||||
"1": browser.runtime.getURL("data/a.png"),
|
||||
"2": browser.runtime.getURL("data/a.png"), } },
|
||||
"2": browser.runtime.getURL("data/a.png")}},
|
||||
{details: {"path": {"38": "a.png"}},
|
||||
resolutions: {
|
||||
"1": browser.runtime.getURL("data/a.png"),
|
||||
"2": browser.runtime.getURL("data/a.png"), } },
|
||||
"2": browser.runtime.getURL("data/a.png")}},
|
||||
{details: {"path": {"19": "a.png", "38": "a-x2.png"}},
|
||||
resolutions: {
|
||||
"1": browser.runtime.getURL("data/a.png"),
|
||||
"2": browser.runtime.getURL("data/a-x2.png"), } },
|
||||
"2": browser.runtime.getURL("data/a-x2.png")}},
|
||||
|
||||
// Only ImageData objects.
|
||||
{details: {"imageData": imageData.red.imageData},
|
||||
resolutions: {
|
||||
"1": imageData.red.url,
|
||||
"2": imageData.red.url, } },
|
||||
"2": imageData.red.url}},
|
||||
{details: {"imageData": {"19": imageData.red.imageData}},
|
||||
resolutions: {
|
||||
"1": imageData.red.url,
|
||||
"2": imageData.red.url, } },
|
||||
"2": imageData.red.url}},
|
||||
{details: {"imageData": {"38": imageData.red.imageData}},
|
||||
resolutions: {
|
||||
"1": imageData.red.url,
|
||||
"2": imageData.red.url, } },
|
||||
"2": imageData.red.url}},
|
||||
{details: {"imageData": {
|
||||
"19": imageData.red.imageData,
|
||||
"38": imageData.green.imageData}},
|
||||
resolutions: {
|
||||
"1": imageData.red.url,
|
||||
"2": imageData.green.url, } },
|
||||
"2": imageData.green.url}},
|
||||
|
||||
// Mixed path and imageData objects.
|
||||
//
|
||||
@ -81,13 +81,13 @@ add_task(function* testDetailsObjects() {
|
||||
"imageData": {"38": imageData.red.imageData}},
|
||||
resolutions: {
|
||||
"1": browser.runtime.getURL("data/a.png"),
|
||||
"2": imageData.red.url, } },
|
||||
"2": imageData.red.url}},
|
||||
{details: {
|
||||
"path": {"38": "a.png"},
|
||||
"imageData": {"19": imageData.red.imageData}},
|
||||
resolutions: {
|
||||
"1": imageData.red.url,
|
||||
"2": browser.runtime.getURL("data/a.png"), } },
|
||||
"2": browser.runtime.getURL("data/a.png")}},
|
||||
|
||||
// A path or ImageData object by itself is treated as a 19px icon.
|
||||
{details: {
|
||||
@ -95,27 +95,27 @@ add_task(function* testDetailsObjects() {
|
||||
"imageData": {"38": imageData.red.imageData}},
|
||||
resolutions: {
|
||||
"1": browser.runtime.getURL("data/a.png"),
|
||||
"2": imageData.red.url, } },
|
||||
"2": imageData.red.url}},
|
||||
{details: {
|
||||
"path": {"38": "a.png"},
|
||||
"imageData": imageData.red.imageData, },
|
||||
"imageData": imageData.red.imageData},
|
||||
resolutions: {
|
||||
"1": imageData.red.url,
|
||||
"2": browser.runtime.getURL("data/a.png"), } },
|
||||
"2": browser.runtime.getURL("data/a.png")}},
|
||||
|
||||
// Various resolutions
|
||||
{details: {"path": {"18": "a.png", "32": "a-x2.png"}},
|
||||
resolutions: {
|
||||
"1": browser.runtime.getURL("data/a.png"),
|
||||
"2": browser.runtime.getURL("data/a-x2.png"), } },
|
||||
"2": browser.runtime.getURL("data/a-x2.png")}},
|
||||
{details: {"path": {"16": "16.png", "100": "100.png"}},
|
||||
resolutions: {
|
||||
"1": browser.runtime.getURL("data/100.png"),
|
||||
"2": browser.runtime.getURL("data/100.png"), } },
|
||||
"2": browser.runtime.getURL("data/100.png")}},
|
||||
{details: {"path": {"2": "2.png"}},
|
||||
resolutions: {
|
||||
"1": browser.runtime.getURL("data/2.png"),
|
||||
"2": browser.runtime.getURL("data/2.png"), } },
|
||||
"2": browser.runtime.getURL("data/2.png")}},
|
||||
{details: {"path": {
|
||||
"6": "6.png",
|
||||
"18": "18.png",
|
||||
@ -124,7 +124,7 @@ add_task(function* testDetailsObjects() {
|
||||
"128": "128.png"}},
|
||||
resolutions: {
|
||||
"1": browser.runtime.getURL("data/18.png"),
|
||||
"2": browser.runtime.getURL("data/48.png"), } },
|
||||
"2": browser.runtime.getURL("data/48.png")}},
|
||||
];
|
||||
|
||||
// Allow serializing ImageData objects for logging.
|
||||
|
@ -43,6 +43,9 @@
|
||||
// Always require spacing around a single line block
|
||||
"block-spacing": 1,
|
||||
|
||||
// Forbid spaces inside the curly brackets of object literals.
|
||||
"object-curly-spacing": [2, "never"],
|
||||
|
||||
// Enforce one true brace style (opening brace on the same line) and avoid
|
||||
// start and end braces on the same line.
|
||||
"brace-style": [2, "1tbs", {"allowSingleLine": true}],
|
||||
|
Loading…
Reference in New Issue
Block a user