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';