Skip to content

Commit 937afb1

Browse files
committed
fix(command): fixed command LPOP/RPOP with 2nd argument
1 parent da9d68f commit 937afb1

File tree

8 files changed

+778
-784
lines changed

8 files changed

+778
-784
lines changed

.eslintrc

+3-328
Original file line numberDiff line numberDiff line change
@@ -1,337 +1,12 @@
11
{
2-
"env": {
3-
"browser": true,
4-
"es6": true
5-
},
62
"extends": [
7-
"eslint:recommended",
8-
"plugin:@typescript-eslint/eslint-recommended"
3+
"plugin:@litert/rules/typescript"
94
],
10-
"globals": {
11-
"Atomics": "readonly",
12-
"SharedArrayBuffer": "readonly"
13-
},
14-
"parser": "@typescript-eslint/parser",
155
"parserOptions": {
16-
"ecmaVersion": 2020,
17-
"sourceType": "module",
186
"project": "./tsconfig.json"
197
},
208
"plugins": [
21-
"@typescript-eslint"
9+
"@litert/rules"
2210
],
23-
"rules": {
24-
"brace-style": "off",
25-
"@typescript-eslint/brace-style": ["error", "stroustrup", { "allowSingleLine": true }],
26-
"camelcase": "off",
27-
"max-len": ["error", 120, {
28-
"ignoreStrings": true,
29-
"ignoreTemplateLiterals": true,
30-
"ignoreComments": true
31-
}],
32-
"@typescript-eslint/ban-types": ["error", {
33-
"types": {
34-
35-
"String": {
36-
"message": "Use string instead",
37-
"fixWith": "string"
38-
},
39-
"Number": {
40-
"message": "Use number instead",
41-
"fixWith": "number"
42-
},
43-
"Boolean": {
44-
"message": "Use number instead",
45-
"fixWith": "boolean"
46-
},
47-
"Object": {
48-
"message": "Use {} instead",
49-
"fixWith": "{}"
50-
}
51-
}
52-
}],
53-
"no-extra-semi": "off",
54-
"@typescript-eslint/no-extra-semi": ["error"],
55-
"@typescript-eslint/no-base-to-string": ["warn"],
56-
"@typescript-eslint/await-thenable": ["error"],
57-
"@typescript-eslint/array-type": ["error", { "default": "array-simple" }],
58-
"@typescript-eslint/prefer-as-const": "error",
59-
"@typescript-eslint/no-extraneous-class": "error",
60-
"@typescript-eslint/no-floating-promises": ["error", { "ignoreVoid": false }],
61-
"@typescript-eslint/no-array-constructor": "error",
62-
"@typescript-eslint/no-empty-function": "error",
63-
"@typescript-eslint/no-empty-interface": "error",
64-
"@typescript-eslint/prefer-for-of": "error",
65-
"@typescript-eslint/non-nullable-type-assertion-style": "error",
66-
"@typescript-eslint/object-curly-spacing": ["error", "always"],
67-
"@typescript-eslint/prefer-readonly": "error",
68-
"@typescript-eslint/prefer-nullish-coalescing": "error",
69-
"@typescript-eslint/prefer-literal-enum-member": ["error", {
70-
"allowBitwiseExpressions": true
71-
}],
72-
"@typescript-eslint/prefer-function-type": "error",
73-
"@typescript-eslint/prefer-reduce-type-parameter": "error",
74-
"@typescript-eslint/prefer-includes": "error",
75-
"@typescript-eslint/prefer-string-starts-ends-with": "error",
76-
"@typescript-eslint/prefer-return-this-type": "error",
77-
"@typescript-eslint/prefer-regexp-exec": "error",
78-
"@typescript-eslint/prefer-optional-chain": "error",
79-
"@typescript-eslint/no-extra-parens": "off",
80-
"@typescript-eslint/no-extra-non-null-assertion": "error",
81-
"@typescript-eslint/adjacent-overload-signatures": "error",
82-
"@typescript-eslint/no-for-in-array": "error",
83-
"@typescript-eslint/default-param-last": "error",
84-
"@typescript-eslint/no-invalid-void-type": "error",
85-
"no-loss-of-precision": "off",
86-
"@typescript-eslint/no-loss-of-precision": ["error"],
87-
"@typescript-eslint/explicit-member-accessibility": "error",
88-
"@typescript-eslint/explicit-function-return-type": ["error", {
89-
"allowExpressions": true
90-
}],
91-
"keyword-spacing": "off",
92-
"@typescript-eslint/consistent-indexed-object-style": ["error", "record"],
93-
"@typescript-eslint/keyword-spacing": ["error"],
94-
"no-magic-numbers": "off",
95-
"@typescript-eslint/no-magic-numbers": [
96-
"off",
97-
{
98-
"ignoreEnums": true,
99-
"ignoreNumericLiteralTypes": true
100-
}
101-
],
102-
"lines-between-class-members": "off",
103-
"@typescript-eslint/lines-between-class-members": ["error"],
104-
"@typescript-eslint/explicit-module-boundary-types": "error",
105-
"@typescript-eslint/no-confusing-non-null-assertion": "error",
106-
"@typescript-eslint/no-confusing-void-expression": "error",
107-
"@typescript-eslint/no-misused-new": "error",
108-
"@typescript-eslint/no-misused-promises": "error",
109-
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
110-
"@typescript-eslint/no-require-imports": "warn",
111-
"no-invalid-this": "off",
112-
"@typescript-eslint/no-invalid-this": ["error"],
113-
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
114-
"no-redeclare": "off",
115-
"@typescript-eslint/no-redeclare": ["error"],
116-
"no-duplicate-imports": "off",
117-
"@typescript-eslint/no-duplicate-imports": ["error"],
118-
"func-call-spacing": "off",
119-
"@typescript-eslint/func-call-spacing": ["error", "never"],
120-
"@typescript-eslint/no-namespace": ["error", {
121-
122-
"allowDeclarations": true,
123-
"allowDefinitionFiles": true
124-
}],
125-
"@typescript-eslint/consistent-type-assertions": ["error", {
126-
"assertionStyle": "as"
127-
}],
128-
"no-unused-vars": "off",
129-
"@typescript-eslint/no-unused-vars": ["error", {
130-
"vars": "all",
131-
"args": "after-used",
132-
"ignoreRestSiblings": false,
133-
"caughtErrors": "all"
134-
}],
135-
"no-unused-expressions": "off",
136-
"@typescript-eslint/no-unused-expressions": ["error"],
137-
// "@typescript-eslint/no-unsafe-argument": ["error"],
138-
// "@typescript-eslint/no-unsafe-call": ["error"],
139-
// "@typescript-eslint/no-unsafe-member-access": ["error"],
140-
// "@typescript-eslint/no-unsafe-assignment": ["error"],
141-
"no-useless-constructor": "off",
142-
"@typescript-eslint/no-useless-constructor": ["error"],
143-
"no-constant-condition":"off",
144-
"comma-spacing": "off",
145-
"@typescript-eslint/comma-spacing": ["error"],
146-
"@typescript-eslint/prefer-ts-expect-error": ["error"],
147-
"require-await": "off",
148-
"@typescript-eslint/require-await": ["error"],
149-
"@typescript-eslint/restrict-plus-operands": ["error", {
150-
"checkCompoundAssignments": true,
151-
"allowAny": true
152-
}],
153-
"@typescript-eslint/unified-signatures": ["error"],
154-
"semi": "off",
155-
"@typescript-eslint/semi": ["error"],
156-
"@typescript-eslint/restrict-template-expressions": ["off", {
157-
"allowNumber": true,
158-
"allowString": true,
159-
"allowBoolean": false,
160-
"allowAny": false,
161-
"allowNullish": false
162-
}],
163-
"@typescript-eslint/return-await": ["error", "in-try-catch"],
164-
165-
"@typescript-eslint/no-use-before-define": ["error", {
166-
"enums": true,
167-
"functions": false,
168-
"classes": false,
169-
"variables": true
170-
}],
171-
"@typescript-eslint/no-unnecessary-type-assertion": ["error"],
172-
"@typescript-eslint/no-unnecessary-type-constraint": ["error"],
173-
"@typescript-eslint/no-unnecessary-type-arguments": ["error"],
174-
"@typescript-eslint/no-unnecessary-qualifier": ["error"],
175-
"@typescript-eslint/unbound-method": ["error"],
176-
"@typescript-eslint/switch-exhaustiveness-check": ["error"],
177-
"@typescript-eslint/type-annotation-spacing": ["error"],
178-
"@typescript-eslint/no-var-requires": ["error"],
179-
"@typescript-eslint/no-unnecessary-condition": ["off"],
180-
"@typescript-eslint/no-unnecessary-boolean-literal-compare": ["warn"],
181-
"@typescript-eslint/member-ordering": ["off"],
182-
"@typescript-eslint/no-this-alias": [
183-
"warn",
184-
{
185-
"allowDestructuring": true,
186-
"allowedNames": ["_this"]
187-
}
188-
],
189-
"@typescript-eslint/no-explicit-any": ["off", {
190-
"fixToUnknown": true,
191-
"ignoreRestArgs": true
192-
}],
193-
"space-before-function-paren": "off",
194-
"space-unary-ops": ["error", {
195-
"words": true,
196-
"nonwords": false
197-
}],
198-
"arrow-spacing": ["error"],
199-
"space-infix-ops": ["error"],
200-
"@typescript-eslint/space-before-function-paren": ["error", {
201-
"anonymous": "never",
202-
"named": "never",
203-
"asyncArrow": "always"
204-
}],
205-
"@typescript-eslint/member-delimiter-style": ["error", {
206-
"multiline": {
207-
"delimiter": "semi",
208-
"requireLast": true
209-
},
210-
"singleline": {
211-
"delimiter": "semi",
212-
"requireLast": true
213-
}
214-
}],
215-
"@typescript-eslint/naming-convention": [
216-
"error",
217-
{
218-
"selector": "default",
219-
"format": ["camelCase"],
220-
"leadingUnderscore": "forbid"
221-
},
222-
{
223-
"selector": "parameter",
224-
"format": ["camelCase"],
225-
"modifiers": ["unused"],
226-
"leadingUnderscore": "allow"
227-
},
228-
{
229-
"selector": "parameter",
230-
"format": ["camelCase"]
231-
},
232-
{
233-
"selector": "memberLike",
234-
"modifiers": ["private"],
235-
"format": ["camelCase"],
236-
"leadingUnderscore": "require"
237-
},
238-
{
239-
"selector": "memberLike",
240-
"modifiers": ["protected"],
241-
"format": ["camelCase"],
242-
"leadingUnderscore": "require"
243-
},
244-
{
245-
"selector": "memberLike",
246-
"modifiers": ["private", "static"],
247-
"format": [],
248-
"custom": {
249-
"regex": "^_\\$[^_]",
250-
"match": true
251-
}
252-
},
253-
{
254-
"selector": "memberLike",
255-
"modifiers": ["protected", "static"],
256-
"format": [],
257-
"custom": {
258-
"regex": "^_\\$[^_]",
259-
"match": true
260-
}
261-
},
262-
{
263-
"selector": "enumMember",
264-
"format": ["UPPER_CASE"]
265-
},
266-
{
267-
"selector": "objectLiteralProperty",
268-
"format": []
269-
},
270-
{
271-
"selector": "variable",
272-
"format": ["camelCase", "UPPER_CASE"]
273-
},
274-
{
275-
"selector": "variable",
276-
"modifiers": ["const"],
277-
"format": ["UPPER_CASE", "camelCase"]
278-
},
279-
{
280-
"selector": "typeParameter",
281-
"format": ["PascalCase"],
282-
"prefix": ["T"]
283-
},
284-
{
285-
"selector": "interface",
286-
"format": ["PascalCase"],
287-
"custom": {
288-
"regex": "^I[A-Z]",
289-
"match": true
290-
}
291-
},
292-
{
293-
"selector": "class",
294-
"format": ["PascalCase"]
295-
},
296-
{
297-
"selector": "enum",
298-
"format": ["PascalCase"],
299-
"custom": {
300-
"regex": "^E[A-Z]",
301-
"match": true
302-
}
303-
},
304-
{
305-
"selector": "typeAlias",
306-
"format": ["PascalCase"]
307-
}
308-
],
309-
"key-spacing": ["error", { "beforeColon": false, "afterColon": true }],
310-
"no-multiple-empty-lines": ["error", {"max": 1, "maxEOF": 0, "maxBOF": 0}],
311-
"no-trailing-spaces": "error",
312-
"block-spacing":"error",
313-
"eol-last":"error",
314-
"space-before-blocks": "error",
315-
"indent": "off",
316-
"@typescript-eslint/indent": ["error", 4, {
317-
"SwitchCase": 1,
318-
"MemberExpression": 1,
319-
"ArrayExpression": 1,
320-
"ObjectExpression": 1,
321-
"ImportDeclaration": 1,
322-
"flatTernaryExpressions": true,
323-
"CallExpression": {"arguments": 1},
324-
"FunctionDeclaration": {"body": 1, "parameters": 1},
325-
"ignoredNodes": ["TSTypeParameterInstantiation", "TemplateLiteral *"]
326-
}],
327-
"linebreak-style": [
328-
"error",
329-
"unix"
330-
],
331-
"quotes": [
332-
"error",
333-
"single",
334-
{ "avoidEscape": true, "allowTemplateLiterals": true }
335-
]
336-
}
11+
"rules": {}
33712
}

CHANGES.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Changes Logs
22

3-
## v2.0.0
3+
## v2.0.1
44

55
- fix(connection): refactored connection management
66

@@ -9,6 +9,7 @@
99
- Disabled command timeout **by default**.
1010

1111
- fix(protocol): fixed empty list like `*-1<CR><LF>`.
12+
- fix(command): fixed command `LPOP`/`RPOP` with 2nd argument `count`.
1213
- fix(command): fixed command `MOVE`.
1314
- feat(command): added command `COPY` supports.
1415
- feat(command): added command `SWAPDB` supports.

0 commit comments

Comments
 (0)