forked from mozilla/gecko-dev
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1229142: Add shared eslintrc files for the different test suites.…
… r=Standard8 --HG-- extra : commitid : AhpmLFDapbw extra : rebase_source : 2f78e3b01a56c9fb969370967ee20acaf53bd570 extra : histedit_source : 3c8e2b70317bc799d25ff5c6012aa878feecc668
- Loading branch information
Showing
8 changed files
with
182 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,10 @@ | ||
// Parent config file for all devtools browser mochitest files. | ||
{ | ||
"rules": { | ||
// Only disallow non-global unused vars, so that head.js does not produce | ||
// errors. | ||
"no-unused-vars": [2, {"vars": "local"}] | ||
}, | ||
"extends": [ | ||
"../testing/mochitest/browser.eslintrc" | ||
], | ||
// All globals made available in the test environment. | ||
"globals": { | ||
"add_task": true, | ||
"Assert": true, | ||
"BrowserTestUtils": true, | ||
"content": true, | ||
"ContentTask": true, | ||
"document": true, | ||
"EventUtils": true, | ||
"executeSoon": true, | ||
"export_assertions": true, | ||
"finish": true, | ||
"gBrowser": true, | ||
"gDevTools": true, | ||
"getRootDirectory": true, | ||
"getTestFilePath": true, | ||
"gTestPath": true, | ||
"info": true, | ||
"is": true, | ||
"isnot": true, | ||
"navigator": true, | ||
"ok": true, | ||
"promise": true, | ||
"registerCleanupFunction": true, | ||
"requestLongerTimeout": true, | ||
"setTimeout": true, | ||
"SimpleTest": true, | ||
"SpecialPowers": true, | ||
"todo": true, | ||
"todo_is": true, | ||
"todo_isnot": true, | ||
"waitForClipboard": true, | ||
"waitForExplicitFinish": true, | ||
"waitForFocus": true, | ||
"window": true, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,17 @@ | ||
// Parent config file for all devtools browser mochitest files. | ||
{ | ||
"extends": [ | ||
"../testing/xpcshell/xpcshell.eslintrc" | ||
], | ||
"rules": { | ||
// Allow non-camelcase so that run_test doesn't produce a warning. | ||
"camelcase": 0, | ||
// Only disallow non-global unused vars, so that things like the test | ||
// function do not produce errors. | ||
"no-unused-vars": [2, {"vars": "local"}], | ||
// Allow using undefined variables so that tests can refer to functions | ||
// and variables defined in head.js files, without having to maintain a | ||
// list of globals in each .eslintrc file. | ||
// Note that bug 1168340 will eventually help auto-registering globals | ||
// from head.js files. | ||
"no-undef": 0, | ||
"block-scoped-var": 0 | ||
}, | ||
// All globals made available in the test environment. | ||
"globals": { | ||
"add_task": true, | ||
"add_test": true, | ||
"Assert": true, | ||
"deepEqual": true, | ||
"do_check_eq": true, | ||
"do_check_false": true, | ||
"do_check_neq": true, | ||
"do_check_null": true, | ||
"do_check_true": true, | ||
"do_execute_soon": true, | ||
"do_get_cwd": true, | ||
"do_get_file": true, | ||
"do_get_idle": true, | ||
"do_get_profile": true, | ||
"do_load_module": true, | ||
"do_parse_document": true, | ||
"do_print": true, | ||
"do_register_cleanup": true, | ||
"do_test_finished": true, | ||
"do_test_pending": true, | ||
"do_throw": true, | ||
"do_timeout": true, | ||
"equal": true, | ||
"load": true, | ||
"notDeepEqual": true, | ||
"notEqual": true, | ||
"notStrictEqual": true, | ||
"ok": true, | ||
"run_next_test": true, | ||
"run_test": true, | ||
"strictEqual": true, | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// Parent config file for all browser-chrome files. | ||
{ | ||
"rules": { | ||
// Head files want to define globals so don't warn for unused globals | ||
"no-unused-vars": [2, {"vars": "local", "args": "none"}], | ||
"mozilla/import-headjs-globals": 1, | ||
"mozilla/import-browserjs-globals": 1, | ||
}, | ||
|
||
"env": { | ||
"browser": true, | ||
}, | ||
|
||
// All globals made available in the test environment. | ||
"globals": { | ||
"add_task": false, | ||
"Assert": false, | ||
"BrowserTestUtils": false, | ||
"ContentTask": false, | ||
"EventUtils": false, | ||
"executeSoon": false, | ||
"export_assertions": false, | ||
"finish": false, | ||
"getRootDirectory": false, | ||
"getTestFilePath": false, | ||
"gTestPath": false, | ||
"info": false, | ||
"is": false, | ||
"isnot": false, | ||
"ok": false, | ||
"promise": false, | ||
"registerCleanupFunction": false, | ||
"requestLongerTimeout": false, | ||
"SimpleTest": false, | ||
"SpecialPowers": false, | ||
"todo": false, | ||
"todo_is": false, | ||
"todo_isnot": false, | ||
"waitForClipboard": false, | ||
"waitForExplicitFinish": false, | ||
"waitForFocus": false, | ||
"gBrowser": false, | ||
"gNavToolbox": false, | ||
"gURLBar": false, | ||
"gNavigatorBundle": false, | ||
"content": false, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// Parent config file for all mochitest files. | ||
{ | ||
rules: { | ||
// Head files want to define globals so don't warn for unused globals | ||
"no-unused-vars": [2, {"vars": "local", "args": "none"}], | ||
"mozilla/import-headjs-globals": 1, | ||
}, | ||
|
||
"env": { | ||
"browser": true, | ||
}, | ||
|
||
// All globals made available in the test environment. | ||
"globals": { | ||
"add_task": false, | ||
"Assert": false, | ||
"EventUtils": false, | ||
"executeSoon": false, | ||
"export_assertions": false, | ||
"finish": false, | ||
"getRootDirectory": false, | ||
"getTestFilePath": false, | ||
"gTestPath": false, | ||
"info": false, | ||
"is": false, | ||
"isnot": false, | ||
"ok": false, | ||
"promise": false, | ||
"registerCleanupFunction": false, | ||
"requestLongerTimeout": false, | ||
"SimpleTest": false, | ||
"SpecialPowers": false, | ||
"todo": false, | ||
"todo_is": false, | ||
"todo_isnot": false, | ||
"waitForClipboard": false, | ||
"waitForExplicitFinish": false, | ||
"waitForFocus": false, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// Parent config file for all mochitest files. | ||
{ | ||
rules: { | ||
// Head files want to define globals so don't warn for unused globals | ||
"no-unused-vars": [2, {"vars": "local", "args": "none"}], | ||
"mozilla/import-headjs-globals": 1, | ||
}, | ||
|
||
"env": { | ||
"browser": true, | ||
}, | ||
|
||
// All globals made available in the test environment. | ||
"globals": { | ||
"add_task": false, | ||
"Assert": false, | ||
"EventUtils": false, | ||
"executeSoon": false, | ||
"export_assertions": false, | ||
"finish": false, | ||
"getRootDirectory": false, | ||
"getTestFilePath": false, | ||
"gTestPath": false, | ||
"info": false, | ||
"is": false, | ||
"isnot": false, | ||
"ok": false, | ||
"promise": false, | ||
"registerCleanupFunction": false, | ||
"requestLongerTimeout": false, | ||
"SimpleTest": false, | ||
"SpecialPowers": false, | ||
"todo": false, | ||
"todo_is": false, | ||
"todo_isnot": false, | ||
"waitForClipboard": false, | ||
"waitForExplicitFinish": false, | ||
"waitForFocus": false, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// Parent config file for all xpcshell files. | ||
{ | ||
rules: { | ||
// Head files want to define globals so don't warn for unused globals | ||
"no-unused-vars": [2, {"vars": "local", "args": "none"}], | ||
"mozilla/import-headjs-globals": 1, | ||
}, | ||
|
||
// All globals made available in the test environment. | ||
"globals": { | ||
"add_task": false, | ||
"add_test": false, | ||
"Assert": false, | ||
"deepEqual": false, | ||
"do_check_eq": false, | ||
"do_check_false": false, | ||
"do_check_neq": false, | ||
"do_check_null": false, | ||
"do_check_true": false, | ||
"do_execute_soon": false, | ||
"do_get_cwd": false, | ||
"do_get_file": false, | ||
"do_get_idle": false, | ||
"do_get_profile": false, | ||
"do_load_module": false, | ||
"do_parse_document": false, | ||
"do_print": false, | ||
"do_register_cleanup": false, | ||
"do_test_finished": false, | ||
"do_test_pending": false, | ||
"do_throw": false, | ||
"do_timeout": false, | ||
"equal": false, | ||
"load": false, | ||
"notDeepEqual": false, | ||
"notEqual": false, | ||
"notStrictEqual": false, | ||
"ok": false, | ||
"run_next_test": false, | ||
"run_test": false, | ||
"strictEqual": false, | ||
} | ||
} |