Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(eslint): add unicorn/prefer-dom-node-text-content rule #2869

Merged
merged 3 commits into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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