web_plsql 0.3.2 → 0.5.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.
Files changed (44) hide show
  1. package/.editorconfig +8 -8
  2. package/.eslintignore +3 -3
  3. package/.eslintrc.js +347 -273
  4. package/CHANGELOG.md +127 -106
  5. package/LICENSE +21 -21
  6. package/README.md +165 -164
  7. package/examples/apex.js +70 -70
  8. package/examples/credentials.js +22 -22
  9. package/examples/oracledb_example.js +30 -30
  10. package/examples/sample.js +101 -84
  11. package/examples/sql/doc_table.sql +13 -13
  12. package/examples/sql/install.sql +31 -31
  13. package/examples/sql/sample.pkb +223 -223
  14. package/examples/sql/sample.pks +24 -24
  15. package/examples/sql/uninstall.sql +5 -5
  16. package/examples/static/sample.css +25 -25
  17. package/jest.config.js +204 -0
  18. package/package.json +85 -109
  19. package/src/cgi.ts +95 -95
  20. package/src/config.ts +97 -97
  21. package/src/errorPage.ts +286 -286
  22. package/src/fileUpload.ts +126 -132
  23. package/src/index.ts +65 -66
  24. package/src/page.ts +275 -277
  25. package/src/procedure.ts +360 -359
  26. package/src/procedureError.ts +27 -27
  27. package/src/request.ts +139 -139
  28. package/src/requestError.ts +19 -19
  29. package/src/stream.ts +26 -26
  30. package/src/trace.ts +194 -193
  31. package/test/.eslintrc.json +5 -5
  32. package/test/{cgi.ts → __tests__/cgi.ts} +96 -95
  33. package/test/{config.ts → __tests__/config.ts} +41 -41
  34. package/test/__tests__/errorPage.ts +101 -0
  35. package/test/{oracledb_mock.ts → __tests__/oracledb_mock.ts} +98 -98
  36. package/test/{server.ts → __tests__/server.ts} +495 -498
  37. package/test/{stream.ts → __tests__/stream.ts} +21 -21
  38. package/test/mock/oracledb.ts +85 -85
  39. package/test/static/static.html +1 -1
  40. package/tsconfig.json +24 -23
  41. package/tsconfig.src.json +23 -22
  42. package/test/errorPage.ts +0 -101
  43. package/test/mocha.opts +0 -7
  44. package/tsconfig.test.json +0 -19
package/.editorconfig CHANGED
@@ -1,8 +1,8 @@
1
- root = true
2
-
3
- [*]
4
- indent_style = tab
5
- indent_size = 4
6
- charset = utf-8
7
- trim_trailing_whitespace = false
8
- insert_final_newline = false
1
+ root = true
2
+
3
+ [*]
4
+ indent_style = tab
5
+ indent_size = 4
6
+ charset = utf-8
7
+ trim_trailing_whitespace = false
8
+ insert_final_newline = false
package/.eslintignore CHANGED
@@ -1,3 +1,3 @@
1
- examples/*
2
- lib/*
3
- node_modules/*
1
+ examples/*
2
+ lib/*
3
+ node_modules/*
package/.eslintrc.js CHANGED
@@ -1,273 +1,347 @@
1
- module.exports = {
2
- parser: '@typescript-eslint/parser',
3
- parserOptions: {
4
- project: './tsconfig.json'
5
- },
6
- extends: [
7
- "eslint:recommended",
8
- 'plugin:@typescript-eslint/recommended',
9
- ],
10
- env: {
11
- es6: true,
12
- node: true
13
- },
14
- rules: {
15
- // Possible Errors
16
- "for-direction": "error",
17
- "no-await-in-loop": "error",
18
- "no-console": "off",
19
- "no-debugger": "warn",
20
- "no-extra-boolean-cast": "warn",
21
- "no-extra-parens": "off",
22
- "no-unsafe-finally": "error",
23
- "no-prototype-builtins": "off",
24
- "no-template-curly-in-string": "error",
25
- "valid-jsdoc": ["warn", {
26
- "prefer": {
27
- "return": "returns",
28
- "argument": "param",
29
- "arg": "param",
30
- "constructor": "class",
31
- "virtual": "abstract"
32
- },
33
- "preferType": {
34
- "Boolean": "boolean",
35
- "Number": "number",
36
- "String": "string",
37
- "object": "Object",
38
- "array": "Array",
39
- "date": "Date"
40
- },
41
- "matchDescription": ".+",
42
- "requireParamDescription": true,
43
- "requireReturnDescription": true,
44
- "requireReturn": false,
45
- "requireReturnType": true
46
- }],
47
-
48
- // Best Practices
49
- "array-callback-return": "warn",
50
- "class-methods-use-this": "warn",
51
- "complexity": ["warn", 30],
52
- "consistent-return": "warn",
53
- "curly": ["error", "all"],
54
- "default-case": "error",
55
- "dot-notation": ["error", {"allowKeywords": true, "allowPattern": "^[a-zA-Z]+(_[a-zA-Z]+)+$"}],
56
- "eqeqeq": "error",
57
- "guard-for-in": "off",
58
- "no-alert": "off",
59
- "no-caller": "error",
60
- "no-case-declarations": "error",
61
- "no-div-regex": "error",
62
- "no-else-return": "warn",
63
- "no-empty-pattern": "warn",
64
- "no-eq-null": "error",
65
- "no-eval": "error",
66
- "no-extend-native": "error",
67
- "no-extra-bind": "error",
68
- "no-extra-label": "warn",
69
- "no-fallthrough": "warn",
70
- "no-floating-decimal": "error",
71
- "no-implicit-coercion": ["warn", {"boolean": true, "number": true, "string": true}],
72
- "no-implicit-globals": "warn",
73
- "no-implied-eval": "error",
74
- "no-iterator": "error",
75
- "no-labels": ["error", {"allowLoop": false, "allowSwitch": false}],
76
- "no-lone-blocks": "warn",
77
- "no-loop-func": "error",
78
- "no-magic-numbers": "off",
79
- "no-multi-spaces": ["warn", {"ignoreEOLComments": true}],
80
- "no-multi-str": "error",
81
- "no-native-reassign": "error",
82
- "no-new": "error",
83
- "no-new-func": "error",
84
- "no-new-wrappers": "error",
85
- "no-octal-escape": "error",
86
- "no-octal": "error",
87
- "no-process-env": "off",
88
- "no-proto": "error",
89
- "no-redeclare": "error",
90
- "no-return-assign": "error",
91
- "no-script-url": "error",
92
- "no-self-assign": "error",
93
- "no-self-compare": "error",
94
- "no-sequences": "error",
95
- "no-throw-literal": "error",
96
- "no-unmodified-loop-condition": "warn",
97
- "no-unused-expressions": "error",
98
- "no-unused-labels": "error",
99
- "no-useless-call": "error",
100
- "no-useless-concat": "warn",
101
- "no-useless-return": "warn",
102
- "no-void": "error",
103
- "no-warning-comments": "off",
104
- "no-with": "error",
105
- "radix": "error",
106
- "vars-on-top": "error",
107
- "wrap-iife": ["error", "outside"],
108
- "yoda": ["error", "never", {"exceptRange": true}],
109
-
110
- // Strict Mode
111
- "strict": ["error", "global"],
112
-
113
- // Variables
114
- "no-catch-shadow": "error",
115
- "no-delete-var": "error",
116
- "no-label-var": "error",
117
- "no-shadow-restricted-names": "error",
118
- "no-shadow": ["warn", {"builtinGlobals": false}],
119
- "no-undef": "error",
120
- "no-undef-init": "error",
121
- "no-undefined": "warn",
122
- "no-unused-vars": ["warn", {"vars": "all", "args": "after-used"}],
123
- "no-use-before-define": ["error", "nofunc"],
124
-
125
- // Node.js and CommonJS
126
- "global-require": "warn",
127
- "handle-callback-err": "warn",
128
- "no-buffer-constructor": "warn",
129
- "no-new-require": "warn",
130
- "no-path-concat": "warn",
131
-
132
- // Stylistic Issues
133
- "array-bracket-newline": "off",
134
- "array-bracket-spacing": ["warn", "never"],
135
- "block-spacing": ["warn", "never"],
136
- "brace-style": ["warn", "1tbs"],
137
- "camelcase": "warn",
138
- "comma-spacing": ["warn", {"before": false, "after": true}],
139
- "comma-style": ["warn", "last"],
140
- "computed-property-spacing": ["warn", "never"],
141
- "consistent-this": ["warn", "that"],
142
- "eol-last": "warn",
143
- "func-call-spacing": ["warn", "never"],
144
- "func-names": "off",
145
- "func-style": "off",
146
- "function-paren-newline": ["warn", "multiline"],
147
- "id-blacklist": "off",
148
- "id-length": "off",
149
- "id-match": "off",
150
- "indent": ["warn", "tab", {"SwitchCase": 1}],
151
- "jsx-quotes": "off",
152
- "key-spacing": ["warn", {"beforeColon": false, "afterColon": true}],
153
- "keyword-spacing": ["error", {"before": true, "after": true, "overrides": {}}],
154
- "linebreak-style": "off",
155
- "lines-around-comment": "off",
156
- "max-depth": ["warn", 10],
157
- "max-len": ["warn", 500],
158
- "max-lines": ["warn", 1000],
159
- "max-nested-callbacks": ["warn", 10],
160
- "max-params": ["warn", 10],
161
- "max-statements": ["warn", 150],
162
- "max-statements-per-line": ["warn", {"max": 2}],
163
- "new-cap": "warn",
164
- "new-parens": "warn",
165
- "newline-per-chained-call": "off",
166
- "no-array-constructor": "warn",
167
- "no-bitwise": "warn",
168
- "no-continue": "warn",
169
- "no-inline-comments": "off",
170
- "no-lonely-if": "off",
171
- "no-mixed-spaces-and-tabs": "warn",
172
- "no-multiple-empty-lines": "off",
173
- "no-multi-assign": "off",
174
- "no-negated-condition": "off",
175
- "no-nested-ternary": "warn",
176
- "no-new-object": "warn",
177
- "no-plusplus": "off",
178
- "no-restricted-syntax": ["warn", "WithStatement"],
179
- "no-ternary": "off",
180
- "no-trailing-spaces": "warn",
181
- "no-underscore-dangle": "off",
182
- "no-unneeded-ternary": "warn",
183
- "no-whitespace-before-property": "warn",
184
- "object-curly-newline": "off",
185
- "object-curly-spacing": ["warn", "never"],
186
- "one-var-declaration-per-line": "off",
187
- "operator-assignment": "off",
188
- "operator-linebreak": ["warn", "after", {"overrides": {"?": "ignore", ":": "ignore"}}],
189
- "padded-blocks": "off",
190
- "padding-line-between-statements": "off",
191
- "quote-props": ["warn", "consistent"],
192
- "quotes": ["warn", "single", "avoid-escape"],
193
- "require-jsdoc": "off",
194
- "semi": ["warn", "always"],
195
- "semi-spacing": ["warn", {"before": false, "after": true}],
196
- "semi-style": ["error", "last"],
197
- "sort-imports": "off",
198
- "sort-vars": "off",
199
- "space-before-blocks": "warn",
200
- "space-before-function-paren": ["warn", {"anonymous": "always", "named": "never"}],
201
- "spaced-comment": ["off", "always"],
202
- "switch-colon-spacing": ["error", {"after": true, "before": false}],
203
- "unicode-bom": ["error", "never"],
204
- "wrap-regex": "off",
205
-
206
- // ECMAScript 6
207
- "arrow-body-style": ["warn", "as-needed"],
208
- "arrow-parens": ["warn", "as-needed"],
209
- "arrow-spacing": ["warn", {"before": true, "after": true}],
210
- "constructor-super": "error",
211
- "generator-star-spacing": ["warn", {"before": true, "after": false}],
212
- "no-class-assign": "error",
213
- "no-confusing-arrow": "error",
214
- "no-const-assign": "error",
215
- "no-dupe-class-members": "error",
216
- "no-duplicate-imports": "error",
217
- "no-new-symbol": "error",
218
- "no-this-before-super": "error",
219
- "no-useless-constructor": "error",
220
- "no-useless-computed-key": "warn",
221
- "no-useless-rename": "warn",
222
- "no-var": "error",
223
- "object-shorthand": "off",
224
- "prefer-arrow-callback": "off",
225
- "prefer-const": "warn",
226
- "prefer-reflect": "off",
227
- "prefer-rest-params": "off",
228
- "prefer-spread": "off",
229
- "prefer-template": "off",
230
- "require-yield": "error",
231
- "template-curly-spacing": "error",
232
- "yield-star-spacing": "error",
233
-
234
- // typescript
235
- '@typescript-eslint/array-type': ['warn', {'default': 'generic'}],
236
- '@typescript-eslint/ban-ts-ignore': 'off',
237
- 'camelcase': 'off',
238
- '@typescript-eslint/camelcase': ['warn', {'properties': 'never'}],
239
- '@typescript-eslint/explicit-function-return-type': 'off',
240
- '@typescript-eslint/explicit-member-accessibility': 'off',
241
- 'indent': 'off',
242
- '@typescript-eslint/indent': ['warn', 'tab', {'SwitchCase': 1}],
243
- '@typescript-eslint/member-delimiter-style': ['warn',
244
- {
245
- singleline: {
246
- delimiter: 'semi',
247
- requireLast: false
248
- },
249
- multiline: {
250
- delimiter: 'semi',
251
- requireLast: true
252
- }
253
- }
254
- ],
255
- '@typescript-eslint/no-explicit-any': 'off',
256
- '@typescript-eslint/no-extraneous-class': 'warn',
257
- '@typescript-eslint/no-inferrable-types': 'off',
258
- 'no-unused-vars': 'off',
259
- '@typescript-eslint/no-unused-vars': 'warn',
260
- '@typescript-eslint/no-unnecessary-type-assertion': 'warn',
261
- '@typescript-eslint/no-useless-constructor': 'warn',
262
- '@typescript-eslint/no-this-alias': [
263
- 'warn',
264
- {
265
- allowDestructuring: true,
266
- allowedNames: ['that']
267
- }
268
- ],
269
- '@typescript-eslint/no-use-before-define': 'off',
270
- '@typescript-eslint/prefer-interface': 'off',
271
- '@typescript-eslint/restrict-plus-operands': 'off',
272
- }
273
- };
1
+ module.exports = {
2
+ parser: '@typescript-eslint/parser',
3
+ parserOptions: {
4
+ project: './tsconfig.json'
5
+ },
6
+ extends: [
7
+ "eslint:recommended",
8
+ 'plugin:@typescript-eslint/recommended',
9
+ ],
10
+ env: {
11
+ es6: true,
12
+ node: true
13
+ },
14
+ rules: {
15
+ // Possible Errors
16
+ "for-direction": "error",
17
+ "no-await-in-loop": "error",
18
+ "no-console": "off",
19
+ "no-debugger": "warn",
20
+ "no-extra-boolean-cast": "warn",
21
+ "no-extra-parens": "off",
22
+ "no-unsafe-finally": "error",
23
+ "no-prototype-builtins": "off",
24
+ "no-template-curly-in-string": "error",
25
+ "valid-jsdoc": ["warn", {
26
+ "prefer": {
27
+ "return": "returns",
28
+ "argument": "param",
29
+ "arg": "param",
30
+ "constructor": "class",
31
+ "virtual": "abstract"
32
+ },
33
+ "preferType": {
34
+ "Boolean": "boolean",
35
+ "Number": "number",
36
+ "String": "string",
37
+ "object": "Object",
38
+ "array": "Array",
39
+ "date": "Date"
40
+ },
41
+ "matchDescription": ".+",
42
+ "requireParamDescription": true,
43
+ "requireReturnDescription": true,
44
+ "requireReturn": false,
45
+ "requireReturnType": true
46
+ }],
47
+
48
+ // Best Practices
49
+ "array-callback-return": "warn",
50
+ "class-methods-use-this": "warn",
51
+ "complexity": ["warn", 30],
52
+ "consistent-return": "warn",
53
+ "curly": ["error", "all"],
54
+ "default-case": "error",
55
+ "dot-notation": ["error", {"allowKeywords": true, "allowPattern": "^[a-zA-Z]+(_[a-zA-Z]+)+$"}],
56
+ "eqeqeq": "error",
57
+ "guard-for-in": "off",
58
+ "no-alert": "off",
59
+ "no-caller": "error",
60
+ "no-case-declarations": "error",
61
+ "no-div-regex": "error",
62
+ "no-else-return": "warn",
63
+ "no-empty-pattern": "warn",
64
+ "no-eq-null": "error",
65
+ "no-eval": "error",
66
+ "no-extend-native": "error",
67
+ "no-extra-bind": "error",
68
+ "no-extra-label": "warn",
69
+ "no-fallthrough": "warn",
70
+ "no-floating-decimal": "error",
71
+ "no-implicit-coercion": ["warn", {"boolean": true, "number": true, "string": true}],
72
+ "no-implicit-globals": "warn",
73
+ "no-implied-eval": "error",
74
+ "no-iterator": "error",
75
+ "no-labels": ["error", {"allowLoop": false, "allowSwitch": false}],
76
+ "no-lone-blocks": "warn",
77
+ "no-loop-func": "error",
78
+ "no-magic-numbers": "off",
79
+ "no-multi-spaces": ["warn", {"ignoreEOLComments": true}],
80
+ "no-multi-str": "error",
81
+ "no-native-reassign": "error",
82
+ "no-new": "error",
83
+ "no-new-func": "error",
84
+ "no-new-wrappers": "error",
85
+ "no-octal-escape": "error",
86
+ "no-octal": "error",
87
+ "no-process-env": "off",
88
+ "no-proto": "error",
89
+ "no-redeclare": "error",
90
+ "no-return-assign": "error",
91
+ "no-script-url": "error",
92
+ "no-self-assign": "error",
93
+ "no-self-compare": "error",
94
+ "no-sequences": "error",
95
+ "no-throw-literal": "error",
96
+ "no-unmodified-loop-condition": "warn",
97
+ "no-unused-expressions": "error",
98
+ "no-unused-labels": "error",
99
+ "no-useless-call": "error",
100
+ "no-useless-concat": "warn",
101
+ "no-useless-return": "warn",
102
+ "no-void": "error",
103
+ "no-warning-comments": "off",
104
+ "no-with": "error",
105
+ "radix": "error",
106
+ "vars-on-top": "error",
107
+ "wrap-iife": ["error", "outside"],
108
+ "yoda": ["error", "never", {"exceptRange": true}],
109
+
110
+ // Strict Mode
111
+ "strict": ["error", "global"],
112
+
113
+ // Variables
114
+ "no-catch-shadow": "error",
115
+ "no-delete-var": "error",
116
+ "no-label-var": "error",
117
+ "no-shadow-restricted-names": "error",
118
+ "no-shadow": ["warn", {"builtinGlobals": false}],
119
+ "no-undef": "error",
120
+ "no-undef-init": "error",
121
+ "no-undefined": "warn",
122
+ "no-unused-vars": ["warn", {"vars": "all", "args": "after-used"}],
123
+ "no-use-before-define": ["error", "nofunc"],
124
+
125
+ // Node.js and CommonJS
126
+ "global-require": "warn",
127
+ "handle-callback-err": "warn",
128
+ "no-buffer-constructor": "warn",
129
+ "no-new-require": "warn",
130
+ "no-path-concat": "warn",
131
+
132
+ // Stylistic Issues
133
+ "array-bracket-newline": "off",
134
+ "array-bracket-spacing": ["warn", "never"],
135
+ "block-spacing": ["warn", "never"],
136
+ "brace-style": ["warn", "1tbs"],
137
+ "camelcase": "warn",
138
+ "comma-spacing": ["warn", {"before": false, "after": true}],
139
+ "comma-style": ["warn", "last"],
140
+ "computed-property-spacing": ["warn", "never"],
141
+ "consistent-this": ["warn", "that"],
142
+ "eol-last": "warn",
143
+ "func-call-spacing": ["warn", "never"],
144
+ "func-names": "off",
145
+ "func-style": "off",
146
+ "function-paren-newline": ["warn", "multiline"],
147
+ "id-blacklist": "off",
148
+ "id-length": "off",
149
+ "id-match": "off",
150
+ "indent": ["warn", "tab", {"SwitchCase": 1}],
151
+ "jsx-quotes": "off",
152
+ "key-spacing": ["warn", {"beforeColon": false, "afterColon": true}],
153
+ "keyword-spacing": ["error", {"before": true, "after": true, "overrides": {}}],
154
+ "linebreak-style": "off",
155
+ "lines-around-comment": "off",
156
+ "max-depth": ["warn", 10],
157
+ "max-len": ["warn", 500],
158
+ "max-lines": ["warn", 1000],
159
+ "max-nested-callbacks": ["warn", 10],
160
+ "max-params": ["warn", 10],
161
+ "max-statements": ["warn", 150],
162
+ "max-statements-per-line": ["warn", {"max": 2}],
163
+ "new-cap": "warn",
164
+ "new-parens": "warn",
165
+ "newline-per-chained-call": "off",
166
+ "no-array-constructor": "warn",
167
+ "no-bitwise": "warn",
168
+ "no-continue": "warn",
169
+ "no-inline-comments": "off",
170
+ "no-lonely-if": "off",
171
+ "no-mixed-spaces-and-tabs": "warn",
172
+ "no-multiple-empty-lines": "off",
173
+ "no-multi-assign": "off",
174
+ "no-negated-condition": "off",
175
+ "no-nested-ternary": "warn",
176
+ "no-new-object": "warn",
177
+ "no-plusplus": "off",
178
+ "no-restricted-syntax": ["warn", "WithStatement"],
179
+ "no-ternary": "off",
180
+ "no-trailing-spaces": "warn",
181
+ "no-underscore-dangle": "off",
182
+ "no-unneeded-ternary": "warn",
183
+ "no-whitespace-before-property": "warn",
184
+ "object-curly-newline": "off",
185
+ "object-curly-spacing": ["warn", "never"],
186
+ "one-var-declaration-per-line": "off",
187
+ "operator-assignment": "off",
188
+ "operator-linebreak": ["warn", "after", {"overrides": {"?": "ignore", ":": "ignore"}}],
189
+ "padded-blocks": "off",
190
+ "padding-line-between-statements": "off",
191
+ "quote-props": ["warn", "consistent"],
192
+ "quotes": ["warn", "single", "avoid-escape"],
193
+ "require-jsdoc": "off",
194
+ "semi": ["warn", "always"],
195
+ "semi-spacing": ["warn", {"before": false, "after": true}],
196
+ "semi-style": ["error", "last"],
197
+ "sort-imports": "off",
198
+ "sort-vars": "off",
199
+ "space-before-blocks": "warn",
200
+ "space-before-function-paren": ["warn", {"anonymous": "always", "named": "never"}],
201
+ "spaced-comment": ["off", "always"],
202
+ "switch-colon-spacing": ["error", {"after": true, "before": false}],
203
+ "unicode-bom": ["error", "never"],
204
+ "wrap-regex": "off",
205
+
206
+ // ECMAScript 6
207
+ "arrow-body-style": ["warn", "as-needed"],
208
+ "arrow-parens": ["warn", "as-needed"],
209
+ "arrow-spacing": ["warn", {"before": true, "after": true}],
210
+ "constructor-super": "error",
211
+ "generator-star-spacing": ["warn", {"before": true, "after": false}],
212
+ "no-class-assign": "error",
213
+ "no-confusing-arrow": "error",
214
+ "no-const-assign": "error",
215
+ "no-dupe-class-members": "error",
216
+ "no-duplicate-imports": "error",
217
+ "no-new-symbol": "error",
218
+ "no-this-before-super": "error",
219
+ "no-useless-constructor": "error",
220
+ "no-useless-computed-key": "warn",
221
+ "no-useless-rename": "warn",
222
+ "no-var": "error",
223
+ "object-shorthand": "off",
224
+ "prefer-arrow-callback": "off",
225
+ "prefer-const": "warn",
226
+ "prefer-reflect": "off",
227
+ "prefer-rest-params": "off",
228
+ "prefer-spread": "off",
229
+ "prefer-template": "off",
230
+ "require-yield": "error",
231
+ "template-curly-spacing": "error",
232
+ "yield-star-spacing": "error",
233
+
234
+ // typescript
235
+ '@typescript-eslint/array-type': ['warn', {'default': 'generic'}],
236
+ '@typescript-eslint/ban-ts-comment': ['warn',
237
+ {
238
+ 'ts-expect-error': false,
239
+ 'ts-ignore': true,
240
+ 'ts-nocheck': true,
241
+ 'ts-check': false
242
+ }
243
+ ],
244
+ 'camelcase': 'off',
245
+ '@typescript-eslint/explicit-function-return-type': 'off',
246
+ '@typescript-eslint/explicit-member-accessibility': 'off',
247
+ 'indent': 'off',
248
+ '@typescript-eslint/indent': ['warn', 'tab', {'SwitchCase': 1}],
249
+ '@typescript-eslint/member-delimiter-style': ['warn',
250
+ {
251
+ singleline: {
252
+ delimiter: 'semi',
253
+ requireLast: false
254
+ },
255
+ multiline: {
256
+ delimiter: 'semi',
257
+ requireLast: true
258
+ }
259
+ }
260
+ ],
261
+ '@typescript-eslint/naming-convention': [
262
+ 'error',
263
+ {
264
+ selector: 'variable',
265
+ modifiers: ['const'],
266
+ format: ['camelCase', 'UPPER_CASE'],
267
+ },
268
+ {
269
+ selector: 'variable',
270
+ format: ['camelCase'],
271
+ leadingUnderscore: 'allow',
272
+ },
273
+ {
274
+ selector: 'function',
275
+ format: ['camelCase'],
276
+ leadingUnderscore: 'allow',
277
+ },
278
+ {
279
+ selector: 'parameter',
280
+ format: ['camelCase'],
281
+ leadingUnderscore: 'allow',
282
+ },
283
+ {
284
+ selector: ['property', 'typeProperty'],
285
+ format: null,
286
+ },
287
+ /*
288
+ {
289
+ selector: 'parameterProperty',
290
+ format: ['camelCase'],
291
+ },
292
+ */
293
+ {
294
+ selector: 'class',
295
+ format: ['PascalCase'],
296
+ },
297
+ {
298
+ selector: 'method',
299
+ format: ['camelCase'],
300
+ leadingUnderscore: 'allow',
301
+ },
302
+ /*
303
+ {
304
+ selector: 'accessor',
305
+ format: ['camelCase'],
306
+ },
307
+ {
308
+ selector: 'enumMember',
309
+ format: ['camelCase'],
310
+ },
311
+ {
312
+ selector: 'interface',
313
+ format: ['camelCase'],
314
+ },
315
+ {
316
+ selector: 'typeAlias',
317
+ format: ['camelCase'],
318
+ },
319
+ {
320
+ selector: 'enum',
321
+ format: ['camelCase'],
322
+ },
323
+ {
324
+ selector: 'typeParameter',
325
+ format: ['camelCase'],
326
+ },
327
+ */
328
+ ],
329
+ '@typescript-eslint/no-explicit-any': 'off',
330
+ '@typescript-eslint/no-extraneous-class': 'warn',
331
+ '@typescript-eslint/no-inferrable-types': 'off',
332
+ 'no-unused-vars': 'off',
333
+ '@typescript-eslint/no-unused-vars': 'warn',
334
+ '@typescript-eslint/no-unnecessary-type-assertion': 'warn',
335
+ '@typescript-eslint/no-useless-constructor': 'warn',
336
+ '@typescript-eslint/no-this-alias': [
337
+ 'warn',
338
+ {
339
+ allowDestructuring: true,
340
+ allowedNames: ['that']
341
+ }
342
+ ],
343
+ '@typescript-eslint/no-use-before-define': 'off',
344
+ '@typescript-eslint/prefer-interface': 'off',
345
+ '@typescript-eslint/restrict-plus-operands': 'off',
346
+ }
347
+ };