Skip to content

Commit

Permalink
Explicitly disable eslint rule for polyfill
Browse files Browse the repository at this point in the history
  • Loading branch information
dpilafian committed Aug 27, 2024
1 parent 0f93378 commit dab9f8d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"devDependencies": {
"@eslint/js": "~9.9",
"@fortawesome/fontawesome-free": "~6.6",
"@types/node": "~22.3",
"@types/node": "~22.5",
"add-dist-header": "~1.4",
"assert-deep-strict-equal": "~1.2",
"copy-file-util": "~1.2",
Expand All @@ -102,7 +102,7 @@
"rimraf": "~6.0",
"run-scripts-util": "~1.3",
"typescript": "~5.5",
"typescript-eslint": "~8.1",
"typescript-eslint": "~8.3",
"uglify-js": "~3.19",
"w3c-html-validator": "~1.8"
}
Expand Down
4 changes: 2 additions & 2 deletions src/js/lib-x.ts
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ const libXUi = {
normalize(container: Element = globalThis.document.body): Element {
const rawInput = (elem: Element) => (<HTMLInputElement>elem).spellcheck = false;
const makeImageLink = (elem: Element) => elem.closest('a')!.classList.add('image-link');
const openInNewTab = (elem: Element) => (<HTMLLinkElement>elem).target = '_blank';
const openInNewTab = (elem: Element) => (<HTMLLinkElement>elem).target = '_blank'; //eslint-disable-line
container.querySelectorAll('button:not([type])').forEach(elem => (<HTMLButtonElement>elem).type = 'button');
container.querySelectorAll('button:not([tabindex])').forEach(elem => (<HTMLButtonElement>elem).tabIndex = 0); //enable focus on tab
container.querySelectorAll('input:not([type])').forEach(elem => (<HTMLInputElement>elem).type = 'text');
Expand Down Expand Up @@ -797,7 +797,7 @@ const libXBrowser = {
const polyfill = (): NavigatorUAData => {
const brandEntry = globalThis.navigator.userAgent.split(' ').pop()?.split('/') ?? [];
const hasTouch = !!navigator.maxTouchPoints;
const platform = globalThis.navigator.platform;
const platform = globalThis.navigator.platform; //eslint-disable-line
const mac = hasTouch ? 'iOS' : 'macOS';
const platforms: { [platform: string]: string} =
{ 'MacIntel': mac, 'Win32': 'Windows', 'iPhone': 'iOS', 'iPad': 'iOS' };
Expand Down

0 comments on commit dab9f8d

Please sign in to comment.