Browse Source

Bump eslint & update CS

pull/570/head
Vitaly Puzrin 6 years ago
parent
commit
c36309ef1c
  1. 2
      .eslintrc.yml
  2. 5
      lib/common/utils.js
  3. 2
      package.json

2
.eslintrc.yml

@ -28,7 +28,7 @@ rules:
guard-for-in: 2 guard-for-in: 2
handle-callback-err: 2 handle-callback-err: 2
indent: [ 2, 2, { VariableDeclarator: { var: 2, let: 2, const: 3 }, SwitchCase: 1 } ] indent: [ 2, 2, { VariableDeclarator: { var: 2, let: 2, const: 3 }, SwitchCase: 1, ignoreComments: true } ]
# key-spacing: [ 2, { "align": "value" } ] # key-spacing: [ 2, { "align": "value" } ]
keyword-spacing: 2 keyword-spacing: 2

5
lib/common/utils.js

@ -88,9 +88,8 @@ function replaceEntityPattern(match, name) {
if (name.charCodeAt(0) === 0x23/* # */ && DIGITAL_ENTITY_TEST_RE.test(name)) { if (name.charCodeAt(0) === 0x23/* # */ && DIGITAL_ENTITY_TEST_RE.test(name)) {
code = name[1].toLowerCase() === 'x' ? code = name[1].toLowerCase() === 'x' ?
parseInt(name.slice(2), 16) parseInt(name.slice(2), 16) : parseInt(name.slice(1), 10);
:
parseInt(name.slice(1), 10);
if (isValidEntityCode(code)) { if (isValidEntityCode(code)) {
return fromCodePoint(code); return fromCodePoint(code);
} }

2
package.json

@ -38,7 +38,7 @@
"browserify": "^16.3.0", "browserify": "^16.3.0",
"chai": "^4.2.0", "chai": "^4.2.0",
"coveralls": "^3.0.4", "coveralls": "^3.0.4",
"eslint": "^3.5.0", "eslint": "^6.0.1",
"express": "^4.14.0", "express": "^4.14.0",
"highlight.js": "^9.2.0", "highlight.js": "^9.2.0",
"istanbul": "^0.4.5", "istanbul": "^0.4.5",

Loading…
Cancel
Save