mirror of
https://github.com/bobwen-dev/react-templates
synced 2025-04-12 00:56:39 +02:00
added eslint rules: no-new-require, block-scoped-var and fixed errors
This commit is contained in:
parent
be588db1ab
commit
93e8c59e37
@ -24,7 +24,7 @@
|
||||
"no-mixed-requires": [0, false],
|
||||
"no-negated-in-lhs": 2,
|
||||
"no-nested-ternary": 2,
|
||||
"no-new-require": 0,
|
||||
"no-new-require": 2,
|
||||
"no-octal-escape": 2,
|
||||
"no-path-concat": 1,
|
||||
"no-process-exit": 2,
|
||||
@ -47,7 +47,7 @@
|
||||
"no-wrap-func": 2,
|
||||
"yoda": 2,
|
||||
|
||||
"block-scoped-var": 0,
|
||||
"block-scoped-var": 2,
|
||||
"brace-style": [2, "1tbs", { "allowSingleLine": true }],
|
||||
"consistent-return": 2,
|
||||
"consistent-this": [0, "self", "TODO: add this options, remove this value in array"],
|
||||
|
@ -78,7 +78,8 @@ function convertText(node, context, txt) {
|
||||
first = false;
|
||||
}
|
||||
var curlyCounter = 1;
|
||||
for (var end = start + 1; end < txt.length && curlyCounter > 0; end++) {
|
||||
var end;
|
||||
for (end = start + 1; end < txt.length && curlyCounter > 0; end++) {
|
||||
curlyCounter += curlyMap[txt.charAt(end)] || 0;
|
||||
}
|
||||
if (curlyCounter !== 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user