summaryrefslogtreecommitdiffstats
path: root/browser/components/newtab/test/.eslintrc.js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
commit36d22d82aa202bb199967e9512281e9a53db42c9 (patch)
tree105e8c98ddea1c1e4784a60a5a6410fa416be2de /browser/components/newtab/test/.eslintrc.js
parentInitial commit. (diff)
downloadfirefox-esr-upstream.tar.xz
firefox-esr-upstream.zip
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--browser/components/newtab/test/.eslintrc.js41
1 files changed, 41 insertions, 0 deletions
diff --git a/browser/components/newtab/test/.eslintrc.js b/browser/components/newtab/test/.eslintrc.js
new file mode 100644
index 0000000000..5f6628d816
--- /dev/null
+++ b/browser/components/newtab/test/.eslintrc.js
@@ -0,0 +1,41 @@
+/* eslint-disable import/no-commonjs */
+// This config doesn't inhert from top-level eslint config Bug 1780031
+
+const xpcshellTestPaths = ["./unit*/**", "./xpcshell/**"];
+module.exports = {
+ env: {
+ mocha: true,
+ },
+ globals: {
+ assert: true,
+ chai: true,
+ sinon: true,
+ },
+ rules: {
+ "func-name-matching": 0,
+ "import/no-commonjs": 2,
+ "lines-between-class-members": 0,
+ "react/jsx-no-bind": 0,
+ "require-await": 0,
+ },
+ overrides: [
+ {
+ // Exempt all files without a 'test' string in their path name since no-insecure-url
+ // is focussing on the test base
+ files: "*",
+ excludedFiles: ["**/test**", "**/test*/**", "Test*/**"],
+ rules: {
+ "@microsoft/sdl/no-insecure-url": "off",
+ },
+ },
+ {
+ // Disable "no-insecure-url" for all xpcshell test
+ files: xpcshellTestPaths.map(path => `${path}`),
+ rules: {
+ // As long "new HttpServer()" does not support https there is no reason to log warnings
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=1742061
+ "@microsoft/sdl/no-insecure-url": "off",
+ },
+ },
+ ],
+};