Enable some more eslint checks
This commit is contained in:
parent
9256397e46
commit
8030e7b5d6
3 changed files with 20 additions and 5 deletions
|
@ -44,7 +44,7 @@ L.OSM.Map = L.Map.extend({
|
|||
}
|
||||
|
||||
this.baseLayers.push(new L.OSM.HOT({
|
||||
attribution: copyright + ". Tiles style by <a href='https://www.hotosm.org/' target='_blank'>Humanitarian OpenStreetMap Team</a>" + " hosted by <a href='https://openstreetmap.fr/' target='_blank'>OpenStreetMap France</a>",
|
||||
attribution: copyright + ". Tiles style by <a href='https://www.hotosm.org/' target='_blank'>Humanitarian OpenStreetMap Team</a> hosted by <a href='https://openstreetmap.fr/' target='_blank'>OpenStreetMap France</a>",
|
||||
code: "H",
|
||||
keyid: "hot",
|
||||
name: I18n.t("javascripts.map.base.hot")
|
||||
|
@ -136,9 +136,10 @@ L.OSM.Map = L.Map.extend({
|
|||
// done in two parts. each of the parts c1/c2 has 30 bits of the total in it
|
||||
// and drops the last 4 bits of the full 64 bit Morton code.
|
||||
c1 = interlace(x >>> 17, y >>> 17), c2 = interlace((x >>> 2) & 0x7fff, (y >>> 2) & 0x7fff),
|
||||
digit;
|
||||
digit,
|
||||
i;
|
||||
|
||||
for (var i = 0; i < Math.ceil((zoom + 8) / 3.0) && i < 5; ++i) {
|
||||
for (i = 0; i < Math.ceil((zoom + 8) / 3.0) && i < 5; ++i) {
|
||||
digit = (c1 >> (24 - 6 * i)) & 0x3f;
|
||||
str += char_array.charAt(digit);
|
||||
}
|
||||
|
|
|
@ -313,7 +313,7 @@ L.OSM.share = function (options) {
|
|||
"\"": """,
|
||||
"'": "'"
|
||||
};
|
||||
return string === null ? "" : (string + "").replace(/[&<>"']/g, function(match) {
|
||||
return string === null ? "" : String(string).replace(/[&<>"']/g, function(match) {
|
||||
return htmlEscapes[match];
|
||||
});
|
||||
}
|
||||
|
|
|
@ -17,14 +17,22 @@
|
|||
"updateLinks": "readonly"
|
||||
},
|
||||
"rules": {
|
||||
"accessor-pairs": "error",
|
||||
"array-callback-return": "error",
|
||||
"block-scoped-var": "error",
|
||||
"dot-notation": "error",
|
||||
"eqeqeq": ["error", "smart"],
|
||||
"keyword-spacing": "error",
|
||||
"no-alert": "warn",
|
||||
"no-caller": "error",
|
||||
"no-div-regex": "error",
|
||||
"no-eval": "error",
|
||||
"no-extend-native": "error",
|
||||
"no-extra-bind": "error",
|
||||
"no-extra-label": "error",
|
||||
"no-floating-decimal": "error",
|
||||
"no-implicit-coercion": "warn",
|
||||
"no-implicit-globals": "warn",
|
||||
"no-implied-eval": "error",
|
||||
"no-iterator": "error",
|
||||
"no-labels": "error",
|
||||
|
@ -44,9 +52,13 @@
|
|||
"no-shadow-restricted-names": "error",
|
||||
"no-throw-literal": "error",
|
||||
"no-trailing-spaces": "error",
|
||||
"no-unmodified-loop-condition": "error",
|
||||
"no-unneeded-ternary": "error",
|
||||
"no-unused-expressions": "off",
|
||||
"no-unused-vars": "error",
|
||||
"no-useless-call": "error",
|
||||
"no-useless-concat": "error",
|
||||
"no-useless-return": "error",
|
||||
"no-use-before-define": ["error", {"functions": false}],
|
||||
"no-void": "error",
|
||||
"no-warning-comments": "warn",
|
||||
|
@ -56,6 +68,8 @@
|
|||
"semi": ["error", "always"],
|
||||
"semi-spacing": "error",
|
||||
"space-unary-ops": "error",
|
||||
"wrap-regex": "off"
|
||||
"wrap-iife": "error",
|
||||
"wrap-regex": "error",
|
||||
"yoda": "error"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue