You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, we are using no-restricted-syntax config blocks to preventively ban querySelectorquerySeletorAll and getElementById. One of the issues with this is the warning messages don't allow us to add clickable links to the description of the error:
message: `Using document.querySelector() can give unexpected results, especially if multiple elements match the query (for example, when the component is used more than once); as a piece of advice, use State or Refs instead
message: `Using document.querySelectorAll() can give unexpected results, especially if multiple elements match the query (for example, when the component is used more than once); as a piece of advice, use State or Refs instead
message: `Using document.getElementById() can give unexpected results, especially if multiple elements match the query (for example, when the component is used more than once); as a piece of advice, use State or Refs instead
Currently, we are using
no-restricted-syntax
config blocks to preventively banquerySelector
querySeletorAll
andgetElementById
. One of the issues with this is the warning messages don't allow us to add clickable links to the description of the error:One way to solve this Is moving these checks into a new custom ESLint rule:
eslint-config-upleveled/index.cjs
Lines 168 to 191 in 085d47f
The text was updated successfully, but these errors were encountered: