@putout/plugin-putout-config 11.13.1 → 11.14.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
@@ -36,6 +36,7 @@ npm i @putout/plugin-putout-config -D
36
36
  - ✅ [remove-empty-file](#remove-empty-file);
37
37
  - ✅ [rename-property](#rename-property);
38
38
  - ✅ [rename-rules](#rename-rules);
39
+ - ✅ [sort-ignore](#sort-ignore);
39
40
 
40
41
  ## Config
41
42
 
@@ -63,7 +64,8 @@ npm i @putout/plugin-putout-config -D
63
64
  "putout-config/move-formatter-up": "on",
64
65
  "putout-config/remove-empty": "on",
65
66
  "putout-config/remove-empty-file": "off",
66
- "putout-config/rename-rules": "on"
67
+ "putout-config/rename-rules": "on",
68
+ "putout-config/sort-ignore": "on"
67
69
  }
68
70
  }
69
71
  ```
@@ -680,6 +682,56 @@ Rename rules according to:
680
682
  }
681
683
  ```
682
684
 
685
+ ## sort-ignore
686
+
687
+ Checkout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/666cce88ac86337d2a1adc4228077da3/2514cd7df364a12eae4add32e683aad2c5bc1a2e).
688
+
689
+ ### ❌ Example of incorrect code
690
+
691
+ ```json
692
+ {
693
+ "ignore": [
694
+ "node_modules",
695
+ "fixture",
696
+ ".nyc_output",
697
+ ".yarn",
698
+ "yarn.lock",
699
+ "yarn-error.log",
700
+ ".pnp.*",
701
+ "coverage",
702
+ "dist",
703
+ "dist-dev",
704
+ "build",
705
+ "package-lock.json",
706
+ ".idea",
707
+ ".git"
708
+ ]
709
+ }
710
+ ```
711
+
712
+ ### ✅ Example of correct code
713
+
714
+ ```json
715
+ {
716
+ "ignore": [
717
+ ".nyc_output",
718
+ ".yarn",
719
+ ".pnp.*",
720
+ ".idea",
721
+ ".git",
722
+ "yarn.lock",
723
+ "yarn-error.log",
724
+ "package-lock.json",
725
+ "node_modules",
726
+ "fixture",
727
+ "coverage",
728
+ "dist",
729
+ "dist-dev",
730
+ "build"
731
+ ]
732
+ }
733
+ ```
734
+
683
735
  ## License
684
736
 
685
737
  MIT
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": "11.14.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",