releases-comm-central/.eslintrc.js

203 строки
6.1 KiB
JavaScript
Исходник Обычный вид История

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const path = require("path");
const xpcshellTestConfig = require("eslint-plugin-mozilla/lib/configs/xpcshell-test.js");
const browserTestConfig = require("eslint-plugin-mozilla/lib/configs/browser-test.js");
const fs = require("fs");
function readFile(filePath) {
return fs
.readFileSync(filePath, { encoding: "utf-8" })
.split("\n")
.filter(p => p && !p.startsWith("#"))
.map(p => p.replace(/^comm\//, ""));
}
const ignorePatterns = [
...readFile(path.join(__dirname, "tools", "lint", "ThirdPartyPaths.txt")),
...readFile(path.join(__dirname, "tools", "lint", "Generated.txt")),
];
const xpcshellTestPaths = [
"**/test*/unit*/",
"**/test*/xpcshell/",
"chat/**/test*/",
];
const browserTestPaths = [
"**/test*/**/browser/",
"mail/base/test/performance/",
"mail/base/test/webextensions/",
Bug 1851536 - Move tests of widgets into their own directory. r=mkmelin This patch moves tests that are generally independent of the primary UI into their own directory, which should help with reliability and efficiency of test development. Differential Revision: https://phabricator.services.mozilla.com/D199317 --HG-- rename : mail/base/test/browser/browser_formPickers.js => mail/base/test/widgets/browser_formPickers.js rename : mail/base/test/browser/browser_linkHandler.js => mail/base/test/widgets/browser_linkHandler.js rename : mail/base/test/browser/browser_menulist.js => mail/base/test/widgets/browser_menulist.js rename : mail/base/test/browser/browser_orderableTreeListbox.js => mail/base/test/widgets/browser_orderableTreeListbox.js rename : mail/base/test/browser/browser_paneSplitter.js => mail/base/test/widgets/browser_paneSplitter.js rename : mail/base/test/browser/browser_searchBar.js => mail/base/test/widgets/browser_searchBar.js rename : mail/base/test/browser/browser_selectionWidgetController.js => mail/base/test/widgets/browser_selectionWidgetController.js rename : mail/base/test/browser/browser_treeListbox.js => mail/base/test/widgets/browser_treeListbox.js rename : mail/base/test/browser/browser_treeView.js => mail/base/test/widgets/browser_treeView.js rename : mail/base/test/browser/files/links.html => mail/base/test/widgets/files/links.html rename : mail/base/test/browser/files/menulist.xhtml => mail/base/test/widgets/files/menulist.xhtml rename : mail/base/test/browser/files/orderableTreeListbox.xhtml => mail/base/test/widgets/files/orderableTreeListbox.xhtml rename : mail/base/test/browser/files/paneSplitter.xhtml => mail/base/test/widgets/files/paneSplitter.xhtml rename : mail/base/test/browser/files/sampleContent.html => mail/base/test/widgets/files/sampleContent.html rename : mail/base/test/browser/files/searchBar.xhtml => mail/base/test/widgets/files/searchBar.xhtml rename : mail/base/test/browser/files/selectionWidget.js => mail/base/test/widgets/files/selectionWidget.js rename : mail/base/test/browser/files/selectionWidget.xhtml => mail/base/test/widgets/files/selectionWidget.xhtml rename : mail/base/test/browser/files/tree-element-test-common.js => mail/base/test/widgets/files/tree-element-test-common.js rename : mail/base/test/browser/files/tree-element-test-header.js => mail/base/test/widgets/files/tree-element-test-header.js rename : mail/base/test/browser/files/tree-element-test-header.xhtml => mail/base/test/widgets/files/tree-element-test-header.xhtml rename : mail/base/test/browser/files/tree-element-test-levels.js => mail/base/test/widgets/files/tree-element-test-levels.js rename : mail/base/test/browser/files/tree-element-test-levels.xhtml => mail/base/test/widgets/files/tree-element-test-levels.xhtml rename : mail/base/test/browser/files/tree-element-test-no-header.js => mail/base/test/widgets/files/tree-element-test-no-header.js rename : mail/base/test/browser/files/tree-element-test-no-header.xhtml => mail/base/test/widgets/files/tree-element-test-no-header.xhtml rename : mail/base/test/browser/files/treeListbox.xhtml => mail/base/test/widgets/files/treeListbox.xhtml rename : mail/base/test/browser/head.js => mail/base/test/widgets/head.js extra : rebase_source : a6ac9ee6e1f21e506fd0e487a6b954c91ff44580 extra : __touch-noise__ : 349023483 extra : amend_source : 76be5aebc6c1275e212d73d9d104021f217bde1f
2024-01-23 11:20:12 +03:00
"mail/base/test/widgets/",
"mail/test/static/",
];
module.exports = {
settings: {
"import/extensions": [".mjs"],
// To avoid bad interactions of the html plugin with the xml preprocessor in
// eslint-plugin-mozilla, we turn off processing of the html plugin for .xml
// files.
"html/xml-extensions": [".xhtml"],
},
// Ignore eslint configurations in parent directories.
root: true,
env: {
es2024: true,
},
ignorePatterns,
// We would like the same base rules as provided by
// mozilla/tools/lint/eslint/eslint-plugin-mozilla/lib/configs/recommended.js
extends: [
"plugin:mozilla/recommended",
"plugin:json/recommended-with-comments-legacy",
"prettier",
],
// When adding items to this file please check for effects on sub-directories.
plugins: ["mozilla", "html", "import", "json"],
rules: {
complexity: ["error", 80],
"func-names": ["error", "never"],
"mozilla/prefer-boolean-length-check": "off",
// Enforce using `let` only when variables are reassigned.
"prefer-const": ["error", { destructuring: "all" }],
"mozilla/reject-chromeutils-import": "error",
},
overrides: [
{
files: ["*.*"],
// The browser environment is not available for system modules, sjs, workers
// or any of the xpcshell-test files.
excludedFiles: [
"*.sys.mjs",
"*.sjs",
"**/?(*.)worker.?(m)js",
...xpcshellTestPaths.map(filePath => `${filePath}**`),
],
env: {
browser: true,
},
},
{
files: ["*.*"],
env: {
"mozilla/privileged": true,
"mozilla/specific": true,
},
},
{
files: [".eslintrc.js"],
env: {
node: true,
browser: false,
},
},
{
files: ["**/test/**", "**/tests/**"],
extends: ["plugin:mozilla/general-test"],
},
{
files: ["*.mjs"],
rules: {
"import/default": "error",
"import/export": "error",
"import/named": "error",
"import/namespace": "error",
"import/newline-after-import": "error",
"import/no-duplicates": "error",
"import/no-absolute-path": "error",
"import/no-named-default": "error",
"import/no-named-as-default": "error",
"import/no-named-as-default-member": "error",
"import/no-self-import": "error",
"import/no-unassigned-import": "error",
"import/no-unresolved": [
"error",
// Bug 1773473 - Ignore resolver URLs for chrome and resource as we
// do not yet have a resolver for them.
{ ignore: ["chrome://", "resource://"] },
],
"import/no-useless-path-segments": "error",
},
},
{
files: ["mail/components/storybook/**"],
rules: {
"import/no-unresolved": "off",
},
},
{
...xpcshellTestConfig,
files: xpcshellTestPaths.map(filePath => `${filePath}**`),
rules: {
...xpcshellTestConfig.rules,
"func-names": "off",
},
excludedFiles: ["**/*.mjs", "**/*.sjs"],
},
{
Bug 1594964 - Unify linting rules for test directories. r=pmorris --HG-- rename : mailnews/mime/jsmime/test/data/base64-1 => mailnews/mime/jsmime/test/unit/data/base64-1 rename : mailnews/mime/jsmime/test/data/base64-2 => mailnews/mime/jsmime/test/unit/data/base64-2 rename : mailnews/mime/jsmime/test/data/basic1 => mailnews/mime/jsmime/test/unit/data/basic1 rename : mailnews/mime/jsmime/test/data/bug505221 => mailnews/mime/jsmime/test/unit/data/bug505221 rename : mailnews/mime/jsmime/test/data/bugmail11 => mailnews/mime/jsmime/test/unit/data/bugmail11 rename : mailnews/mime/jsmime/test/data/charsets => mailnews/mime/jsmime/test/unit/data/charsets rename : mailnews/mime/jsmime/test/data/message-encoded => mailnews/mime/jsmime/test/unit/data/message-encoded rename : mailnews/mime/jsmime/test/data/mime-torture => mailnews/mime/jsmime/test/unit/data/mime-torture rename : mailnews/mime/jsmime/test/data/multipart-base64-1 => mailnews/mime/jsmime/test/unit/data/multipart-base64-1 rename : mailnews/mime/jsmime/test/data/multipart-base64-2 => mailnews/mime/jsmime/test/unit/data/multipart-base64-2 rename : mailnews/mime/jsmime/test/data/multipart-base64-3 => mailnews/mime/jsmime/test/unit/data/multipart-base64-3 rename : mailnews/mime/jsmime/test/data/multipart-complex1 => mailnews/mime/jsmime/test/unit/data/multipart-complex1 rename : mailnews/mime/jsmime/test/data/multipart-complex2 => mailnews/mime/jsmime/test/unit/data/multipart-complex2 rename : mailnews/mime/jsmime/test/data/multipart1 => mailnews/mime/jsmime/test/unit/data/multipart1 rename : mailnews/mime/jsmime/test/data/multipart2 => mailnews/mime/jsmime/test/unit/data/multipart2 rename : mailnews/mime/jsmime/test/data/multipart3 => mailnews/mime/jsmime/test/unit/data/multipart3 rename : mailnews/mime/jsmime/test/data/multipart4 => mailnews/mime/jsmime/test/unit/data/multipart4 rename : mailnews/mime/jsmime/test/data/multipartmalt-detach => mailnews/mime/jsmime/test/unit/data/multipartmalt-detach rename : mailnews/mime/jsmime/test/data/shift-jis-image => mailnews/mime/jsmime/test/unit/data/shift-jis-image rename : mailnews/mime/jsmime/test/head_xpcshell_glue.js => mailnews/mime/jsmime/test/unit/head_xpcshell_glue.js rename : mailnews/mime/jsmime/test/mock_date.js => mailnews/mime/jsmime/test/unit/mock_date.js rename : mailnews/mime/jsmime/test/test_custom_headers.js => mailnews/mime/jsmime/test/unit/test_custom_headers.js rename : mailnews/mime/jsmime/test/test_header.js => mailnews/mime/jsmime/test/unit/test_header.js rename : mailnews/mime/jsmime/test/test_header_emitter.js => mailnews/mime/jsmime/test/unit/test_header_emitter.js rename : mailnews/mime/jsmime/test/test_mime_tree.js => mailnews/mime/jsmime/test/unit/test_mime_tree.js rename : mailnews/mime/jsmime/test/test_structured_header_emitters.js => mailnews/mime/jsmime/test/unit/test_structured_header_emitters.js rename : mailnews/mime/jsmime/test/test_structured_headers.js => mailnews/mime/jsmime/test/unit/test_structured_headers.js rename : mailnews/mime/jsmime/test/xpcshell.ini => mailnews/mime/jsmime/test/unit/xpcshell.ini
2019-11-05 06:48:02 +03:00
// If it is a test head file, we turn off global unused variable checks, as it
// would require searching the other test files to know if they are used or not.
// This would be expensive and slow, and it isn't worth it for head files.
// We could get developers to declare as exported, but that doesn't seem worth it.
Bug 1594964 - Unify linting rules for test directories. r=pmorris --HG-- rename : mailnews/mime/jsmime/test/data/base64-1 => mailnews/mime/jsmime/test/unit/data/base64-1 rename : mailnews/mime/jsmime/test/data/base64-2 => mailnews/mime/jsmime/test/unit/data/base64-2 rename : mailnews/mime/jsmime/test/data/basic1 => mailnews/mime/jsmime/test/unit/data/basic1 rename : mailnews/mime/jsmime/test/data/bug505221 => mailnews/mime/jsmime/test/unit/data/bug505221 rename : mailnews/mime/jsmime/test/data/bugmail11 => mailnews/mime/jsmime/test/unit/data/bugmail11 rename : mailnews/mime/jsmime/test/data/charsets => mailnews/mime/jsmime/test/unit/data/charsets rename : mailnews/mime/jsmime/test/data/message-encoded => mailnews/mime/jsmime/test/unit/data/message-encoded rename : mailnews/mime/jsmime/test/data/mime-torture => mailnews/mime/jsmime/test/unit/data/mime-torture rename : mailnews/mime/jsmime/test/data/multipart-base64-1 => mailnews/mime/jsmime/test/unit/data/multipart-base64-1 rename : mailnews/mime/jsmime/test/data/multipart-base64-2 => mailnews/mime/jsmime/test/unit/data/multipart-base64-2 rename : mailnews/mime/jsmime/test/data/multipart-base64-3 => mailnews/mime/jsmime/test/unit/data/multipart-base64-3 rename : mailnews/mime/jsmime/test/data/multipart-complex1 => mailnews/mime/jsmime/test/unit/data/multipart-complex1 rename : mailnews/mime/jsmime/test/data/multipart-complex2 => mailnews/mime/jsmime/test/unit/data/multipart-complex2 rename : mailnews/mime/jsmime/test/data/multipart1 => mailnews/mime/jsmime/test/unit/data/multipart1 rename : mailnews/mime/jsmime/test/data/multipart2 => mailnews/mime/jsmime/test/unit/data/multipart2 rename : mailnews/mime/jsmime/test/data/multipart3 => mailnews/mime/jsmime/test/unit/data/multipart3 rename : mailnews/mime/jsmime/test/data/multipart4 => mailnews/mime/jsmime/test/unit/data/multipart4 rename : mailnews/mime/jsmime/test/data/multipartmalt-detach => mailnews/mime/jsmime/test/unit/data/multipartmalt-detach rename : mailnews/mime/jsmime/test/data/shift-jis-image => mailnews/mime/jsmime/test/unit/data/shift-jis-image rename : mailnews/mime/jsmime/test/head_xpcshell_glue.js => mailnews/mime/jsmime/test/unit/head_xpcshell_glue.js rename : mailnews/mime/jsmime/test/mock_date.js => mailnews/mime/jsmime/test/unit/mock_date.js rename : mailnews/mime/jsmime/test/test_custom_headers.js => mailnews/mime/jsmime/test/unit/test_custom_headers.js rename : mailnews/mime/jsmime/test/test_header.js => mailnews/mime/jsmime/test/unit/test_header.js rename : mailnews/mime/jsmime/test/test_header_emitter.js => mailnews/mime/jsmime/test/unit/test_header_emitter.js rename : mailnews/mime/jsmime/test/test_mime_tree.js => mailnews/mime/jsmime/test/unit/test_mime_tree.js rename : mailnews/mime/jsmime/test/test_structured_header_emitters.js => mailnews/mime/jsmime/test/unit/test_structured_header_emitters.js rename : mailnews/mime/jsmime/test/test_structured_headers.js => mailnews/mime/jsmime/test/unit/test_structured_headers.js rename : mailnews/mime/jsmime/test/xpcshell.ini => mailnews/mime/jsmime/test/unit/xpcshell.ini
2019-11-05 06:48:02 +03:00
files: [
...browserTestPaths.map(filePath => `${filePath}head*.js`),
...xpcshellTestPaths.map(filePath => `${filePath}head*.js`),
Bug 1594964 - Unify linting rules for test directories. r=pmorris --HG-- rename : mailnews/mime/jsmime/test/data/base64-1 => mailnews/mime/jsmime/test/unit/data/base64-1 rename : mailnews/mime/jsmime/test/data/base64-2 => mailnews/mime/jsmime/test/unit/data/base64-2 rename : mailnews/mime/jsmime/test/data/basic1 => mailnews/mime/jsmime/test/unit/data/basic1 rename : mailnews/mime/jsmime/test/data/bug505221 => mailnews/mime/jsmime/test/unit/data/bug505221 rename : mailnews/mime/jsmime/test/data/bugmail11 => mailnews/mime/jsmime/test/unit/data/bugmail11 rename : mailnews/mime/jsmime/test/data/charsets => mailnews/mime/jsmime/test/unit/data/charsets rename : mailnews/mime/jsmime/test/data/message-encoded => mailnews/mime/jsmime/test/unit/data/message-encoded rename : mailnews/mime/jsmime/test/data/mime-torture => mailnews/mime/jsmime/test/unit/data/mime-torture rename : mailnews/mime/jsmime/test/data/multipart-base64-1 => mailnews/mime/jsmime/test/unit/data/multipart-base64-1 rename : mailnews/mime/jsmime/test/data/multipart-base64-2 => mailnews/mime/jsmime/test/unit/data/multipart-base64-2 rename : mailnews/mime/jsmime/test/data/multipart-base64-3 => mailnews/mime/jsmime/test/unit/data/multipart-base64-3 rename : mailnews/mime/jsmime/test/data/multipart-complex1 => mailnews/mime/jsmime/test/unit/data/multipart-complex1 rename : mailnews/mime/jsmime/test/data/multipart-complex2 => mailnews/mime/jsmime/test/unit/data/multipart-complex2 rename : mailnews/mime/jsmime/test/data/multipart1 => mailnews/mime/jsmime/test/unit/data/multipart1 rename : mailnews/mime/jsmime/test/data/multipart2 => mailnews/mime/jsmime/test/unit/data/multipart2 rename : mailnews/mime/jsmime/test/data/multipart3 => mailnews/mime/jsmime/test/unit/data/multipart3 rename : mailnews/mime/jsmime/test/data/multipart4 => mailnews/mime/jsmime/test/unit/data/multipart4 rename : mailnews/mime/jsmime/test/data/multipartmalt-detach => mailnews/mime/jsmime/test/unit/data/multipartmalt-detach rename : mailnews/mime/jsmime/test/data/shift-jis-image => mailnews/mime/jsmime/test/unit/data/shift-jis-image rename : mailnews/mime/jsmime/test/head_xpcshell_glue.js => mailnews/mime/jsmime/test/unit/head_xpcshell_glue.js rename : mailnews/mime/jsmime/test/mock_date.js => mailnews/mime/jsmime/test/unit/mock_date.js rename : mailnews/mime/jsmime/test/test_custom_headers.js => mailnews/mime/jsmime/test/unit/test_custom_headers.js rename : mailnews/mime/jsmime/test/test_header.js => mailnews/mime/jsmime/test/unit/test_header.js rename : mailnews/mime/jsmime/test/test_header_emitter.js => mailnews/mime/jsmime/test/unit/test_header_emitter.js rename : mailnews/mime/jsmime/test/test_mime_tree.js => mailnews/mime/jsmime/test/unit/test_mime_tree.js rename : mailnews/mime/jsmime/test/test_structured_header_emitters.js => mailnews/mime/jsmime/test/unit/test_structured_header_emitters.js rename : mailnews/mime/jsmime/test/test_structured_headers.js => mailnews/mime/jsmime/test/unit/test_structured_headers.js rename : mailnews/mime/jsmime/test/xpcshell.ini => mailnews/mime/jsmime/test/unit/xpcshell.ini
2019-11-05 06:48:02 +03:00
],
rules: {
"no-unused-vars": [
"error",
{
argsIgnorePattern: "^_",
vars: "local",
},
],
},
},
{
...browserTestConfig,
files: browserTestPaths.map(filePath => `${filePath}**`),
Bug 1585162 - Convert calendar Mozmill tests to Mochitest; r=pmorris --HG-- rename : calendar/test/mozmill/testBasicFunctionality.js => calendar/test/browser/browser_basicFunctionality.js rename : calendar/test/mozmill/testLocalICS.js => calendar/test/browser/browser_localICS.js rename : calendar/test/mozmill/testTimezones.js => calendar/test/browser/browser_timezones.js rename : calendar/test/mozmill/testTodayPane.js => calendar/test/browser/browser_todayPane.js rename : calendar/test/browser/browser.ini => calendar/test/browser/eventDialog/browser.ini rename : calendar/test/mozmill/eventDialog/testAlarmDialog.js => calendar/test/browser/eventDialog/browser_alarmDialog.js rename : calendar/test/mozmill/eventDialog/testEventDialog.js => calendar/test/browser/eventDialog/browser_eventDialog.js rename : calendar/test/mozmill/eventDialog/testEventDialogModificationPrompt.js => calendar/test/browser/eventDialog/browser_eventDialogModificationPrompt.js rename : calendar/test/mozmill/eventDialog/testEventDialogSize.js => calendar/test/browser/eventDialog/browser_eventDialogSize.js rename : calendar/test/mozmill/eventDialog/testUTF8.js => calendar/test/browser/eventDialog/browser_utf8.js rename : calendar/test/browser/browser.ini => calendar/test/browser/invitations/browser.ini rename : calendar/test/mozmill/invitations/test-imip-bar-eml.js => calendar/test/browser/invitations/browser_imipBarEmail.js rename : calendar/test/mozmill/invitations/message-containing-event.eml => calendar/test/browser/invitations/message-containing-event.eml rename : calendar/test/browser/browser.ini => calendar/test/browser/preferences/browser.ini rename : calendar/test/mozmill/preferences/testAlarmDefaultValue.js => calendar/test/browser/preferences/browser_alarmDefaultValue.js rename : calendar/test/mozmill/preferences/testCategoryColors.js => calendar/test/browser/preferences/browser_categoryColors.js rename : calendar/test/browser/browser.ini => calendar/test/browser/recurrence/browser.ini rename : calendar/test/mozmill/cal-recurrence/testAnnualRecurrence.js => calendar/test/browser/recurrence/browser_annual.js rename : calendar/test/mozmill/cal-recurrence/testBiweeklyRecurrence.js => calendar/test/browser/recurrence/browser_biweekly.js rename : calendar/test/mozmill/cal-recurrence/testDailyRecurrence.js => calendar/test/browser/recurrence/browser_daily.js rename : calendar/test/mozmill/cal-recurrence/testLastDayOfMonthRecurrence.js => calendar/test/browser/recurrence/browser_lastDayOfMonth.js rename : calendar/test/mozmill/cal-recurrence/testWeeklyNRecurrence.js => calendar/test/browser/recurrence/browser_weeklyN.js rename : calendar/test/mozmill/cal-recurrence/testWeeklyUntilRecurrence.js => calendar/test/browser/recurrence/browser_weeklyUntil.js rename : calendar/test/mozmill/cal-recurrence/testWeeklyWithExceptionRecurrence.js => calendar/test/browser/recurrence/browser_weeklyWithException.js rename : calendar/test/browser/browser.ini => calendar/test/browser/recurrenceRotated/browser.ini rename : calendar/test/mozmill/recurrenceRotated/testAnnualRecurrence.js => calendar/test/browser/recurrenceRotated/browser_annual.js rename : calendar/test/mozmill/recurrenceRotated/testBiweeklyRecurrence.js => calendar/test/browser/recurrenceRotated/browser_biweekly.js rename : calendar/test/mozmill/recurrenceRotated/testDailyRecurrence.js => calendar/test/browser/recurrenceRotated/browser_daily.js rename : calendar/test/mozmill/recurrenceRotated/testLastDayOfMonthRecurrence.js => calendar/test/browser/recurrenceRotated/browser_lastDayOfMonth.js rename : calendar/test/mozmill/recurrenceRotated/testWeeklyNRecurrence.js => calendar/test/browser/recurrenceRotated/browser_weeklyN.js rename : calendar/test/mozmill/recurrenceRotated/testWeeklyUntilRecurrence.js => calendar/test/browser/recurrenceRotated/browser_weeklyUntil.js rename : calendar/test/mozmill/recurrenceRotated/testWeeklyWithExceptionRecurrence.js => calendar/test/browser/recurrenceRotated/browser_weeklyWithException.js rename : calendar/test/browser/browser.ini => calendar/test/browser/views/browser.ini rename : calendar/test/mozmill/views/testDayView.js => calendar/test/browser/views/browser_dayView.js rename : calendar/test/mozmill/views/testMonthView.js => calendar/test/browser/views/browser_monthView.js rename : calendar/test/mozmill/views/testMultiweekView.js => calendar/test/browser/views/browser_multiweekView.js rename : calendar/test/mozmill/views/testTaskView.js => calendar/test/browser/views/browser_taskView.js rename : calendar/test/mozmill/views/testWeekView.js => calendar/test/browser/views/browser_weekView.js rename : calendar/test/mozmill/shared-modules/CalendarUtils.jsm => calendar/test/modules/CalendarUtils.jsm rename : calendar/test/mozmill/shared-modules/ItemEditingHelpers.jsm => calendar/test/modules/ItemEditingHelpers.jsm extra : rebase_source : 8479fe06a943576ed7f78c82c7e617ff5e0c72d5 extra : amend_source : d9c6975c52320e351a85a759d39950045f56522c
2019-09-27 07:00:10 +03:00
rules: {
...browserTestConfig.rules,
Bug 1585162 - Convert calendar Mozmill tests to Mochitest; r=pmorris --HG-- rename : calendar/test/mozmill/testBasicFunctionality.js => calendar/test/browser/browser_basicFunctionality.js rename : calendar/test/mozmill/testLocalICS.js => calendar/test/browser/browser_localICS.js rename : calendar/test/mozmill/testTimezones.js => calendar/test/browser/browser_timezones.js rename : calendar/test/mozmill/testTodayPane.js => calendar/test/browser/browser_todayPane.js rename : calendar/test/browser/browser.ini => calendar/test/browser/eventDialog/browser.ini rename : calendar/test/mozmill/eventDialog/testAlarmDialog.js => calendar/test/browser/eventDialog/browser_alarmDialog.js rename : calendar/test/mozmill/eventDialog/testEventDialog.js => calendar/test/browser/eventDialog/browser_eventDialog.js rename : calendar/test/mozmill/eventDialog/testEventDialogModificationPrompt.js => calendar/test/browser/eventDialog/browser_eventDialogModificationPrompt.js rename : calendar/test/mozmill/eventDialog/testEventDialogSize.js => calendar/test/browser/eventDialog/browser_eventDialogSize.js rename : calendar/test/mozmill/eventDialog/testUTF8.js => calendar/test/browser/eventDialog/browser_utf8.js rename : calendar/test/browser/browser.ini => calendar/test/browser/invitations/browser.ini rename : calendar/test/mozmill/invitations/test-imip-bar-eml.js => calendar/test/browser/invitations/browser_imipBarEmail.js rename : calendar/test/mozmill/invitations/message-containing-event.eml => calendar/test/browser/invitations/message-containing-event.eml rename : calendar/test/browser/browser.ini => calendar/test/browser/preferences/browser.ini rename : calendar/test/mozmill/preferences/testAlarmDefaultValue.js => calendar/test/browser/preferences/browser_alarmDefaultValue.js rename : calendar/test/mozmill/preferences/testCategoryColors.js => calendar/test/browser/preferences/browser_categoryColors.js rename : calendar/test/browser/browser.ini => calendar/test/browser/recurrence/browser.ini rename : calendar/test/mozmill/cal-recurrence/testAnnualRecurrence.js => calendar/test/browser/recurrence/browser_annual.js rename : calendar/test/mozmill/cal-recurrence/testBiweeklyRecurrence.js => calendar/test/browser/recurrence/browser_biweekly.js rename : calendar/test/mozmill/cal-recurrence/testDailyRecurrence.js => calendar/test/browser/recurrence/browser_daily.js rename : calendar/test/mozmill/cal-recurrence/testLastDayOfMonthRecurrence.js => calendar/test/browser/recurrence/browser_lastDayOfMonth.js rename : calendar/test/mozmill/cal-recurrence/testWeeklyNRecurrence.js => calendar/test/browser/recurrence/browser_weeklyN.js rename : calendar/test/mozmill/cal-recurrence/testWeeklyUntilRecurrence.js => calendar/test/browser/recurrence/browser_weeklyUntil.js rename : calendar/test/mozmill/cal-recurrence/testWeeklyWithExceptionRecurrence.js => calendar/test/browser/recurrence/browser_weeklyWithException.js rename : calendar/test/browser/browser.ini => calendar/test/browser/recurrenceRotated/browser.ini rename : calendar/test/mozmill/recurrenceRotated/testAnnualRecurrence.js => calendar/test/browser/recurrenceRotated/browser_annual.js rename : calendar/test/mozmill/recurrenceRotated/testBiweeklyRecurrence.js => calendar/test/browser/recurrenceRotated/browser_biweekly.js rename : calendar/test/mozmill/recurrenceRotated/testDailyRecurrence.js => calendar/test/browser/recurrenceRotated/browser_daily.js rename : calendar/test/mozmill/recurrenceRotated/testLastDayOfMonthRecurrence.js => calendar/test/browser/recurrenceRotated/browser_lastDayOfMonth.js rename : calendar/test/mozmill/recurrenceRotated/testWeeklyNRecurrence.js => calendar/test/browser/recurrenceRotated/browser_weeklyN.js rename : calendar/test/mozmill/recurrenceRotated/testWeeklyUntilRecurrence.js => calendar/test/browser/recurrenceRotated/browser_weeklyUntil.js rename : calendar/test/mozmill/recurrenceRotated/testWeeklyWithExceptionRecurrence.js => calendar/test/browser/recurrenceRotated/browser_weeklyWithException.js rename : calendar/test/browser/browser.ini => calendar/test/browser/views/browser.ini rename : calendar/test/mozmill/views/testDayView.js => calendar/test/browser/views/browser_dayView.js rename : calendar/test/mozmill/views/testMonthView.js => calendar/test/browser/views/browser_monthView.js rename : calendar/test/mozmill/views/testMultiweekView.js => calendar/test/browser/views/browser_multiweekView.js rename : calendar/test/mozmill/views/testTaskView.js => calendar/test/browser/views/browser_taskView.js rename : calendar/test/mozmill/views/testWeekView.js => calendar/test/browser/views/browser_weekView.js rename : calendar/test/mozmill/shared-modules/CalendarUtils.jsm => calendar/test/modules/CalendarUtils.jsm rename : calendar/test/mozmill/shared-modules/ItemEditingHelpers.jsm => calendar/test/modules/ItemEditingHelpers.jsm extra : rebase_source : 8479fe06a943576ed7f78c82c7e617ff5e0c72d5 extra : amend_source : d9c6975c52320e351a85a759d39950045f56522c
2019-09-27 07:00:10 +03:00
"func-names": "off",
},
excludedFiles: ["**/*.mjs", "**/*.sjs"],
},
{
files: [
"calendar/base/calendar.js",
"calendar/base/content/calendar-base-view.js",
"calendar/base/content/calendar-multiday-view.js",
"calendar/base/content/calendar-task-tree-view.js",
"calendar/base/content/dialogs/calendar-event-dialog-attendees.js",
"calendar/base/content/dialogs/calendar-event-dialog-recurrence.js",
"calendar/base/content/item-editing/calendar-item-editing.js",
"calendar/base/content/widgets/calendar-filter.js",
"calendar/base/content/widgets/calendar-invitation-panel.js",
"calendar/base/content/widgets/calendar-notifications-setting.js",
"calendar/base/content/widgets/datetimepickers.js",
"calendar/base/modules/calUtils.sys.mjs",
"calendar/base/modules/utils/calDateTimeFormatter.sys.mjs",
"calendar/base/modules/utils/calIteratorUtils.sys.mjs",
"calendar/base/src/CalMetronome.sys.mjs",
"chat/modules/imContentSink.sys.mjs",
"mail/components/inappnotifications/**",
],
excludedFiles: [".eslintrc.js"],
extends: ["plugin:mozilla/valid-jsdoc"],
},
],
};