Skip to content

Commit 30c9352

Browse files
committed
Replaced tslint with eslint
1 parent ce6e157 commit 30c9352

23 files changed

+2302
-1020
lines changed

.eslintrc

Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"es6": true
5+
},
6+
"extends": [
7+
"eslint:recommended",
8+
"plugin:@typescript-eslint/eslint-recommended"
9+
],
10+
"globals": {
11+
"Atomics": "readonly",
12+
"SharedArrayBuffer": "readonly"
13+
},
14+
"parser": "@typescript-eslint/parser",
15+
"parserOptions": {
16+
"ecmaVersion": 2020,
17+
"sourceType": "module",
18+
"project": "./tsconfig.json"
19+
},
20+
"plugins": [
21+
"@typescript-eslint"
22+
],
23+
"rules": {
24+
"brace-style": "off",
25+
"@typescript-eslint/brace-style": ["error", "stroustrup", { "allowSingleLine": true }],
26+
"camelcase": "off",
27+
"@typescript-eslint/camelcase": ["error", {
28+
"properties": "always",
29+
"genericType": "always",
30+
"ignoreDestructuring": false
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/prefer-nullish-coalescing": "error",
66+
"@typescript-eslint/prefer-function-type": "error",
67+
"@typescript-eslint/prefer-includes": "error",
68+
"@typescript-eslint/prefer-string-starts-ends-with": "error",
69+
"@typescript-eslint/prefer-regexp-exec": "error",
70+
"@typescript-eslint/prefer-optional-chain": "error",
71+
"@typescript-eslint/no-extra-parens": "off",
72+
"@typescript-eslint/class-name-casing": "error",
73+
"@typescript-eslint/no-extra-non-null-assertion": "error",
74+
"@typescript-eslint/adjacent-overload-signatures": "error",
75+
"@typescript-eslint/no-for-in-array": "error",
76+
"@typescript-eslint/default-param-last": "error",
77+
"@typescript-eslint/explicit-member-accessibility": "error",
78+
"@typescript-eslint/explicit-function-return-type": ["error", {
79+
"allowExpressions": true
80+
}],
81+
"@typescript-eslint/explicit-module-boundary-types": "error",
82+
"@typescript-eslint/no-misused-new": "error",
83+
"@typescript-eslint/no-misused-promises": "error",
84+
"@typescript-eslint/no-require-imports": "warn",
85+
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
86+
"func-call-spacing": "off",
87+
"@typescript-eslint/func-call-spacing": ["error", "never"],
88+
"@typescript-eslint/no-namespace": ["error", {
89+
90+
"allowDeclarations": true,
91+
"allowDefinitionFiles": true
92+
}],
93+
"@typescript-eslint/consistent-type-assertions": ["error", {
94+
"assertionStyle": "as"
95+
}],
96+
"no-unused-vars": "off",
97+
"@typescript-eslint/no-unused-vars": ["error", {
98+
"vars": "all",
99+
"args": "after-used",
100+
"ignoreRestSiblings": false,
101+
"caughtErrors": "all"
102+
}],
103+
"no-unused-expressions": "off",
104+
"@typescript-eslint/no-unused-expressions": ["error"],
105+
"no-useless-constructor": "off",
106+
"@typescript-eslint/no-useless-constructor": ["error"],
107+
"no-constant-condition":"off",
108+
"comma-spacing": "off",
109+
"@typescript-eslint/comma-spacing": ["error"],
110+
"@typescript-eslint/unified-signatures": ["error"],
111+
"semi": "off",
112+
"@typescript-eslint/semi": ["error"],
113+
"@typescript-eslint/no-use-before-define": ["error"],
114+
"@typescript-eslint/no-unnecessary-type-assertion": ["error"],
115+
"@typescript-eslint/no-unnecessary-type-arguments": ["error"],
116+
"@typescript-eslint/unbound-method": ["error"],
117+
"@typescript-eslint/type-annotation-spacing": ["error"],
118+
"@typescript-eslint/no-unnecessary-condition": ["off"],
119+
"@typescript-eslint/no-magic-numbers": ["off", {
120+
"ignoreEnums": true
121+
}],
122+
"@typescript-eslint/no-unnecessary-boolean-literal-compare": ["warn"],
123+
"@typescript-eslint/member-ordering": ["off"],
124+
"@typescript-eslint/no-this-alias": [
125+
"warn",
126+
{
127+
"allowDestructuring": true,
128+
"allowedNames": ["_this"]
129+
}
130+
],
131+
"@typescript-eslint/member-naming": ["error", {
132+
"private": "^_",
133+
"protected": "^_"
134+
}],
135+
"@typescript-eslint/no-explicit-any": ["off", {
136+
"fixToUnknown": true,
137+
"ignoreRestArgs": true
138+
}],
139+
"space-before-function-paren": "off",
140+
"@typescript-eslint/space-before-function-paren": ["error", {
141+
"anonymous": "never",
142+
"named": "never",
143+
"asyncArrow": "always"
144+
}],
145+
"@typescript-eslint/member-delimiter-style": ["error", {
146+
"multiline": {
147+
"delimiter": "semi",
148+
"requireLast": true
149+
},
150+
"singleline": {
151+
"delimiter": "semi",
152+
"requireLast": true
153+
}
154+
}],
155+
"@typescript-eslint/interface-name-prefix": ["warn", {
156+
"prefixWithI": "always",
157+
"allowUnderscorePrefix": false
158+
}],
159+
"key-spacing": ["error", { "beforeColon": false, "afterColon": true }],
160+
"no-multiple-empty-lines": ["error", {"max": 1, "maxEOF": 0, "maxBOF": 0}],
161+
"no-trailing-spaces": "error",
162+
"block-spacing":"error",
163+
"space-before-blocks": "error",
164+
"eol-last":"error",
165+
"indent": "off",
166+
"@typescript-eslint/indent": ["error", 4, {
167+
"SwitchCase": 1,
168+
"MemberExpression": 1,
169+
"ArrayExpression": 1,
170+
"ObjectExpression": 1,
171+
"ImportDeclaration": 1,
172+
"flatTernaryExpressions": true,
173+
"CallExpression": {"arguments": 1},
174+
"FunctionDeclaration": {"body": 1, "parameters": 1},
175+
"ignoredNodes": ["TSTypeParameterInstantiation", "TemplateLiteral *"]
176+
}],
177+
"linebreak-style": [
178+
"error",
179+
"unix"
180+
],
181+
"quotes": [
182+
"error",
183+
"single"
184+
],
185+
"no-fallthrough": "off"
186+
}
187+
}

.npmignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/.vscode/
33
/.gitignore
44
/.npmignore
5-
/tslint.json
5+
/.eslintrc
66
/tsconfig.json
77
/node_modules/
88
/dist/samples/

CHANGES.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changes Logs
22

3+
## v1.1.0
4+
5+
- Fixed the watch mode with a new `WatchClient` class.
6+
- Replaced TSLint with ESLint.
7+
38
## v1.0.3
49

510
- Fixed: The pipeline doesn't switch database following the parent client.

0 commit comments

Comments
 (0)