[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:
@@ -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) {
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user