Skip to content

Commit d6178b8

Browse files
committed
feature: @putout/plugin-putout-config: apply-arguments: remove-useless-arguments -> arguments
1 parent c8b7844 commit d6178b8

File tree

5 files changed

+9
-4
lines changed

5 files changed

+9
-4
lines changed

packages/plugin-putout-config/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,16 +159,18 @@ Apply [`arguments`](https://github.com/coderaiser/putout/tree/master/packages/pl
159159
```diff
160160
{
161161
"rules": {
162-
- "convert-arguments-to-rest": "off",
162+
- "remove-useless-arguments": "off",
163163
- "remove-useless-arguments/arguments": "on",
164164
- "remove-useless-arguments/method": "on",
165165
- "remove-useless-arguments/unused": "on",
166166
- "remove-useless-arguments/json-parse": "on"
167-
+ "arguments/apply-rest": "on",
167+
- "convert-arguments-to-rest": "off"
168+
+ "arguments": "off",
168169
+ "arguments/remove-useless": "on",
169170
+ "arguments/remove-useless-from-method": "on",
170171
+ "arguments/remove-unused": "on",
171-
+ "arguments/apply-json-parse": "on"
172+
+ "arguments/apply-json-parse": "on",
173+
+ "arguments/apply-rest": "on"
172174
}
173175
}
174176
```

packages/plugin-putout-config/lib/apply-arguments/fixture/apply-arguments-fix.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
__putout_processor_json({
22
rules: {
33
"convert-arguments-to-rest": "off",
4+
"arguments": "off",
45
"arguments/remove-useless": "on",
56
"arguments/remove-useless-from-method": "on",
67
"arguments/remove-unused": "on",

packages/plugin-putout-config/lib/apply-arguments/fixture/apply-arguments.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
__putout_processor_json({
22
rules: {
33
"convert-arguments-to-rest": "off",
4+
"remove-useless-arguments": "off",
45
"remove-useless-arguments/arguments": "on",
56
"remove-useless-arguments/method": "on",
67
"remove-useless-arguments/unused": "on",

packages/plugin-putout-config/lib/apply-arguments/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import {createRenameProperty} from '../rename-property.js';
22

33
const v41 = [
4+
['remove-useless-arguments', 'arguments'],
45
['remove-useless-arguments/arguments', 'arguments/remove-useless'],
56
['remove-useless-arguments/method', 'arguments/remove-useless-from-method'],
67
['remove-useless-arguments/unused', 'arguments/remove-unused'],

packages/plugin-putout-config/lib/apply-arguments/index.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const test = createTest(import.meta.url, {
88
});
99

1010
test('putout-config: apply-arguments: report', (t) => {
11-
t.report('apply-arguments', `Rename property: 'remove-useless-arguments/arguments' -> 'arguments/remove-useless'`);
11+
t.report('apply-arguments', `Rename property: 'remove-useless-arguments' -> 'arguments'`);
1212
t.end();
1313
});
1414

0 commit comments

Comments
 (0)