Skip to content

Commit

Permalink
chore(eslint): add unicorn/prefer-dom-node-text-content rule (#2869)
Browse files Browse the repository at this point in the history
  • Loading branch information
csouchet authored Sep 21, 2023
1 parent b7607cb commit 01e730f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ module.exports = {
'unicorn/prefer-query-selector': 'error',
'unicorn/prefer-add-event-listener': 'error',
'unicorn/no-array-for-each': 'error',
'unicorn/prefer-dom-node-text-content': 'error',
'import/newline-after-import': ['error', { count: 1 }],
'import/first': 'error',
'import/order': [
Expand Down
4 changes: 2 additions & 2 deletions dev/ts/pages/bpmn-rendering.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import { documentReady, log, logError, startBpmnVisualization } from '../develop

function statusFetchKO(errorMessage: string): void {
logError(errorMessage);
const statusElt = document.querySelector('#status-zone') as HTMLDivElement;
statusElt.innerText = errorMessage;
const statusElt = document.querySelector<HTMLDivElement>('#status-zone');
statusElt.textContent = errorMessage;
statusElt.className = 'status-ko';
log('Status zone set with error:', errorMessage);
}
Expand Down
4 changes: 2 additions & 2 deletions dev/ts/pages/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ function configureDisplayedFooterContent(): void {
const version = getVersion();
const versionAsString = `bpmn-visualization@${version.lib}`;
const dependenciesAsString = [...version.dependencies].map(([name, version]) => `${name}@${version}`).join('/');
const versionElt = document.querySelector('#footer-content') as HTMLDivElement;
versionElt.innerText = `${versionAsString} with ${dependenciesAsString}`;
const versionElt = document.querySelector<HTMLDivElement>('#footer-content');
versionElt.textContent = `${versionAsString} with ${dependenciesAsString}`;
}

// The following function `preventZoomingPage` serves to block the page content zoom.
Expand Down

0 comments on commit 01e730f

Please sign in to comment.