From 75c69aeb38d700d633f723c3d02095b1953c646b Mon Sep 17 00:00:00 2001 From: "Louis Wicket (wil)" Date: Thu, 17 Aug 2023 14:05:52 +0000 Subject: [PATCH] [IMP] account, web_editor, base: remove useless use strict MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit According to the ECMAScript 2023 Language Specification: > Module code is always strict mode code. Odoo Modules mimic this behavior and automatically add “use strict“ at the top of the file, so there's no need to do it yourself. This commit removes all the useless occurrences of use strict. closes odoo/odoo#132235 Related: odoo/enterprise#45908 Signed-off-by: Sébastien Theys (seb) --- addons/account/static/tests/account_move_form_tests.js | 1 - addons/account/static/tests/tours/tax_group_tests.js | 1 - addons/web_editor/static/src/js/backend/convert_inline.js | 1 - addons/web_editor/static/src/js/common/grid_layout_utils.js | 1 - .../static/src/js/editor/odoo-editor/src/OdooEditor.js | 1 - .../base/static/tests/test_ir_model_fields_translation.js | 2 -- 6 files changed, 7 deletions(-) diff --git a/addons/account/static/tests/account_move_form_tests.js b/addons/account/static/tests/account_move_form_tests.js index 3303110b3b0..43273b55971 100644 --- a/addons/account/static/tests/account_move_form_tests.js +++ b/addons/account/static/tests/account_move_form_tests.js @@ -1,5 +1,4 @@ /** @odoo-module **/ -"use strict"; import { start, startServer } from "@mail/../tests/helpers/test_utils"; import { patchWithCleanup } from "@web/../tests/helpers/utils"; diff --git a/addons/account/static/tests/tours/tax_group_tests.js b/addons/account/static/tests/tours/tax_group_tests.js index 9f8b87ca63f..88fc5d83883 100644 --- a/addons/account/static/tests/tours/tax_group_tests.js +++ b/addons/account/static/tests/tours/tax_group_tests.js @@ -1,5 +1,4 @@ /** @odoo-module */ -"use strict"; import { registry } from "@web/core/registry"; import { stepUtils } from "@web_tour/tour_service/tour_utils"; diff --git a/addons/web_editor/static/src/js/backend/convert_inline.js b/addons/web_editor/static/src/js/backend/convert_inline.js index f1d08c48730..66fef131345 100644 --- a/addons/web_editor/static/src/js/backend/convert_inline.js +++ b/addons/web_editor/static/src/js/backend/convert_inline.js @@ -1,5 +1,4 @@ /** @odoo-module */ -'use strict'; import { getAdjacentPreviousSiblings, isBlock, rgbToHex, commonParentGet } from '../editor/odoo-editor/src/utils/utils'; diff --git a/addons/web_editor/static/src/js/common/grid_layout_utils.js b/addons/web_editor/static/src/js/common/grid_layout_utils.js index 5cf346fd89b..eb4ffe91c68 100644 --- a/addons/web_editor/static/src/js/common/grid_layout_utils.js +++ b/addons/web_editor/static/src/js/common/grid_layout_utils.js @@ -1,5 +1,4 @@ /** @odoo-module **/ -'use strict'; import { renderToElement } from "@web/core/utils/render"; import {descendants, preserveCursor} from "@web_editor/js/editor/odoo-editor/src/utils/utils"; diff --git a/addons/web_editor/static/src/js/editor/odoo-editor/src/OdooEditor.js b/addons/web_editor/static/src/js/editor/odoo-editor/src/OdooEditor.js index 6661daab2a3..8e299ab276c 100644 --- a/addons/web_editor/static/src/js/editor/odoo-editor/src/OdooEditor.js +++ b/addons/web_editor/static/src/js/editor/odoo-editor/src/OdooEditor.js @@ -1,5 +1,4 @@ /** @odoo-module **/ -'use strict'; import './commands/deleteBackward.js'; import './commands/deleteForward.js'; diff --git a/odoo/addons/base/static/tests/test_ir_model_fields_translation.js b/odoo/addons/base/static/tests/test_ir_model_fields_translation.js index 99095c37461..34ad80c27bf 100644 --- a/odoo/addons/base/static/tests/test_ir_model_fields_translation.js +++ b/odoo/addons/base/static/tests/test_ir_model_fields_translation.js @@ -1,7 +1,5 @@ /** @odoo-module **/ -"use strict"; - import { registry } from "@web/core/registry"; import { stepUtils } from "@web_tour/tour_service/tour_utils"; function checkLoginColumn(translation) {