Skip to content

Commit 0309987

Browse files
committed
fix: @putout/plugin-converage: names
1 parent c4d4ebb commit 0309987

File tree

11 files changed

+52
-19
lines changed

11 files changed

+52
-19
lines changed

packages/plugin-coverage/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,23 @@ npm i @putout/plugin-coverage -D
1414

1515
## Rules
1616

17-
-[add](#add);
18-
-[sort](#sort);
17+
-[add-to-exclude](#add-to-exclude);
18+
-[sort-ignore](#sort-ignore);
1919

2020
## Config
2121

2222
```json
2323
{
2424
"rules": {
25-
"coverage/add": ["on", {
25+
"coverage/add-to-exclude": ["on", {
2626
"dismiss": ["*.spec.*"]
2727
}],
28-
"coverage/sort": "on"
28+
"coverage/sort-ignore": "on"
2929
}
3030
}
3131
```
3232

33-
## add
33+
## add-to-exclude
3434

3535
```diff
3636
{
@@ -42,7 +42,7 @@ npm i @putout/plugin-coverage -D
4242
}
4343
```
4444

45-
## sort
45+
## sort-ignore
4646

4747
### ❌ Example of incorrect code
4848

File renamed without changes.
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import * as add from './add/index.js';
2-
import * as sort from './sort/index.js';
1+
import * as addToExclude from './add-to-exclude/index.js';
2+
import * as sortIgnore from './sort-ignore/index.js';
33

44
export const rules = {
5-
add,
6-
sort,
5+
'add-to-exclude': addToExclude,
6+
'sort-ignore': sortIgnore,
77
};

packages/plugin-coverage/lib/sort/fixture/sort-fix.js renamed to packages/plugin-coverage/lib/sort-ignore/fixture/sort-ignore-fix.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
__putout_processor_json({
22
"exclude": [
33
"*.swp",
4-
"",
54
".idea",
65
".DS_Store",
76
".filesystem.json",
8-
"",
97
"yarn-error.log",
108
"yarn.lock",
119
"deno.lock",
12-
"",
1310
"node_modules",
1411
"coverage"
1512
]

packages/plugin-coverage/lib/sort/fixture/sort.js renamed to packages/plugin-coverage/lib/sort-ignore/fixture/sort-ignore.js

File renamed without changes.
File renamed without changes.

packages/plugin-coverage/lib/sort/index.spec.js renamed to packages/plugin-coverage/lib/sort-ignore/index.spec.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ const test = createTest(import.meta.url, {
77
],
88
});
99

10-
test('putout: plugin-coverage: sort: report', (t) => {
11-
t.report('sort', `Sort '.nycrc.json'`);
10+
test('putout: plugin-coverage: sort-ignore: report', (t) => {
11+
t.report('sort-ignore', `Sort '.nycrc.json'`);
1212
t.end();
1313
});
1414

15-
test('putout: plugin-coverage: sort: transform', (t) => {
16-
t.transform('sort');
15+
test('putout: plugin-coverage: sort-ignore: transform', (t) => {
16+
t.transform('sort-ignore');
1717
t.end();
1818
});

packages/plugin-coverage/test/coverage.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,8 @@ test('plugin-coverage: transform: coverage', (t) => {
1616
t.transform('coverage');
1717
t.end();
1818
});
19+
20+
test('plugin-coverage: transform: sort-ignore', (t) => {
21+
t.transform('sort-ignore');
22+
t.end();
23+
});

packages/plugin-coverage/test/fixture/coverage-fix.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ __putout_processor_json({
44
"exclude": [
55
"**/*.spec.*",
66
"**/fixture",
7-
"test",
7+
"**/*.config.*",
88
".*.*",
9-
"**/*.config.*"
9+
"test"
1010
],
1111
"branches": 100,
1212
"lines": 100,
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
__putout_processor_json({
2+
"exclude": [
3+
"*.swp",
4+
"**/*.config.*",
5+
".idea",
6+
".DS_Store",
7+
".filesystem.json",
8+
"yarn-error.log",
9+
"yarn.lock",
10+
"deno.lock",
11+
"node_modules",
12+
"coverage"
13+
]
14+
});

0 commit comments

Comments
 (0)