Skip to content

Commit 77f2a39

Browse files
author
Cristian Tuns
committed
Backed out 11 changesets (bug 1878554, bug 1878553, bug 1878556) for causing node failures in aboutwelcome CLOSED TREE
Backed out changeset 425f70fa7e5a (bug 1878556) Backed out changeset 2ab3a28f5c04 (bug 1878556) Backed out changeset fb2e02682c8c (bug 1878556) Backed out changeset 2fc5e630568e (bug 1878554) Backed out changeset 78839d5841b4 (bug 1878554) Backed out changeset e0ab31d2de1b (bug 1878554) Backed out changeset 4eb59e4ebafa (bug 1878554) Backed out changeset ab1e077d3f84 (bug 1878554) Backed out changeset ef999f293e3e (bug 1878553) Backed out changeset cf49920cb1ad (bug 1878553) Backed out changeset 95f0fce63726 (bug 1878553)
1 parent 2d66624 commit 77f2a39

File tree

35 files changed

+270
-142
lines changed

35 files changed

+270
-142
lines changed

.eslintrc.js

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,10 @@ module.exports = {
6868
plugins: ["mozilla", "import", "json"],
6969
overrides: [
7070
{
71-
files: [
72-
// All .eslintrc.js files are in the node environment, so turn that
73-
// on here.
74-
// https://github.com/eslint/eslint/issues/13008
75-
".eslintrc.js",
76-
// *.config.js files are generally assumed to be configuration files
77-
// based for node.
78-
"*.config.?(m)js",
79-
],
71+
// All .eslintrc.js files are in the node environment, so turn that
72+
// on here.
73+
// https://github.com/eslint/eslint/issues/13008
74+
files: [".eslintrc.js"],
8075
env: {
8176
node: true,
8277
browser: false,

browser/components/aboutwelcome/.eslintrc.js

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44

55
module.exports = {
66
// When adding items to this file please check for effects on sub-directories.
7+
parserOptions: {
8+
ecmaFeatures: {
9+
jsx: true,
10+
},
11+
},
712
plugins: ["import", "react", "jsx-a11y"],
813
settings: {
914
react: {
@@ -13,9 +18,8 @@ module.exports = {
1318
extends: ["plugin:jsx-a11y/recommended"],
1419
overrides: [
1520
{
16-
// TODO: Bug 1773467 - Move these to .mjs or figure out a generic way
17-
// to identify these as modules.
18-
files: ["tests/unit/**/*.js"],
21+
// Only mark the files as modules which are actually modules.
22+
files: ["content-src/**", "tests/unit/**"],
1923
parserOptions: {
2024
sourceType: "module",
2125
},
@@ -38,7 +42,7 @@ module.exports = {
3842
},
3943
},
4044
{
41-
files: ["content-src/**", "tests/unit/**"],
45+
files: ["./*.js", "content-src/**", "tests/unit/**"],
4246
env: {
4347
node: true,
4448
},
@@ -56,6 +60,8 @@ module.exports = {
5660
rules: {
5761
// Disallow commonjs in these directories.
5862
"import/no-commonjs": 2,
63+
// Allow JSX with arrow functions.
64+
"react/jsx-no-bind": 0,
5965
},
6066
},
6167
{
@@ -76,6 +82,7 @@ module.exports = {
7682
rules: {
7783
"func-name-matching": 0,
7884
"lines-between-class-members": 0,
85+
"require-await": 0,
7986
},
8087
},
8188
],
@@ -84,10 +91,7 @@ module.exports = {
8491

8592
"react/jsx-boolean-value": ["error", "always"],
8693
"react/jsx-key": "error",
87-
"react/jsx-no-bind": [
88-
"error",
89-
{ allowArrowFunctions: true, allowFunctions: true },
90-
],
94+
"react/jsx-no-bind": "error",
9195
"react/jsx-no-comment-textnodes": "error",
9296
"react/jsx-no-duplicate-props": "error",
9397
"react/jsx-no-target-blank": "error",
@@ -123,15 +127,20 @@ module.exports = {
123127
"block-scoped-var": "error",
124128
"consistent-this": ["error", "use-bind"],
125129
eqeqeq: "error",
130+
"for-direction": "error",
126131
"func-name-matching": "error",
127132
"getter-return": "error",
128133
"guard-for-in": "error",
134+
"handle-callback-err": "error",
135+
"lines-between-class-members": "error",
129136
"max-depth": ["error", 4],
130137
"max-nested-callbacks": ["error", 4],
131138
"max-params": ["error", 6],
132139
"max-statements": ["error", 50],
140+
"max-statements-per-line": ["error", { max: 2 }],
133141
"new-cap": ["error", { newIsCap: true, capIsNew: false }],
134142
"no-alert": "error",
143+
"no-buffer-constructor": "error",
135144
"no-console": ["error", { allow: ["error"] }],
136145
"no-div-regex": "error",
137146
"no-duplicate-imports": "error",
@@ -141,12 +150,16 @@ module.exports = {
141150
"no-implicit-coercion": ["error", { allow: ["!!"] }],
142151
"no-implicit-globals": "error",
143152
"no-loop-func": "error",
153+
"no-mixed-requires": "error",
144154
"no-multi-assign": "error",
145155
"no-multi-str": "error",
146156
"no-new": "error",
147157
"no-new-func": "error",
158+
"no-new-require": "error",
148159
"no-octal-escape": "error",
149160
"no-param-reassign": "error",
161+
"no-path-concat": "error",
162+
"no-process-exit": "error",
150163
"no-proto": "error",
151164
"no-prototype-builtins": "error",
152165
"no-return-assign": ["error", "except-parens"],
@@ -177,6 +190,7 @@ module.exports = {
177190
"prefer-spread": "error",
178191
"prefer-template": "error",
179192
radix: ["error", "always"],
193+
"require-await": "error",
180194
"sort-vars": "error",
181195
"symbol-description": "error",
182196
"vars-on-top": "error",

browser/components/aboutwelcome/content-src/aboutwelcome.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import React from "react";
66
import ReactDOM from "react-dom";
7-
import { AboutWelcomeUtils } from "./lib/aboutwelcome-utils.mjs";
7+
import { AboutWelcomeUtils } from "./lib/aboutwelcome-utils";
88
import { MultiStageAboutWelcome } from "./components/MultiStageAboutWelcome";
99
import { ReturnToAMO } from "./components/ReturnToAMO";
1010

browser/components/aboutwelcome/content-src/components/AddonsPicker.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* You can obtain one at http://mozilla.org/MPL/2.0/. */
44

55
import React from "react";
6-
import { AboutWelcomeUtils } from "../lib/aboutwelcome-utils.mjs";
6+
import { AboutWelcomeUtils } from "../lib/aboutwelcome-utils";
77
import { Localized } from "./MSLocalized";
88

99
export const AddonsPicker = props => {

browser/components/aboutwelcome/content-src/components/HelpText.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import React from "react";
66
import { Localized } from "./MSLocalized";
7-
import { AboutWelcomeUtils } from "../lib/aboutwelcome-utils.mjs";
7+
import { AboutWelcomeUtils } from "../lib/aboutwelcome-utils";
88
const MS_STRING_PROP = "string_id";
99

1010
export const HelpText = props => {

browser/components/aboutwelcome/content-src/components/HeroImage.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* You can obtain one at http://mozilla.org/MPL/2.0/. */
44

55
import React from "react";
6-
import { AboutWelcomeUtils } from "../lib/aboutwelcome-utils.mjs";
6+
import { AboutWelcomeUtils } from "../lib/aboutwelcome-utils";
77

88
export const HeroImage = props => {
99
const { height, url, alt } = props;

browser/components/aboutwelcome/content-src/components/LanguageSwitcher.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import React, { useState, useEffect } from "react";
66
import { Localized } from "./MSLocalized";
7-
import { AboutWelcomeUtils } from "../lib/aboutwelcome-utils.mjs";
7+
import { AboutWelcomeUtils } from "../lib/aboutwelcome-utils";
88

99
/**
1010
* The language switcher implements a hook that should be placed at a higher level

browser/components/aboutwelcome/content-src/components/MobileDownloads.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import React from "react";
66
import { Localized } from "./MSLocalized";
7-
import { AboutWelcomeUtils } from "../lib/aboutwelcome-utils.mjs";
7+
import { AboutWelcomeUtils } from "../lib/aboutwelcome-utils";
88

99
export const MarketplaceButtons = props => {
1010
return (

browser/components/aboutwelcome/content-src/components/MultiStageAboutWelcome.jsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@
44

55
import React, { useState, useEffect, useRef } from "react";
66
import { Localized } from "./MSLocalized";
7-
import { AboutWelcomeUtils } from "../lib/aboutwelcome-utils.mjs";
7+
import { AboutWelcomeUtils } from "../lib/aboutwelcome-utils";
88
import { MultiStageProtonScreen } from "./MultiStageProtonScreen";
99
import { useLanguageSwitcher } from "./LanguageSwitcher";
1010
import { SubmenuButton } from "./SubmenuButton";
11-
import { BASE_PARAMS, addUtmParams } from "../lib/addUtmParams.mjs";
11+
import {
12+
BASE_PARAMS,
13+
addUtmParams,
14+
} from "asrouter/content-src/templates/FirstRun/addUtmParams";
1215

1316
// Amount of milliseconds for all transitions to complete (including delays).
1417
const TRANSITION_OUT_TIME = 1000;

browser/components/aboutwelcome/content-src/components/MultiStageProtonScreen.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import React, { useEffect, useState } from "react";
66
import { Localized } from "./MSLocalized";
7-
import { AboutWelcomeUtils } from "../lib/aboutwelcome-utils.mjs";
7+
import { AboutWelcomeUtils } from "../lib/aboutwelcome-utils";
88
import { MobileDownloads } from "./MobileDownloads";
99
import { MultiSelect } from "./MultiSelect";
1010
import { Themes } from "./Themes";

0 commit comments

Comments
 (0)