[FIX] web, test_lint: add editor libs global constants to eslint config

Odoo Editor uses chai/mocha for testing. Since it was moved into Odoo,
we need chai's global constants to be recognized by eslint. The same
thing applies to DOMPurify.

Part-of: odoo/odoo#94516
This commit is contained in:
Antoine Guenet
2022-07-04 18:53:06 +02:00
parent c35cee3078
commit 62590e7c60
3 changed files with 9 additions and 1 deletions
@@ -62,6 +62,7 @@ import { TablePicker } from './tablepicker/TablePicker.js';
export * from './utils/utils.js';
import { UNBREAKABLE_ROLLBACK_CODE, UNREMOVABLE_ROLLBACK_CODE } from './utils/constants.js';
/* global DOMPurify */
const BACKSPACE_ONLY_COMMANDS = ['oDeleteBackward', 'oDeleteForward'];
const BACKSPACE_FIRST_COMMANDS = BACKSPACE_ONLY_COMMANDS.concat(['oEnter', 'oShiftEnter']);
@@ -12,6 +12,7 @@ import './spec/fontAwesome.test.js';
import './spec/autostep.test.js';
import './spec/urlRegex.test.js';
import './spec/collab.test.js';
/* global mocha */
mocha.run(failures => {
if (failures) {
+7 -1
View File
@@ -35,6 +35,12 @@
"moment": "readonly",
"py": "readonly",
"ClipboardJS": "readonly",
"globalThis": "readonly"
"globalThis": "readonly",
"module": "readonly",
"chai": "readonly",
"describe": "readonly",
"it": "readonly",
"mocha": "readonly",
"DOMPurify": "readonly"
}
}