Activate no-constant-condition rule of eslint

This commit is contained in:
Cédric Krier
2024-03-11 23:37:56 +01:00
parent f1f04dbc5b
commit 9140665f5a
3 changed files with 10 additions and 12 deletions
-1
View File
@@ -21,7 +21,6 @@ export default [
},
},
rules: {
"no-constant-condition": "off",
"no-empty": "off",
"no-extra-boolean-cast": "off",
"no-prototype-builtins": "off",
+6 -6
View File
@@ -1022,7 +1022,8 @@
read_token: function() {
var quoted = false;
var escapedstate = ' ';
while (true) {
const always = true;
while (always) {
var nextchar = this.instream.read(1);
if (this.state === null) {
this.token = ''; // past en of file
@@ -1166,13 +1167,12 @@
try {
var lex = new Sao.common.udlex(input);
var tokens = [];
while (true) {
do {
var token = lex.next();
if (token === null) {
break;
if (token !== null) {
tokens.push(token);
}
tokens.push(token);
}
} while (token !== null);
tokens = this.group_operator(tokens);
tokens = this.parenthesize(tokens);
tokens = this.group(tokens);
+4 -5
View File
@@ -1505,13 +1505,12 @@
var udlex = function(input) {
var lex = new Sao.common.udlex(input);
var tokens = [];
while (true) {
do {
var token = lex.next();
if (token === null) {
break;
if (token !== null) {
tokens.push(token);
}
tokens.push(token);
}
} while (token !== null);
return tokens;
};
var c = function(clause) {