Skip to content

Commit

Permalink
Update eslint settings
Browse files Browse the repository at this point in the history
  • Loading branch information
fb55 committed Aug 24, 2020
1 parent e077a61 commit 270c6bb
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 16 deletions.
44 changes: 30 additions & 14 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,43 @@
{
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
"prettier/@typescript-eslint"
],
"extends": ["eslint:recommended", "prettier"],
"env": {
"node": true,
"es6": true
},
"rules": {
"eqeqeq": 2,
"eqeqeq": [2, "smart"],
"no-caller": 2,
"dot-notation": 2,
"no-var": 2,
"prefer-const": 2,
"prefer-arrow-callback": 2,
"prefer-arrow-callback": [2, { "allowNamedFunctions": true }],
"arrow-body-style": [2, "as-needed"],
"object-shorthand": 2,

"@typescript-eslint/explicit-function-return-type": 0,
"@typescript-eslint/explicit-member-accessibility": 0,
"@typescript-eslint/no-use-before-define": [2, { "functions": false }]
}
"prefer-template": 2,
"one-var": [2, "never"],
"prefer-destructuring": [2, { "object": true }]
},
"overrides": [
{
"files": "*.ts",
"extends": [
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint"
],
"parserOptions": {
"sourceType": "module"
},
"rules": {
"@typescript-eslint/prefer-for-of": 0,
"@typescript-eslint/member-ordering": 0,
"@typescript-eslint/explicit-function-return-type": 0,
"@typescript-eslint/no-unused-vars": 0,
"@typescript-eslint/no-use-before-define": [
2,
{ "functions": false }
]
}
}
]
}
4 changes: 2 additions & 2 deletions src/Tokenizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -572,8 +572,8 @@ export default class Tokenizer {
const entity = this._buffer.substring(
this._sectionStart + 1,
this._index
),
map: Record<string, string> = this._xmlMode
);
const map: Record<string, string> = this._xmlMode
? xmlMap
: entityMap;
if (Object.prototype.hasOwnProperty.call(map, entity)) {
Expand Down

0 comments on commit 270c6bb

Please sign in to comment.