Update checked-in dependencies
This commit is contained in:
parent
49f7b34c3d
commit
5261a1223f
1640 changed files with 174830 additions and 182292 deletions
33
node_modules/eslint-plugin-github/README.md
generated
vendored
33
node_modules/eslint-plugin-github/README.md
generated
vendored
|
|
@ -8,6 +8,8 @@ npm install --save-dev eslint eslint-plugin-github
|
|||
|
||||
## Setup
|
||||
|
||||
### Legacy Configuration (`.eslintrc`)
|
||||
|
||||
Add `github` to your list of plugins in your ESLint config.
|
||||
|
||||
JSON ESLint config example:
|
||||
|
|
@ -28,6 +30,36 @@ JSON ESLint config example:
|
|||
}
|
||||
```
|
||||
|
||||
### Flat Configuration (`eslint-config.js`)
|
||||
|
||||
Import the `eslint-plugin-github`, and extend any of the configurations using `getFlatConfigs()` as needed like so:
|
||||
|
||||
```js
|
||||
import github from 'eslint-plugin-github'
|
||||
|
||||
export default [
|
||||
github.getFlatConfigs().browser,
|
||||
github.getFlatConfigs().recommended,
|
||||
github.getFlatConfigs().react,
|
||||
...github.getFlatConfigs().typescript,
|
||||
{
|
||||
files: ['**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}'],
|
||||
ignores: ['eslint.config.mjs'],
|
||||
rules: {
|
||||
'github/array-foreach': 'error',
|
||||
'github/async-preventdefault': 'warn',
|
||||
'github/no-then': 'error',
|
||||
'github/no-blur': 'error',
|
||||
},
|
||||
},
|
||||
]
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
> If you configured the `filenames/match-regex` rule, please note we have adapted the match regex rule into `eslint-plugin-github` as the original `eslint-filenames-plugin` is no longer maintained and needed an ESLint v9 update. Please update the name to `github/filenames-match-regex` and keep the same configuration. For e.g.:
|
||||
>
|
||||
> `'github/filenames-match-regex': ['error', '^[a-z0-9-]+(.[a-z0-9-]+)?$']`
|
||||
|
||||
The available configs are:
|
||||
|
||||
- `internal`
|
||||
|
|
@ -93,6 +125,7 @@ This config will be interpreted in the following way:
|
|||
| [async-currenttarget](docs/rules/async-currenttarget.md) | disallow `event.currentTarget` calls inside of async functions | 🔍 | | |
|
||||
| [async-preventdefault](docs/rules/async-preventdefault.md) | disallow `event.preventDefault` calls inside of async functions | 🔍 | | |
|
||||
| [authenticity-token](docs/rules/authenticity-token.md) | disallow usage of CSRF tokens in JavaScript | 🔐 | | |
|
||||
| [filenames-match-regex](docs/rules/filenames-match-regex.md) | ensure filenames match a regex naming convention | | | |
|
||||
| [get-attribute](docs/rules/get-attribute.md) | disallow wrong usage of attribute names | 🔍 | 🔧 | |
|
||||
| [js-class-name](docs/rules/js-class-name.md) | enforce a naming convention for js- prefixed classes | 🔐 | | |
|
||||
| [no-blur](docs/rules/no-blur.md) | disallow usage of `Element.prototype.blur()` | 🔍 | | |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue