From 9dfec46280e5f9b67bc2e73fb216b24115fb6555 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 11 Mar 2024 23:46:03 +0100 Subject: [PATCH] Activate no-with rule of eslint --- sao/eslint.config.mjs | 1 - sao/src/view/form.js | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sao/eslint.config.mjs b/sao/eslint.config.mjs index 09e867bb10..4f5bf31e2e 100644 --- a/sao/eslint.config.mjs +++ b/sao/eslint.config.mjs @@ -22,7 +22,6 @@ export default [ }, rules: { "no-unused-vars": ["error", { "args": "none" }], - "no-with": "off", }, }, { files: ['tests/**/*.js'], diff --git a/sao/src/view/form.js b/sao/src/view/form.js index c31efbc38f..4cbf60192f 100644 --- a/sao/src/view/form.js +++ b/sao/src/view/form.js @@ -1,6 +1,7 @@ /* This file is part of Tryton. The COPYRIGHT file at the top level of this repository contains the full copyright notices and license terms. */ +/* eslint-disable no-with */ // Must be defined in non strict context otherwise is invalid function eval_pyson(value){ with (Sao.PYSON.eval) { @@ -8,6 +9,7 @@ function eval_pyson(value){ return eval('(' + value + ')'); } } +/* eslint-enable no-with */ (function() { 'use strict';