Activate no-with rule of eslint

This commit is contained in:
Cédric Krier committed 2024-03-11 23:46:03 +01:00
1 parent 58e2e9f70d
commit 9dfec46280
2 files changed
+2 -1

No files matched your search

-1
View File
@@ -22,7 +22,6 @@ export default [
},
rules: {
"no-unused-vars": ["error", { "args": "none" }],
"no-with": "off",
},
}, {
files: ['tests/**/*.js'],
+2
View File
@@ -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';