Skip to content

Commit 087fe92

Browse files
committed
Config eslint and prettier properly on staged files
1 parent 8246af4 commit 087fe92

File tree

5 files changed

+9
-28
lines changed

5 files changed

+9
-28
lines changed

.lintstagedrc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
{
2-
"*.js": [
3-
"npm run lint:fix",
4-
"git add"
5-
]
2+
"*.js": ["eslint --fix", "git add"],
3+
"*.md": ["prettier --write", "git add"]
64
}

README.md

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,18 @@ Add `testing-library` to the plugins section of your `.eslintrc` configuration f
2424

2525
```json
2626
{
27-
"plugins": [
28-
"testing-library"
29-
]
27+
"plugins": ["testing-library"]
3028
}
3129
```
3230

33-
3431
TODO: Then configure the rules you want to use under the rules section.
3532

3633
```json
3734
{
38-
"rules": {
39-
"testing-library/await-async-query": "warn",
40-
"testing-library/no-await-sync-query": "error"
41-
}
35+
"rules": {
36+
"testing-library/await-async-query": "warn",
37+
"testing-library/no-await-sync-query": "error"
38+
}
4239
}
4340
```
4441

@@ -70,9 +67,4 @@ While the `recommended` configuration only change in major versions, the `all` c
7067

7168
## Supported Rules
7269

73-
* TODO
74-
75-
76-
77-
78-
70+
- TODO

docs/rules/await-async-query.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,20 @@
22

33
TODO: Please describe the origin of the rule here.
44

5-
65
## Rule Details
76

87
This rule aims to...
98

109
Examples of **incorrect** code for this rule:
1110

1211
```js
13-
1412
// TODO: fill me in
15-
1613
```
1714

1815
Examples of **correct** code for this rule:
1916

2017
```js
21-
2218
// TODO: fill me in
23-
2419
```
2520

2621
### Options

docs/rules/no-await-sync-query.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,20 @@
22

33
TODO: Please describe the origin of the rule here.
44

5-
65
## Rule Details
76

87
This rule aims to...
98

109
Examples of **incorrect** code for this rule:
1110

1211
```js
13-
1412
// TODO: fill me in
15-
1613
```
1714

1815
Examples of **correct** code for this rule:
1916

2017
```js
21-
2218
// TODO: fill me in
23-
2419
```
2520

2621
### Options

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"scripts": {
2525
"lint": "eslint ./",
2626
"lint:fix": "npm run lint -- --fix",
27+
"format": "prettier --write README.md {lib,docs,tests}/**/*.{js,md}",
2728
"test": "jest"
2829
},
2930
"dependencies": {},

0 commit comments

Comments
 (0)