eslint-plugin-remeda 1.0.0 → 1.2.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.
@@ -0,0 +1,187 @@
1
+ interface RemedaMethodVisitors {
2
+ [key: string]: any;
3
+ }
4
+
5
+ declare const plugin: {
6
+ meta: {
7
+ name: string;
8
+ version: string;
9
+ };
10
+ rules: {
11
+ "collection-method-value": {
12
+ create: (context: any) => RemedaMethodVisitors;
13
+ meta: {
14
+ readonly type: "problem";
15
+ readonly schema: readonly [];
16
+ readonly docs: {
17
+ readonly url: string;
18
+ };
19
+ };
20
+ };
21
+ "collection-return": {
22
+ create: (context: any) => {
23
+ "CallExpression:exit": (node: any) => void;
24
+ ReturnStatement(): void;
25
+ onCodePathStart(codePath: any, node: any): void;
26
+ onCodePathEnd(): void;
27
+ } & {
28
+ ImportDeclaration({ source, specifiers }: {
29
+ source: any;
30
+ specifiers: any;
31
+ }): void;
32
+ VariableDeclarator({ init, id }: {
33
+ init: any;
34
+ id: any;
35
+ }): void;
36
+ };
37
+ meta: {
38
+ readonly type: "problem";
39
+ readonly schema: readonly [];
40
+ readonly docs: {
41
+ readonly url: string;
42
+ };
43
+ };
44
+ };
45
+ "prefer-constant": {
46
+ create: (context: any) => {
47
+ FunctionExpression: (node: any) => void;
48
+ FunctionDeclaration(node: any): void;
49
+ ArrowFunctionExpression(node: any): void;
50
+ };
51
+ meta: {
52
+ readonly type: "problem";
53
+ readonly docs: {
54
+ readonly url: string;
55
+ };
56
+ readonly schema: readonly [{
57
+ readonly type: "boolean";
58
+ }, {
59
+ readonly type: "boolean";
60
+ }];
61
+ };
62
+ };
63
+ "prefer-do-nothing": {
64
+ create: (context: any) => {
65
+ FunctionExpression: (node: any) => void;
66
+ ArrowFunctionExpression: (node: any) => void;
67
+ };
68
+ meta: {
69
+ readonly type: "problem";
70
+ readonly schema: readonly [];
71
+ readonly docs: {
72
+ readonly url: string;
73
+ };
74
+ };
75
+ };
76
+ "prefer-filter": {
77
+ create: (context: any) => RemedaMethodVisitors;
78
+ meta: {
79
+ readonly type: "problem";
80
+ readonly docs: {
81
+ readonly url: string;
82
+ };
83
+ readonly schema: readonly [{
84
+ readonly type: "integer";
85
+ }];
86
+ };
87
+ };
88
+ "prefer-find": {
89
+ create: (context: any) => RemedaMethodVisitors;
90
+ meta: {
91
+ readonly type: "problem";
92
+ readonly schema: readonly [];
93
+ readonly docs: {
94
+ readonly url: string;
95
+ };
96
+ };
97
+ };
98
+ "prefer-flat-map": {
99
+ create: (context: any) => RemedaMethodVisitors;
100
+ meta: {
101
+ readonly type: "problem";
102
+ readonly schema: readonly [];
103
+ readonly docs: {
104
+ readonly url: string;
105
+ };
106
+ };
107
+ };
108
+ "prefer-is-empty": {
109
+ create: (context: any) => RemedaMethodVisitors;
110
+ meta: {
111
+ readonly type: "problem";
112
+ readonly schema: readonly [];
113
+ readonly docs: {
114
+ readonly url: string;
115
+ };
116
+ readonly fixable: "code";
117
+ };
118
+ };
119
+ "prefer-is-nil": {
120
+ create: (context: any) => RemedaMethodVisitors;
121
+ meta: {
122
+ readonly type: "problem";
123
+ readonly schema: readonly [];
124
+ readonly docs: {
125
+ readonly url: string;
126
+ };
127
+ };
128
+ };
129
+ "prefer-map": {
130
+ create: (context: any) => RemedaMethodVisitors;
131
+ meta: {
132
+ readonly type: "problem";
133
+ readonly schema: readonly [];
134
+ readonly docs: {
135
+ readonly url: string;
136
+ };
137
+ };
138
+ };
139
+ "prefer-nullish-coalescing": {
140
+ create: (context: any) => RemedaMethodVisitors;
141
+ meta: {
142
+ readonly type: "problem";
143
+ readonly schema: readonly [];
144
+ readonly docs: {
145
+ readonly url: string;
146
+ };
147
+ readonly fixable: "code";
148
+ };
149
+ };
150
+ "prefer-remeda-typecheck": {
151
+ create: (context: any) => {
152
+ BinaryExpression(node: any): void;
153
+ };
154
+ meta: {
155
+ readonly type: "problem";
156
+ readonly schema: readonly [];
157
+ readonly docs: {
158
+ readonly url: string;
159
+ };
160
+ };
161
+ };
162
+ "prefer-some": {
163
+ create: (context: any) => RemedaMethodVisitors;
164
+ meta: {
165
+ readonly type: "problem";
166
+ readonly docs: {
167
+ readonly url: string;
168
+ };
169
+ readonly schema: readonly [];
170
+ };
171
+ };
172
+ "prefer-times": {
173
+ create: (context: any) => RemedaMethodVisitors;
174
+ meta: {
175
+ readonly type: "problem";
176
+ readonly schema: readonly [];
177
+ readonly docs: {
178
+ readonly url: string;
179
+ };
180
+ };
181
+ };
182
+ };
183
+ configs: {};
184
+ processors: {};
185
+ };
186
+
187
+ export { plugin as default };
@@ -0,0 +1,187 @@
1
+ interface RemedaMethodVisitors {
2
+ [key: string]: any;
3
+ }
4
+
5
+ declare const plugin: {
6
+ meta: {
7
+ name: string;
8
+ version: string;
9
+ };
10
+ rules: {
11
+ "collection-method-value": {
12
+ create: (context: any) => RemedaMethodVisitors;
13
+ meta: {
14
+ readonly type: "problem";
15
+ readonly schema: readonly [];
16
+ readonly docs: {
17
+ readonly url: string;
18
+ };
19
+ };
20
+ };
21
+ "collection-return": {
22
+ create: (context: any) => {
23
+ "CallExpression:exit": (node: any) => void;
24
+ ReturnStatement(): void;
25
+ onCodePathStart(codePath: any, node: any): void;
26
+ onCodePathEnd(): void;
27
+ } & {
28
+ ImportDeclaration({ source, specifiers }: {
29
+ source: any;
30
+ specifiers: any;
31
+ }): void;
32
+ VariableDeclarator({ init, id }: {
33
+ init: any;
34
+ id: any;
35
+ }): void;
36
+ };
37
+ meta: {
38
+ readonly type: "problem";
39
+ readonly schema: readonly [];
40
+ readonly docs: {
41
+ readonly url: string;
42
+ };
43
+ };
44
+ };
45
+ "prefer-constant": {
46
+ create: (context: any) => {
47
+ FunctionExpression: (node: any) => void;
48
+ FunctionDeclaration(node: any): void;
49
+ ArrowFunctionExpression(node: any): void;
50
+ };
51
+ meta: {
52
+ readonly type: "problem";
53
+ readonly docs: {
54
+ readonly url: string;
55
+ };
56
+ readonly schema: readonly [{
57
+ readonly type: "boolean";
58
+ }, {
59
+ readonly type: "boolean";
60
+ }];
61
+ };
62
+ };
63
+ "prefer-do-nothing": {
64
+ create: (context: any) => {
65
+ FunctionExpression: (node: any) => void;
66
+ ArrowFunctionExpression: (node: any) => void;
67
+ };
68
+ meta: {
69
+ readonly type: "problem";
70
+ readonly schema: readonly [];
71
+ readonly docs: {
72
+ readonly url: string;
73
+ };
74
+ };
75
+ };
76
+ "prefer-filter": {
77
+ create: (context: any) => RemedaMethodVisitors;
78
+ meta: {
79
+ readonly type: "problem";
80
+ readonly docs: {
81
+ readonly url: string;
82
+ };
83
+ readonly schema: readonly [{
84
+ readonly type: "integer";
85
+ }];
86
+ };
87
+ };
88
+ "prefer-find": {
89
+ create: (context: any) => RemedaMethodVisitors;
90
+ meta: {
91
+ readonly type: "problem";
92
+ readonly schema: readonly [];
93
+ readonly docs: {
94
+ readonly url: string;
95
+ };
96
+ };
97
+ };
98
+ "prefer-flat-map": {
99
+ create: (context: any) => RemedaMethodVisitors;
100
+ meta: {
101
+ readonly type: "problem";
102
+ readonly schema: readonly [];
103
+ readonly docs: {
104
+ readonly url: string;
105
+ };
106
+ };
107
+ };
108
+ "prefer-is-empty": {
109
+ create: (context: any) => RemedaMethodVisitors;
110
+ meta: {
111
+ readonly type: "problem";
112
+ readonly schema: readonly [];
113
+ readonly docs: {
114
+ readonly url: string;
115
+ };
116
+ readonly fixable: "code";
117
+ };
118
+ };
119
+ "prefer-is-nil": {
120
+ create: (context: any) => RemedaMethodVisitors;
121
+ meta: {
122
+ readonly type: "problem";
123
+ readonly schema: readonly [];
124
+ readonly docs: {
125
+ readonly url: string;
126
+ };
127
+ };
128
+ };
129
+ "prefer-map": {
130
+ create: (context: any) => RemedaMethodVisitors;
131
+ meta: {
132
+ readonly type: "problem";
133
+ readonly schema: readonly [];
134
+ readonly docs: {
135
+ readonly url: string;
136
+ };
137
+ };
138
+ };
139
+ "prefer-nullish-coalescing": {
140
+ create: (context: any) => RemedaMethodVisitors;
141
+ meta: {
142
+ readonly type: "problem";
143
+ readonly schema: readonly [];
144
+ readonly docs: {
145
+ readonly url: string;
146
+ };
147
+ readonly fixable: "code";
148
+ };
149
+ };
150
+ "prefer-remeda-typecheck": {
151
+ create: (context: any) => {
152
+ BinaryExpression(node: any): void;
153
+ };
154
+ meta: {
155
+ readonly type: "problem";
156
+ readonly schema: readonly [];
157
+ readonly docs: {
158
+ readonly url: string;
159
+ };
160
+ };
161
+ };
162
+ "prefer-some": {
163
+ create: (context: any) => RemedaMethodVisitors;
164
+ meta: {
165
+ readonly type: "problem";
166
+ readonly docs: {
167
+ readonly url: string;
168
+ };
169
+ readonly schema: readonly [];
170
+ };
171
+ };
172
+ "prefer-times": {
173
+ create: (context: any) => RemedaMethodVisitors;
174
+ meta: {
175
+ readonly type: "problem";
176
+ readonly schema: readonly [];
177
+ readonly docs: {
178
+ readonly url: string;
179
+ };
180
+ };
181
+ };
182
+ };
183
+ configs: {};
184
+ processors: {};
185
+ };
186
+
187
+ export { plugin as default };