Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tjw-lint/eslint-config-tjw-jest
The Jared Wilcurt's Jest/Vitest ESLint rules
https://github.com/tjw-lint/eslint-config-tjw-jest
eslint rules ruleset tjw vue
Last synced: 9 days ago
JSON representation
The Jared Wilcurt's Jest/Vitest ESLint rules
- Host: GitHub
- URL: https://github.com/tjw-lint/eslint-config-tjw-jest
- Owner: tjw-lint
- License: mit
- Created: 2019-09-23T17:36:55.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2023-08-31T03:39:58.000Z (about 1 year ago)
- Last Synced: 2024-09-26T07:40:18.459Z (about 2 months ago)
- Topics: eslint, rules, ruleset, tjw, vue
- Language: JavaScript
- Homepage:
- Size: 101 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# eslint-config-tjw-jest
The Jared Wilcurt's Jest/Vitest ESLint rules
## Using this
1. `npm install --save-dev eslint-config-tjw-jest`
1. In your `.eslitrc.js` add `tjw-jest` to your `extends` like so:
```js
module.exports = {
'extends': [
'tjw-jest'
]
};
```If you already have a `no-restricted-syntax` rule, you can merge the ones that come with this config with your own, like so:
```js
// .eslintrc.js
const jestRestrictedSyntax = require('eslint-config-tjw-jest/no-restricted-syntax.json');module.exports = {
extends: [
'tjw-jest'
],
rules: {
'no-restricted-syntax': [
'error',
...jestRestrictedSyntax,
// your custom rules
]
}
};
```* * *
Custom rules:
```js
module.exports = {
extends: [
'tjw-jest'
],
rules: {
'capitalize-test-names': 'error',
'newline-before-expect-assertion': 'error',
'test-names-avoid-should': 'error'
}
};
```
```json
{
"scripts": {
"lint": "eslint --rulesdir=./node_modules/eslint-config-tjw-jest/custom-eslint-rules"
}
}
```* * *
**See also:**
* [eslint-config-tjw-base](https://github.com/tjw-lint/eslint-config-tjw-base)
* [eslint-config-tjw-import](https://github.com/tjw-lint/eslint-config-tjw-import)
* [eslint-config-tjw-jest](https://github.com/tjw-lint/eslint-config-tjw-jest)
* [eslint-config-tjw-jsdoc](https://github.com/tjw-lint/eslint-config-tjw-jsdoc)
* [eslint-config-tjw-vue](https://github.com/tjw-lint/eslint-config-tjw-vue)