eslint-plugin-remeda 1.4.0 → 1.6.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/dist/index.d.cts CHANGED
@@ -1,6 +1,4 @@
1
- interface RemedaMethodVisitors {
2
- [key: string]: any;
3
- }
1
+ import * as _typescript_eslint_utils_ts_eslint from '@typescript-eslint/utils/ts-eslint';
4
2
 
5
3
  declare const plugin: {
6
4
  meta: {
@@ -8,180 +6,66 @@ declare const plugin: {
8
6
  version: string;
9
7
  };
10
8
  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;
9
+ "collection-method-value": _typescript_eslint_utils_ts_eslint.RuleModule<"useReturnValueId" | "dontUseReturnValueId", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
10
+ "collection-return": _typescript_eslint_utils_ts_eslint.RuleModule<"no-return", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
11
+ "prefer-constant": _typescript_eslint_utils_ts_eslint.RuleModule<"prefer-constant", [(boolean | undefined)?, (boolean | undefined)?], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
12
+ "prefer-do-nothing": _typescript_eslint_utils_ts_eslint.RuleModule<"prefer-do-nothing", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
13
+ "prefer-filter": _typescript_eslint_utils_ts_eslint.RuleModule<"prefer-filter", [{
14
+ maxPropertyPathLength?: number;
15
+ }], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
16
+ "prefer-find": _typescript_eslint_utils_ts_eslint.RuleModule<"prefer-find" | "prefer-find-last", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
17
+ "prefer-flat-map": _typescript_eslint_utils_ts_eslint.RuleModule<"prefer-flat-map", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
18
+ "prefer-has-atleast": _typescript_eslint_utils_ts_eslint.RuleModule<"prefer-has-atleast" | "prefer-has-atleast-over-negated-isempty", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
19
+ "prefer-is-empty": _typescript_eslint_utils_ts_eslint.RuleModule<"preferIsEmpty", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
20
+ "prefer-is-nullish": _typescript_eslint_utils_ts_eslint.RuleModule<"prefer-is-nullish", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
21
+ "prefer-map": _typescript_eslint_utils_ts_eslint.RuleModule<"prefer-map", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
22
+ "prefer-nullish-coalescing": _typescript_eslint_utils_ts_eslint.RuleModule<"prefer-nullish-coalescing", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
23
+ "prefer-remeda-typecheck": _typescript_eslint_utils_ts_eslint.RuleModule<"prefer-remeda-typecheck", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
24
+ "prefer-some": _typescript_eslint_utils_ts_eslint.RuleModule<"prefer-some", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
25
+ "prefer-times": _typescript_eslint_utils_ts_eslint.RuleModule<"prefer-times", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
26
+ };
27
+ configs: {};
28
+ processors: {};
29
+ };
30
+ declare const configs: {
31
+ recommended: {
32
+ plugins: {
33
+ [x: string]: {
34
+ meta: {
35
+ name: string;
36
+ version: string;
159
37
  };
160
- };
161
- };
162
- "prefer-some": {
163
- create: (context: any) => RemedaMethodVisitors;
164
- meta: {
165
- readonly type: "problem";
166
- readonly docs: {
167
- readonly url: string;
38
+ rules: {
39
+ "collection-method-value": _typescript_eslint_utils_ts_eslint.RuleModule<"useReturnValueId" | "dontUseReturnValueId", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
40
+ "collection-return": _typescript_eslint_utils_ts_eslint.RuleModule<"no-return", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
41
+ "prefer-constant": _typescript_eslint_utils_ts_eslint.RuleModule<"prefer-constant", [(boolean | undefined)?, (boolean | undefined)?], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
42
+ "prefer-do-nothing": _typescript_eslint_utils_ts_eslint.RuleModule<"prefer-do-nothing", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
43
+ "prefer-filter": _typescript_eslint_utils_ts_eslint.RuleModule<"prefer-filter", [{
44
+ maxPropertyPathLength?: number;
45
+ }], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
46
+ "prefer-find": _typescript_eslint_utils_ts_eslint.RuleModule<"prefer-find" | "prefer-find-last", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
47
+ "prefer-flat-map": _typescript_eslint_utils_ts_eslint.RuleModule<"prefer-flat-map", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
48
+ "prefer-has-atleast": _typescript_eslint_utils_ts_eslint.RuleModule<"prefer-has-atleast" | "prefer-has-atleast-over-negated-isempty", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
49
+ "prefer-is-empty": _typescript_eslint_utils_ts_eslint.RuleModule<"preferIsEmpty", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
50
+ "prefer-is-nullish": _typescript_eslint_utils_ts_eslint.RuleModule<"prefer-is-nullish", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
51
+ "prefer-map": _typescript_eslint_utils_ts_eslint.RuleModule<"prefer-map", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
52
+ "prefer-nullish-coalescing": _typescript_eslint_utils_ts_eslint.RuleModule<"prefer-nullish-coalescing", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
53
+ "prefer-remeda-typecheck": _typescript_eslint_utils_ts_eslint.RuleModule<"prefer-remeda-typecheck", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
54
+ "prefer-some": _typescript_eslint_utils_ts_eslint.RuleModule<"prefer-some", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
55
+ "prefer-times": _typescript_eslint_utils_ts_eslint.RuleModule<"prefer-times", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
168
56
  };
169
- readonly schema: readonly [];
57
+ configs: {};
58
+ processors: {};
170
59
  };
171
60
  };
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
- };
61
+ rules: {
62
+ [x: string]: number | number[];
181
63
  };
182
64
  };
183
- configs: {};
184
- processors: {};
185
65
  };
66
+ type Plugin = typeof plugin & {
67
+ configs: typeof configs;
68
+ };
69
+ declare const _default: Plugin;
186
70
 
187
- export { plugin as default };
71
+ export = _default;
package/dist/index.d.ts CHANGED
@@ -1,6 +1,4 @@
1
- interface RemedaMethodVisitors {
2
- [key: string]: any;
3
- }
1
+ import * as _typescript_eslint_utils_ts_eslint from '@typescript-eslint/utils/ts-eslint';
4
2
 
5
3
  declare const plugin: {
6
4
  meta: {
@@ -8,180 +6,66 @@ declare const plugin: {
8
6
  version: string;
9
7
  };
10
8
  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;
9
+ "collection-method-value": _typescript_eslint_utils_ts_eslint.RuleModule<"useReturnValueId" | "dontUseReturnValueId", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
10
+ "collection-return": _typescript_eslint_utils_ts_eslint.RuleModule<"no-return", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
11
+ "prefer-constant": _typescript_eslint_utils_ts_eslint.RuleModule<"prefer-constant", [(boolean | undefined)?, (boolean | undefined)?], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
12
+ "prefer-do-nothing": _typescript_eslint_utils_ts_eslint.RuleModule<"prefer-do-nothing", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
13
+ "prefer-filter": _typescript_eslint_utils_ts_eslint.RuleModule<"prefer-filter", [{
14
+ maxPropertyPathLength?: number;
15
+ }], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
16
+ "prefer-find": _typescript_eslint_utils_ts_eslint.RuleModule<"prefer-find" | "prefer-find-last", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
17
+ "prefer-flat-map": _typescript_eslint_utils_ts_eslint.RuleModule<"prefer-flat-map", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
18
+ "prefer-has-atleast": _typescript_eslint_utils_ts_eslint.RuleModule<"prefer-has-atleast" | "prefer-has-atleast-over-negated-isempty", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
19
+ "prefer-is-empty": _typescript_eslint_utils_ts_eslint.RuleModule<"preferIsEmpty", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
20
+ "prefer-is-nullish": _typescript_eslint_utils_ts_eslint.RuleModule<"prefer-is-nullish", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
21
+ "prefer-map": _typescript_eslint_utils_ts_eslint.RuleModule<"prefer-map", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
22
+ "prefer-nullish-coalescing": _typescript_eslint_utils_ts_eslint.RuleModule<"prefer-nullish-coalescing", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
23
+ "prefer-remeda-typecheck": _typescript_eslint_utils_ts_eslint.RuleModule<"prefer-remeda-typecheck", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
24
+ "prefer-some": _typescript_eslint_utils_ts_eslint.RuleModule<"prefer-some", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
25
+ "prefer-times": _typescript_eslint_utils_ts_eslint.RuleModule<"prefer-times", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
26
+ };
27
+ configs: {};
28
+ processors: {};
29
+ };
30
+ declare const configs: {
31
+ recommended: {
32
+ plugins: {
33
+ [x: string]: {
34
+ meta: {
35
+ name: string;
36
+ version: string;
159
37
  };
160
- };
161
- };
162
- "prefer-some": {
163
- create: (context: any) => RemedaMethodVisitors;
164
- meta: {
165
- readonly type: "problem";
166
- readonly docs: {
167
- readonly url: string;
38
+ rules: {
39
+ "collection-method-value": _typescript_eslint_utils_ts_eslint.RuleModule<"useReturnValueId" | "dontUseReturnValueId", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
40
+ "collection-return": _typescript_eslint_utils_ts_eslint.RuleModule<"no-return", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
41
+ "prefer-constant": _typescript_eslint_utils_ts_eslint.RuleModule<"prefer-constant", [(boolean | undefined)?, (boolean | undefined)?], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
42
+ "prefer-do-nothing": _typescript_eslint_utils_ts_eslint.RuleModule<"prefer-do-nothing", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
43
+ "prefer-filter": _typescript_eslint_utils_ts_eslint.RuleModule<"prefer-filter", [{
44
+ maxPropertyPathLength?: number;
45
+ }], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
46
+ "prefer-find": _typescript_eslint_utils_ts_eslint.RuleModule<"prefer-find" | "prefer-find-last", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
47
+ "prefer-flat-map": _typescript_eslint_utils_ts_eslint.RuleModule<"prefer-flat-map", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
48
+ "prefer-has-atleast": _typescript_eslint_utils_ts_eslint.RuleModule<"prefer-has-atleast" | "prefer-has-atleast-over-negated-isempty", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
49
+ "prefer-is-empty": _typescript_eslint_utils_ts_eslint.RuleModule<"preferIsEmpty", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
50
+ "prefer-is-nullish": _typescript_eslint_utils_ts_eslint.RuleModule<"prefer-is-nullish", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
51
+ "prefer-map": _typescript_eslint_utils_ts_eslint.RuleModule<"prefer-map", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
52
+ "prefer-nullish-coalescing": _typescript_eslint_utils_ts_eslint.RuleModule<"prefer-nullish-coalescing", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
53
+ "prefer-remeda-typecheck": _typescript_eslint_utils_ts_eslint.RuleModule<"prefer-remeda-typecheck", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
54
+ "prefer-some": _typescript_eslint_utils_ts_eslint.RuleModule<"prefer-some", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
55
+ "prefer-times": _typescript_eslint_utils_ts_eslint.RuleModule<"prefer-times", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
168
56
  };
169
- readonly schema: readonly [];
57
+ configs: {};
58
+ processors: {};
170
59
  };
171
60
  };
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
- };
61
+ rules: {
62
+ [x: string]: number | number[];
181
63
  };
182
64
  };
183
- configs: {};
184
- processors: {};
185
65
  };
66
+ type Plugin = typeof plugin & {
67
+ configs: typeof configs;
68
+ };
69
+ declare const _default: Plugin;
186
70
 
187
- export { plugin as default };
71
+ export { _default as default };