X Tutup
Skip to content
Closed
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
4 changes: 3 additions & 1 deletion docs/rules/a11y-aria-label-is-well-formatted.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Enforce [aria-label] text to be formatted as you would visual text (`github/a11y-aria-label-is-well-formatted`)
# github/a11y-aria-label-is-well-formatted

📝 Enforce [aria-label] text to be formatted as you would visual text.

💼 This rule is enabled in the ⚛️ `react` config.

Expand Down
6 changes: 4 additions & 2 deletions docs/rules/a11y-no-generic-link-text.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Disallow generic link text (`github/a11y-no-generic-link-text`)
# github/a11y-no-generic-link-text

❌ This rule is deprecated. It was replaced by `jsx-a11y/anchor-ambiguous-text`.
📝 Disallow generic link text.

❌ This rule is deprecated. It was replaced by `jsx-a11y/anchor-ambiguous-text`. It was replaced by `jsx-a11y/anchor-ambiguous-text`.

<!-- end auto-generated rule header -->

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/a11y-no-title-attribute.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Disallow using the title attribute (`github/a11y-no-title-attribute`)
# github/a11y-no-title-attribute

📝 Disallow using the title attribute.

💼 This rule is enabled in the ⚛️ `react` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/a11y-no-visually-hidden-interactive-element.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Enforce that interactive elements are not visually hidden (`github/a11y-no-visually-hidden-interactive-element`)
# github/a11y-no-visually-hidden-interactive-element

📝 Enforce that interactive elements are not visually hidden.

💼 This rule is enabled in the ⚛️ `react` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/a11y-role-supports-aria-props.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Enforce that elements with explicit or implicit roles defined contain only `aria-*` properties supported by that `role` (`github/a11y-role-supports-aria-props`)
# github/a11y-role-supports-aria-props

📝 Enforce that elements with explicit or implicit roles defined contain only `aria-*` properties supported by that `role`.

💼 This rule is enabled in the ⚛️ `react` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/a11y-svg-has-accessible-name.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Require SVGs to have an accessible name (`github/a11y-svg-has-accessible-name`)
# github/a11y-svg-has-accessible-name

📝 Require SVGs to have an accessible name.

💼 This rule is enabled in the ⚛️ `react` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/array-foreach.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Enforce `for..of` loops over `Array.forEach` (`github/array-foreach`)
# github/array-foreach

📝 Enforce `for..of` loops over `Array.forEach`.

💼 This rule is enabled in the ✅ `recommended` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/async-currenttarget.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Disallow `event.currentTarget` calls inside of async functions (`github/async-currenttarget`)
# github/async-currenttarget

📝 Disallow `event.currentTarget` calls inside of async functions.

💼 This rule is enabled in the 🔍 `browser` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/async-preventdefault.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Disallow `event.preventDefault` calls inside of async functions (`github/async-preventdefault`)
# github/async-preventdefault

📝 Disallow `event.preventDefault` calls inside of async functions.

💼 This rule is enabled in the 🔍 `browser` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/authenticity-token.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Disallow usage of CSRF tokens in JavaScript (`github/authenticity-token`)
# github/authenticity-token

📝 Disallow usage of CSRF tokens in JavaScript.

💼 This rule is enabled in the 🔐 `internal` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/filenames-match-regex.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Require filenames to match a regex naming convention (`github/filenames-match-regex`)
# github/filenames-match-regex

📝 Require filenames to match a regex naming convention.

<!-- end auto-generated rule header -->

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/get-attribute.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Disallow wrong usage of attribute names (`github/get-attribute`)
# github/get-attribute

📝 Disallow wrong usage of attribute names.

💼 This rule is enabled in the 🔍 `browser` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/js-class-name.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Enforce a naming convention for js- prefixed classes (`github/js-class-name`)
# github/js-class-name

📝 Enforce a naming convention for js- prefixed classes.

💼 This rule is enabled in the 🔐 `internal` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/no-blur.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Disallow usage of `Element.prototype.blur()` (`github/no-blur`)
# github/no-blur

📝 Disallow usage of `Element.prototype.blur()`.

💼 This rule is enabled in the 🔍 `browser` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/no-d-none.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Disallow usage the `d-none` CSS class (`github/no-d-none`)
# github/no-d-none

📝 Disallow usage the `d-none` CSS class.

💼 This rule is enabled in the 🔐 `internal` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/no-dataset.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Enforce usage of `Element.prototype.getAttribute` instead of `Element.prototype.datalist` (`github/no-dataset`)
# github/no-dataset

📝 Enforce usage of `Element.prototype.getAttribute` instead of `Element.prototype.datalist`.

💼 This rule is enabled in the 🔍 `browser` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/no-dynamic-script-tag.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Disallow creating dynamic script tags (`github/no-dynamic-script-tag`)
# github/no-dynamic-script-tag

📝 Disallow creating dynamic script tags.

💼 This rule is enabled in the ✅ `recommended` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/no-implicit-buggy-globals.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Disallow implicit global variables (`github/no-implicit-buggy-globals`)
# github/no-implicit-buggy-globals

📝 Disallow implicit global variables.

💼 This rule is enabled in the ✅ `recommended` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/no-inner-html.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Disallow `Element.prototype.innerHTML` in favor of `Element.prototype.textContent` (`github/no-inner-html`)
# github/no-inner-html

📝 Disallow `Element.prototype.innerHTML` in favor of `Element.prototype.textContent`.

💼 This rule is enabled in the 🔍 `browser` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/no-innerText.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Disallow `Element.prototype.innerText` in favor of `Element.prototype.textContent` (`github/no-innerText`)
# github/no-innerText

📝 Disallow `Element.prototype.innerText` in favor of `Element.prototype.textContent`.

💼 This rule is enabled in the 🔍 `browser` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/no-then.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Enforce using `async/await` syntax over Promises (`github/no-then`)
# github/no-then

📝 Enforce using `async/await` syntax over Promises.

💼 This rule is enabled in the ✅ `recommended` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/no-useless-passive.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Disallow marking a event handler as passive when it has no effect (`github/no-useless-passive`)
# github/no-useless-passive

📝 Disallow marking a event handler as passive when it has no effect.

💼 This rule is enabled in the 🔍 `browser` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/prefer-observers.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Disallow poorly performing event listeners (`github/prefer-observers`)
# github/prefer-observers

📝 Disallow poorly performing event listeners.

💼 This rule is enabled in the 🔍 `browser` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/require-passive-events.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Enforce marking high frequency event handlers as passive (`github/require-passive-events`)
# github/require-passive-events

📝 Enforce marking high frequency event handlers as passive.

💼 This rule is enabled in the 🔍 `browser` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/unescaped-html-literal.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Disallow unescaped HTML literals (`github/unescaped-html-literal`)
# github/unescaped-html-literal

📝 Disallow unescaped HTML literals.

💼 This rule is enabled in the 🔍 `browser` config.

Expand Down
2 changes: 1 addition & 1 deletion lib/configs/flat/recommended.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import globals from 'globals'
import github from '../../plugin.js'
import prettierPlugin from 'eslint-plugin-prettier'
import eslintComments from 'eslint-plugin-eslint-comments'
import eslintComments from '@eslint-community/eslint-plugin-eslint-comments'
import importPlugin from 'eslint-plugin-import'
import i18nTextPlugin from 'eslint-plugin-i18n-text'
import noOnlyTestsPlugin from 'eslint-plugin-no-only-tests'
Expand Down
27 changes: 19 additions & 8 deletions lib/configs/recommended.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,27 @@ export default {
env: {
es6: true,
},
plugins: ['github', 'prettier', 'eslint-comments', 'import', 'filenames', 'i18n-text', 'no-only-tests'],
plugins: [
'github',
'prettier',
'@eslint-community/eslint-comments',
'import',
'filenames',
'i18n-text',
'no-only-tests',
],
rules: {
'constructor-super': 'error',
'eslint-comments/disable-enable-pair': 'off',
'eslint-comments/no-aggregating-enable': 'off',
'eslint-comments/no-duplicate-disable': 'error',
'eslint-comments/no-unlimited-disable': 'error',
'eslint-comments/no-unused-disable': 'error',
'eslint-comments/no-unused-enable': 'error',
'eslint-comments/no-use': ['error', {allow: ['eslint', 'eslint-disable-next-line', 'eslint-env', 'globals']}],
'@eslint-community/eslint-comments/disable-enable-pair': 'off',
'@eslint-community/eslint-comments/no-aggregating-enable': 'off',
'@eslint-community/eslint-comments/no-duplicate-disable': 'error',
'@eslint-community/eslint-comments/no-unlimited-disable': 'error',
'@eslint-community/eslint-comments/no-unused-disable': 'error',
'@eslint-community/eslint-comments/no-unused-enable': 'error',
'@eslint-community/eslint-comments/no-use': [
'error',
{allow: ['eslint', 'eslint-disable-next-line', 'eslint-env', 'globals']},
],
'filenames/match-regex': ['error', '^[a-z0-9-]+(.[a-z0-9-]+)?$'],
'func-style': ['error', 'declaration', {allowArrowFunctions: true}],
'github/array-foreach': 'error',
Expand Down
Loading
Loading
X Tutup