summaryrefslogtreecommitdiffstats
path: root/tools/lint/eslint/eslint-plugin-mozilla/lib/configs/browser-test.js
blob: 596815c85020d345fadb6f84120bf524b901f328 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
// Parent config file for all browser-chrome files.
"use strict";

module.exports = {
  env: {
    browser: true,
    "mozilla/browser-window": true,
    "mozilla/simpletest": true,
    // "node": true
  },

  // All globals made available in the test environment.
  globals: {
    // `$` is defined in SimpleTest.js
    $: false,
    Assert: false,
    BrowserTestUtils: false,
    ContentTask: false,
    ContentTaskUtils: false,
    EventUtils: false,
    PromiseDebugging: false,
    SpecialPowers: false,
    TestUtils: false,
    XPCNativeWrapper: false,
    addLoadEvent: false,
    add_task: false,
    content: false,
    executeSoon: false,
    expectUncaughtException: false,
    export_assertions: false,
    extractJarToTmp: false,
    finish: false,
    gTestPath: false,
    getChromeDir: false,
    getJar: false,
    getResolvedURI: false,
    getRootDirectory: false,
    getTestFilePath: false,
    ignoreAllUncaughtExceptions: false,
    info: false,
    is: false,
    isnot: false,
    ok: false,
    record: false,
    registerCleanupFunction: false,
    requestLongerTimeout: false,
    setExpectedFailuresForSelfTest: false,
    todo: false,
    todo_is: false,
    todo_isnot: false,
    waitForClipboard: false,
    waitForExplicitFinish: false,
    waitForFocus: false,
  },

  plugins: ["mozilla"],

  rules: {
    "mozilla/import-content-task-globals": "error",
    "mozilla/import-headjs-globals": "error",
    "mozilla/mark-test-function-used": "error",
    "mozilla/no-arbitrary-setTimeout": "error",
  },
};