eslint/rules/browser-apis
Browser: DOM, events, CSS-in-JS, web APIs and the console. Rules of ESLint, typescript-eslint and SonarJS (the Sonar way profile of SonarQube) on this subject, every rule listed; the TypeScript rules apply to TypeScript files only.
6 rules, 6 on. Source: lint/eslint/rules/browser-apis.mjs.
| Rule | Setting | Files | What it checks | Why |
|---|---|---|---|---|
no-alert | warn | JS + TS | Disallow the use of alert, confirm, and prompt | — |
no-console | warn | JS + TS | Disallow the use of console | Warn: scripts and command-line tools report on the console. |
sonarjs/no-table-as-layout | warn | JS + TS | HTML "<table>" should not be used for layout purposes | — |
sonarjs/object-alt-content | warn | JS + TS | "<object>" tags should provide an alternative content | — |
sonarjs/table-header | error | JS + TS | Tables should have headers | — |
sonarjs/table-header-reference | error | JS + TS | Table cells should reference their headers | — |