8000 eslint-plugin-github/docs/rules/no-d-none.md at v5.1.8 · github/eslint-plugin-github · GitHub
[go: up one dir, main page]

Skip to content
{"payload":{"allShortcutsEnabled":false,"fileTree":{"docs/rules":{"items":[{"name":"a11y-aria-label-is-well-formatted.md","path":"docs/rules/a11y-aria-label-is-well-formatted.md","contentType":"file"},{"name":"a11y-no-generic-link-text.md","path":"docs/rules/a11y-no-generic-link-text.md","contentType":"file"},{"name":"a11y-no-title-attribute.md","path":"docs/rules/a11y-no-title-attribute.md","contentType":"file"},{"name":"a11y-no-visually-hidden-interactive-element.md","path":"docs/rules/a11y-no-visually-hidden-interactive-element.md","contentType":"file"},{"name":"a11y-role-supports-aria-props.md","path":"docs/rules/a11y-role-supports-aria-props.md","contentType":"file"},{"name":"a11y-svg-has-accessible-name.md","path":"docs/rules/a11y-svg-has-accessible-name.md","contentType":"file"},{"name":"array-foreach.md","path":"docs/rules/array-foreach.md","contentType":"file"},{"name":"async-currenttarget.md","path":"docs/rules/async-currenttarget.md","contentType":"file"},{"name":"async-preventdefault.md","path":"docs/rules/async-preventdefault.md","contentType":"file"},{"name":"authenticity-token.md","path":"docs/rules/authenticity-token.md","contentType":"file"},{"name":"filenames-match-regex.md","path":"docs/rules/filenames-match-regex.md","contentType":"file"},{"name":"get-attribute.md","path":"docs/rules/get-attribute.md","contentType":"file"},{"name":"js-class-name.md","path":"docs/rules/js-class-name.md","contentType":"file"},{"name":"no-blur.md","path":"docs/rules/no-blur.md","contentType":"file"},{"name":"no-d-none.md","path":"docs/rules/no-d-none.md","contentType":"file"},{"name":"no-dataset.md","path":"docs/rules/no-dataset.md","contentType":"file"},{"name":"no-dynamic-script-tag.md","path":"docs/rules/no-dynamic-script-tag.md","contentType":"file"},{"name":"no-implicit-buggy-globals.md","path":"docs/rules/no-implicit-buggy-globals.md","contentType":"file"},{"name":"no-inner-html.md","path":"docs/rules/no-inner-html.md","contentType":"file"},{"name":"no-innerText.md","path":"docs/rules/no-innerText.md","contentType":"file"},{"name":"no-then.md","path":"docs/rules/no-then.md","contentType":"file"},{"name":"no-useless-passive.md","path":"docs/rules/no-useless-passive.md","contentType":"file"},{"name":"prefer-observers.md","path":"docs/rules/prefer-observers.md","contentType":"file"},{"name":"require-passive-events.md","path":"docs/rules/require-passive-events.md","contentType":"file"},{"name":"unescaped-html-literal.md","path":"docs/rules/unescaped-html-literal.md","contentType":"file"}],"totalCount":25},"docs":{"items":[{"name":"rules","path":"docs/rules","contentType":"directory"}],"totalCount":1},"":{"items":[{"name":".devcontainer","path":".devcontainer","contentType":"directory"},{"name":".github","path":".github","contentType":"directory"},{"name":"bin","path":"bin","contentType":"directory"},{"name":"docs","path":"docs","contentType":"directory"},{"name":"lib","path":"lib","contentType":"directory"},{"name":"test-examples","path":"test-examples","contentType":"directory"},{"name":"tests","path":"tests","contentType":"directory"},{"name":".eslint-doc-generatorrc.js","path":".eslint-doc-generatorrc.js","contentType":"file"},{"name":".gitignore","path":".gitignore","contentType":"file"},{"name":"CODEOWNERS","path":"CODEOWNERS","contentType":"file"},{"name":"CONTRIBUTING.md","path":"CONTRIBUTING.md","contentType":"file"},{"name":"LICENSE","path":"LICENSE","contentType":"file"},{"name":"README.md","path":"README.md","contentType":"file"},{"name":"eslint.config.js","path":"eslint.config.js","contentType":"file"},{"name":"package-lock.json","path":"package-lock.json","contentType":"file"},{"name":"package.json","path":"package.json","contentType":"file"}],"totalCount":16}},"fileTreeProcessingTime":17.683104,"foldersToFetch":[],"incompleteFileTree":false,"repo":{"id":54927600,"defaultBranch":"main","name":"eslint-plugin-github","ownerLogin":"github","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2016-03-28T22:20:22.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/9919?v=4","public":true,"private":false,"isOrgOwned":true},"codeLineWrapEnabled":false,"symbolsExpanded":false,"treeExpanded":true,"refInfo":{"name":"v5.1.8","listCacheKey":"v0:1750033375.0","canEdit":false,"refType":"tag","currentOid":"8ecebe2cb335d79f8e70012a12a7e8aa3c192f5b"},"path":"docs/rules/no-d-none.md","currentUser":null,"blob":{"rawLines":null,"stylingDirectives":null,"colorizedLines":null,"csv":null,"csvError":null,"dependabotInfo":{"showConfigurationBanner":false,"configFilePath":null,"networkDependabotPath":"/github/eslint-plugin-github/network/updates","dismissConfigurationNoticePath":"/settings/dismiss-notice/dependabot_configuration_notice","configurationNoticeDismissed":null},"displayName":"no-d-none.md","displayUrl":"https://github.com/github/eslint-plugin-github/blob/v5.1.8/docs/rules/no-d-none.md?raw=true","headerInfo":{"blobSize":"467 Bytes","deleteTooltip":"You must be signed in to make or propose changes","editTooltip":"You must be signed in to make or propose changes","ghDesktopPath":null,"isGitLfs":false,"onBranch":false,"shortPath":"6c2bb83","siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Feslint-plugin-github%2Fblob%2Fv5.1.8%2Fdocs%2Frules%2Fno-d-none.md","isCSV":false,"isRichtext":true,"toc":[{"level":1,"text":"Disallow usage the d-none CSS class (github/no-d-none)","anchor":"disallow-usage-the-d-none-css-class-githubno-d-none","htmlText":"Disallow usage the d-none CSS class (github/no-d-none)"},{"level":2,"text":"Rule Details","anchor":"rule-details","htmlText":"Rule Details"},{"level":2,"text":"Version","anchor":"version","htmlText":"Version"}],"lineInfo":{"truncatedLoc":"25","truncatedSloc":"15"},"mode":"file"},"image":false,"isCodeownersFile":null,"isPlain":false,"isValidLegacyIssueTemplate":false,"issueTemplate":null,"discussionTemplate":null,"language":"Markdown","languageID":222,"large":false,"planSupportInfo":{"repoIsFork":null,"repoOwnedByCurrentUser":null,"requestFullPath":"/github/eslint-plugin-github/blob/v5.1.8/docs/rules/no-d-none.md","showFreeOrgGatedFeatureMessage":null,"showPlanSupportBanner":null,"upgradeDataAttributes":null,"upgradePath":null},"publishBannersInfo":{"dismissActionNoticePath":"/settings/dismiss-notice/publish_action_from_dockerfile","releasePath":"/github/eslint-plugin-github/releases/new?marketplace=true","showPublishActionBanner":false},"rawBlobUrl":"https://github.com/github/eslint-plugin-github/raw/refs/tags/v5.1.8/docs/rules/no-d-none.md","renderImageOrRaw":false,"richText":"\u003carticle class=\"markdown-body entry-content container-lg\" itemprop=\"text\"\u003e\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch1 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eDisallow usage the \u003ccode\u003ed-none\u003c/code\u003e CSS class (\u003ccode\u003egithub/no-d-none\u003c/code\u003e)\u003c/h1\u003e\u003ca id=\"user-content-disallow-usage-the-d-none-css-class-githubno-d-none\" class=\"anchor\" aria-label=\"Permalink: Disallow usage the d-none CSS class (github/no-d-none)\" href=\"#disallow-usage-the-d-none-css-class-githubno-d-none\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003e💼 This rule is enabled in the 🔐 \u003ccode\u003einternal\u003c/code\u003e config.\u003c/p\u003e\n\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eRule Details\u003c/h2\u003e\u003ca id=\"user-content-rule-details\" class=\"anchor\" aria-label=\"Permalink: Rule Details\" href=\"#rule-details\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eIdeally JavaScript behaviors should not rely on Primer CSS when the \u003ccode\u003ehidden\u003c/code\u003e property can be used.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003e👎 Examples of \u003cstrong\u003eincorrect\u003c/strong\u003e code for this rule:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-js notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"div.classList.add('d-none')\"\u003e\u003cpre\u003e\u003cspan class=\"pl-s1\"\u003ediv\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eclassList\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003eadd\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e'd-none'\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003e👍 Examples of \u003cstrong\u003ecorrect\u003c/strong\u003e code for this rule:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-js notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"div.hidden = false\"\u003e\u003cpre\u003e\u003cspan class=\"pl-s1\"\u003ediv\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003ehidden\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003efalse\u003c/span\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eVersion\u003c/h2\u003e\u003ca id=\"user-content-version\" class=\"anchor\" aria-label=\"Permalink: Version\" href=\"#version\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003e4.3.2\u003c/p\u003e\n\u003c/article\u003e","renderedFileInfo":null,"shortPath":null,"symbolsEnabled":true,"tabSize":8,"topBannersInfo":{"overridingGlobalFundingFile":false,"globalPreferredFundingPath":null,"showInvalidCitationWarning":false,"citationHelpUrl":"https://docs.github.com/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/about-citation-files","actionsOnboardingTip":null},"truncated":false,"viewable":true,"workflowRedirectUrl":null,"symbols":null},"copilotInfo":null,"copilotAccessAllowed":false,"modelsAccessAllowed":false,"modelsRepoIntegrationEnabled":true,"csrf_tokens":{"/github/eslint-plugin-github/branches":{"post":"mgCgILRuOMNmbzAOyFwlA7xwXVwJt69wr-cf4nuw4YsYQXOs_5PrIMEVwt-pQKUQt8ARFBxyXQt5nM9uXyFfCA"},"/repos/preferences":{"post":"wfBXDTKse_2qfHM1XLi9GuZlSia-9EFVI7h4xJ_XlkGz9dF8YB9EV5q093TU_RoLyE1Gf3gMG4Cu26Lhl-veDw"}}},"title":"eslint-plugin-github/docs/rules/no-d-none.md at v5.1.8 · github/eslint-plugin-github","appPayload":{"helpUrl":"https://docs.github.com","findFileWorkerPath":"/assets-cdn/worker/find-file-worker-263cab1760dd.js","findInFileWorkerPath":"/assets-cdn/worker/find-in-file-worker-1b17b3e7786a.js","githubDevUrl":null,"enabled_features":{"code_nav_ui_events":false,"react_blob_overlay":false,"accessible_code_button":true}}}
0