@putout/plugin-putout-config 11.13.1 → 12.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -18,6 +18,7 @@ npm i @putout/plugin-putout-config -D
18
18
  - ✅ [apply-conditions](#apply-conditions);
19
19
  - ✅ [apply-destructuring](#apply-destructuring);
20
20
  - ✅ [apply-esm](#apply-esm);
21
+ - ✅ [apply-filesystem](#apply-filesystem);
21
22
  - ✅ [apply-for-of](#apply-for-of);
22
23
  - ✅ [apply-parens](#apply-parens);
23
24
  - ✅ [apply-return](#apply-return);
@@ -36,6 +37,7 @@ npm i @putout/plugin-putout-config -D
36
37
  - ✅ [remove-empty-file](#remove-empty-file);
37
38
  - ✅ [rename-property](#rename-property);
38
39
  - ✅ [rename-rules](#rename-rules);
40
+ - ✅ [sort-ignore](#sort-ignore);
39
41
 
40
42
  ## Config
41
43
 
@@ -48,6 +50,7 @@ npm i @putout/plugin-putout-config -D
48
50
  "putout-config/apply-destructuring": "on",
49
51
  "putout-config/apply-esm": "on",
50
52
  "putout-config/apply-for-of": "on",
53
+ "putout-config/apply-filesystem": "on",
51
54
  "putout-config/apply-labels": "on",
52
55
  "putout-config/apply-math": "on",
53
56
  "putout-config/apply-nodejs": "on",
@@ -63,7 +66,8 @@ npm i @putout/plugin-putout-config -D
63
66
  "putout-config/move-formatter-up": "on",
64
67
  "putout-config/remove-empty": "on",
65
68
  "putout-config/remove-empty-file": "off",
66
- "putout-config/rename-rules": "on"
69
+ "putout-config/rename-rules": "on",
70
+ "putout-config/sort-ignore": "on"
67
71
  }
68
72
  }
69
73
  ```
@@ -112,6 +116,25 @@ Apply [`return`](https://github.com/coderaiser/putout/tree/master/packages/plugi
112
116
  }
113
117
  ```
114
118
 
119
+ ## apply-filesystem
120
+
121
+ Apply [`filesystem`](https://github.com/coderaiser/putout/tree/master/packages/plugin-filesystem#readme) according to:
122
+
123
+ - 🐊[**Putout v42**](https://github.com/coderaiser/putout/releases/tag/v42.0.0):
124
+
125
+ ```diff
126
+ {
127
+ "rules": {
128
+ - "filesystem/remove-travis-yml-file": "off",
129
+ - "filesystem/remove-vim-swap-file": "off",
130
+ - "filesystem/remove-nyc-output-file": "off",
131
+ - "filesystem/remove-ds-store-file": "off",
132
+ - "filesystem/remove-empty-directory": "off",
133
+ + "filesystem/remove-files": "off",
134
+ }
135
+ }
136
+ ```
137
+
115
138
  ## apply-esm
116
139
 
117
140
  Apply [`esm`](https://github.com/coderaiser/putout/tree/master/packages/plugin-esm#readme) according to:
@@ -680,6 +703,56 @@ Rename rules according to:
680
703
  }
681
704
  ```
682
705
 
706
+ ## sort-ignore
707
+
708
+ Checkout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/666cce88ac86337d2a1adc4228077da3/2514cd7df364a12eae4add32e683aad2c5bc1a2e).
709
+
710
+ ### ❌ Example of incorrect code
711
+
712
+ ```json
713
+ {
714
+ "ignore": [
715
+ "node_modules",
716
+ "fixture",
717
+ ".nyc_output",
718
+ ".yarn",
719
+ "yarn.lock",
720
+ "yarn-error.log",
721
+ ".pnp.*",
722
+ "coverage",
723
+ "dist",
724
+ "dist-dev",
725
+ "build",
726
+ "package-lock.json",
727
+ ".idea",
728
+ ".git"
729
+ ]
730
+ }
731
+ ```
732
+
733
+ ### ✅ Example of correct code
734
+
735
+ ```json
736
+ {
737
+ "ignore": [
738
+ ".nyc_output",
739
+ ".yarn",
740
+ ".pnp.*",
741
+ ".idea",
742
+ ".git",
743
+ "yarn.lock",
744
+ "yarn-error.log",
745
+ "package-lock.json",
746
+ "node_modules",
747
+ "fixture",
748
+ "coverage",
749
+ "dist",
750
+ "dist-dev",
751
+ "build"
752
+ ]
753
+ }
754
+ ```
755
+
683
756
  ## License
684
757
 
685
758
  MIT
@@ -0,0 +1,13 @@
1
+ import {createRenameProperty} from '../rename-property.js';
2
+
3
+ export const {
4
+ report,
5
+ fix,
6
+ traverse,
7
+ } = createRenameProperty([
8
+ ['filesystem/remove-travis-yml', 'filesystem/remove-file'],
9
+ ['filesystem/remove-vim-swap-file', 'filesystem/remove-file'],
10
+ ['filesystem/remove-nyc-output-file', 'filesystem/remove-file'],
11
+ ['filesystem/remove-ds-store-file', 'filesystem/remove-file'],
12
+ ['filesystem/remove-empty-directory', 'filesystem/remove-file'],
13
+ ]);
package/lib/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ import * as sortIgnore from './sort-ignore/index.js';
1
2
  import * as applyArguments from './apply-arguments/index.js';
2
3
  import * as applyDestructuring from './apply-destructuring/index.js';
3
4
  import * as applyAssignment from './apply-assignment/index.js';
@@ -44,4 +45,5 @@ export const rules = {
44
45
  'rename-rules': renameRules,
45
46
  'remove-empty': removeEmpty,
46
47
  'remove-empty-file': ['off', removeEmptyFile],
48
+ 'sort-ignore': sortIgnore,
47
49
  };
@@ -0,0 +1,13 @@
1
+ import {operator} from 'putout';
2
+
3
+ const {__json, sortIgnore} = operator;
4
+
5
+ export const {
6
+ report,
7
+ fix,
8
+ traverse,
9
+ } = sortIgnore({
10
+ type: __json,
11
+ name: '.putout.json',
12
+ property: 'ignore',
13
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/plugin-putout-config",
3
- "version": "11.13.1",
3
+ "version": "12.0.0",
4
4
  "type": "module",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "🐊Putout plugin helps to maintain putout config",
@@ -41,7 +41,7 @@
41
41
  "nodemon": "^3.0.1"
42
42
  },
43
43
  "peerDependencies": {
44
- "putout": ">=41"
44
+ "putout": ">=42"
45
45
  },
46
46
  "license": "MIT",
47
47
  "engines": {