klaim 1.10.6 → 1.11.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/README.md CHANGED
@@ -42,10 +42,6 @@
42
42
  - **Response Validation**: Validate responses using schemas for increased reliability and consistency.
43
43
  - **Pagination**: Handle paginated requests easily with support for both page and offset based pagination.
44
44
 
45
- ## ⌛ Next features
46
-
47
- - Error Handling (Version: 1.11)
48
-
49
45
  ## 📥 Installation
50
46
 
51
47
  Install Klaim via npm:
@@ -451,6 +447,20 @@ parameters. Klaim does not handle the pagination logic, only the parameters mana
451
447
  - [JSR](https://jsr.io/@antharuu/klaim)
452
448
  - [GitHub](https://github.com/antharuu/klaim)
453
449
 
450
+ ## 📢 Project Status
451
+
452
+ Klaim is now considered **feature complete**. The library has reached a state where it provides all the core functionality originally envisioned *(even more)*, and no new features are currently planned.
453
+
454
+ However, this doesn't mean the project is abandoned:
455
+
456
+ - **Bug fixes and maintenance** will continue to be addressed
457
+ - **Issues** remain open for bug reports and suggestions
458
+ - **Pull requests** are welcome if you'd like to contribute additional features or improvements
459
+
460
+ If you have ideas for new features that would enhance Klaim, please feel free to open an issue to discuss them. Collaborative contributions through pull requests are especially appreciated!
461
+
462
+ Thank you for your interest in this project. I personally will be moving on to focus on other libraries, but I'm grateful for all the support and feedback the community has provided.
463
+
454
464
  ## 🤝 Contributing
455
465
 
456
466
  Contributions are welcome! Please see the [Contributing Guide](CONTRIBUTING.md) for more details.
package/deno.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antharuu/klaim",
3
- "version": "1.10.6",
3
+ "version": "1.11.0",
4
4
  "description": "Klaim is a lightweight TypeScript library designed to manage APIs and record requests, optimized for an optimal user experience.",
5
5
  "repository": {
6
6
  "type": "git",
package/dist/klaim.es.js CHANGED
@@ -16,9 +16,7 @@ function F(n, t) {
16
16
  const e = Date.now(), a = t.duration * 1e3;
17
17
  let r = A.get(n);
18
18
  r || (r = { timestamps: [] }, A.set(n, r));
19
- const i = r.timestamps.filter(
20
- (s) => e - s < a
21
- );
19
+ const i = r.timestamps.filter((s) => e - s < a);
22
20
  return i.length >= t.limit ? !1 : (i.push(e), r.timestamps = i, !0);
23
21
  }
24
22
  function S(n, t) {
@@ -52,10 +50,11 @@ const H = {
52
50
  class k {
53
51
  /**
54
52
  * Creates a new element with the specified properties
53
+ *
55
54
  * @param {("api"|"route"|"group")} type - Element type identifier
56
55
  * @param {string} name - Unique name for the element
57
56
  * @param {string} url - Base URL or path segment
58
- * @param {IHeaders} [headers={}] - HTTP headers for the element
57
+ * @param {IHeaders} [headers] - HTTP headers for the element
59
58
  */
60
59
  constructor(t, e, a, r = {}) {
61
60
  o(this, "type");
@@ -78,18 +77,21 @@ class k {
78
77
  o(this, "timeout", !1);
79
78
  /**
80
79
  * Enables response caching for this element
81
- * @param {number} [duration=20] - Cache duration in seconds
80
+ *
81
+ * @param {number} [duration] - Cache duration in seconds
82
82
  * @returns {this} The element instance for chaining
83
83
  */
84
84
  o(this, "withCache", (t = 20) => (this.cache = t, this));
85
85
  /**
86
86
  * Enables request retries for this element
87
- * @param {number} [maxRetries=2] - Maximum number of retry attempts
87
+ *
88
+ * @param {number} [maxRetries] - Maximum number of retry attempts
88
89
  * @returns {this} The element instance for chaining
89
90
  */
90
91
  o(this, "withRetry", (t = 2) => (this.retry = t, this));
91
92
  /**
92
93
  * Enables rate limiting for this element
94
+ *
93
95
  * @param {Partial<IRateLimitConfig>} [config] - Rate limiting configuration options
94
96
  * @returns {this} The element instance for chaining
95
97
  * @example
@@ -103,6 +105,7 @@ class k {
103
105
  }, this));
104
106
  /**
105
107
  * Enables request timeout for this element
108
+ *
106
109
  * @param {number} [duration] - Timeout duration in seconds
107
110
  * @param {string} [message] - Custom error message
108
111
  * @returns {this} The element instance for chaining
@@ -112,6 +115,7 @@ class k {
112
115
  }
113
116
  /**
114
117
  * Adds a before-request middleware callback
118
+ *
115
119
  * @param {ICallback<ICallbackBeforeArgs>} callback - Function to execute before the request
116
120
  * @returns {this} The element instance for chaining
117
121
  */
@@ -120,6 +124,7 @@ class k {
120
124
  }
121
125
  /**
122
126
  * Adds an after-request middleware callback
127
+ *
123
128
  * @param {ICallback<ICallbackAfterArgs>} callback - Function to execute after the response
124
129
  * @returns {this} The element instance for chaining
125
130
  */
@@ -128,6 +133,7 @@ class k {
128
133
  }
129
134
  /**
130
135
  * Adds a request lifecycle middleware callback
136
+ *
131
137
  * @param {ICallback<ICallbackCallArgs>} callback - Function to execute during the request
132
138
  * @returns {this} The element instance for chaining
133
139
  */
@@ -136,7 +142,8 @@ class k {
136
142
  }
137
143
  /**
138
144
  * Configures pagination settings for this element
139
- * @param {IPaginationConfig} [config={}] - Pagination configuration options
145
+ *
146
+ * @param {IPaginationConfig} [config] - Pagination configuration options
140
147
  * @returns {this} The element instance for chaining
141
148
  * @example
142
149
  * ```typescript
@@ -311,7 +318,11 @@ const R = {};
311
318
  function V(n, t) {
312
319
  return async (...e) => {
313
320
  if (t.pagination) {
314
- const [i = 0, s = {}, l = {}] = e;
321
+ const [
322
+ i = 0,
323
+ s = {},
324
+ l = {}
325
+ ] = e;
315
326
  return N(n, t, i, s, l);
316
327
  }
317
328
  const [a = {}, r = {}] = e;
@@ -416,20 +427,26 @@ function Y({ route: n, api: t, response: e, data: a }) {
416
427
  };
417
428
  }
418
429
  const f = class f {
430
+ /**
431
+ *
432
+ */
419
433
  constructor() {
420
434
  /**
421
435
  * Map storing all registered elements with their full paths as keys
436
+ *
422
437
  * @private
423
438
  */
424
439
  o(this, "_elements", /* @__PURE__ */ new Map());
425
440
  /**
426
441
  * Reference to the current parent element during registration
442
+ *
427
443
  * @private
428
444
  */
429
445
  o(this, "_currentParent", null);
430
446
  }
431
447
  /**
432
448
  * Gets the singleton instance of the Registry
449
+ *
433
450
  * @returns The singleton Registry instance
434
451
  */
435
452
  static get i() {
@@ -461,6 +478,7 @@ const f = class f {
461
478
  }
462
479
  /**
463
480
  * Gets the current parent element in the registration context
481
+ *
464
482
  * @returns The current parent element or null if none is set
465
483
  */
466
484
  getCurrentParent() {
@@ -659,7 +677,7 @@ class x extends k {
659
677
  * Group.create("admin", () => {
660
678
  * Route.get("list", "/admin/users");
661
679
  * });
662
- *
680
+ *
663
681
  * // Group multiple APIs
664
682
  * Group.create("shared", () => {
665
683
  * Api.create("users", "https://users-api.com", () => {
@@ -729,6 +747,10 @@ class x extends k {
729
747
  /**
730
748
  * Enables request timeout for the group and its children.
731
749
  * Children can override with their own timeout configuration.
750
+ *
751
+ * @param duration - Timeout duration in seconds
752
+ * @param message - Error message if the timeout is reached
753
+ * @returns The current instance for chaining
732
754
  */
733
755
  withTimeout(t = $.duration, e = $.message) {
734
756
  return super.withTimeout(t, e), c.i.getChildren(c.i.getFullPath(this)).forEach((a) => {
package/eslint.config.mjs CHANGED
@@ -1,211 +1,211 @@
1
- // // @ts-check
2
- // import stylistic from "@stylistic/eslint-plugin";
3
- // import simpleImportSort from "eslint-plugin-simple-import-sort";
4
- // import JSdoc from "eslint-plugin-jsdoc";
5
- //
6
- //
7
- // import eslint from '@eslint/js';
8
- // import tseslint from 'typescript-eslint';
9
- //
10
- // export default tseslint.config(
11
- // eslint.configs.recommended,
12
- // ...tseslint.configs.recommended,
13
- // {
14
- // plugins: {
15
- // "@stylistic": stylistic,
16
- // "simple-import-sort": simpleImportSort,
17
- // "jsdoc": JSdoc
18
- // },
19
- // files: ["src/**/*.ts"],
20
- // rules: {
21
- // // ----------------------------------------
22
- // // ---------------------- Simple Import Sort
23
- // // ----------------------------------------
24
- // "simple-import-sort/exports": "error",
25
- // "simple-import-sort/imports": [
26
- // "error",
27
- // {
28
- // "groups": [
29
- // ["^\u0000"],
30
- // ["^@?\\w"],
31
- // ["^/"],
32
- // ["^\\.\\.(?!/?$)", "^\\.\\./?$"],
33
- // [
34
- // "^\\./(?=.*/)(?!/?$)",
35
- // "^\\.(?!/?$)",
36
- // "^\\./?$"
37
- // ],
38
- // ["^.+\\.s?css$"]
39
- // ]
40
- // }
41
- // ],
42
- // // ----------------------------------------
43
- // // ---------------------- TypeScript
44
- // // ----------------------------------------
45
- // "@typescript-eslint/no-explicit-any": "off",
46
- // "@typescript-eslint/ban-ts-comment": "off",
47
- // "@typescript-eslint/no-dynamic-delete": "off",
48
- // "@typescript-eslint/no-namespace": "off",
49
- // "@typescript-eslint/no-empty-object-type": "off",
50
- // "@typescript-eslint/explicit-function-return-type": "error",
51
- // "@typescript-eslint/consistent-indexed-object-style": "error",
52
- // "@typescript-eslint/no-unused-expressions": "error",
53
- //
54
- // // ----------------------------------------
55
- // // ---------------------- Stylistic
56
- // // ----------------------------------------
57
- // "@stylistic/array-bracket-spacing": ["error", "always"],
58
- // "@stylistic/function-paren-newline": ["error", "multiline"],
59
- // "@stylistic/multiline-ternary": ["error", "always-multiline"],
60
- // "@stylistic/quotes": [
61
- // "error",
62
- // "double",
63
- // {
64
- // "avoidEscape": true, "allowTemplateLiterals": true
65
- // }
66
- // ],
67
- // "@stylistic/semi": [
68
- // "error",
69
- // "always",
70
- // {
71
- // "omitLastInOneLineBlock": true, "omitLastInOneLineClassBody": true
72
- // }
73
- // ],
74
- // "@stylistic/space-before-function-paren": ["error", "always"],
75
- // "@stylistic/space-in-parens": ["error", "never"],
76
- // "@stylistic/space-infix-ops": ["error", {"int32Hint": false}],
77
- // "@stylistic/space-before-blocks": ["error", "always"],
78
- // "@stylistic/space-unary-ops": ["error", {"words": true, "nonwords": false}],
79
- // "@stylistic/keyword-spacing": ["error", {"before": true, "after": true}],
80
- // "@stylistic/block-spacing": ["error", "always"],
81
- // "@stylistic/comma-dangle": ["error", "never"],
82
- // "@stylistic/array-bracket-newline": ["error", {"multiline": true}],
83
- // "@stylistic/array-element-newline": ["error", {"multiline": true, "minItems": 3}],
84
- // "@stylistic/object-curly-newline": ["error", {"multiline": true, "consistent": true}],
85
- // "@stylistic/max-len": [
86
- // "error",
87
- // {
88
- // "code": 120,
89
- // "tabWidth": 4,
90
- // "ignoreComments": true,
91
- // "ignoreUrls": true,
92
- // "ignoreStrings": true,
93
- // "ignoreTemplateLiterals": true,
94
- // "ignoreRegExpLiterals": true,
95
- // "ignorePattern": "d=.*"
96
- // }
97
- // ],
98
- // "@stylistic/padded-blocks": ["error", "never"],
99
- // "@stylistic/no-multiple-empty-lines": ["error", {"max": 1, "maxEOF": 0}],
100
- // "@stylistic/eol-last": ["error", "always"],
101
- // "@stylistic/lines-between-class-members": ["error", "always"],
102
- // "@stylistic/brace-style": [
103
- // "error",
104
- // "1tbs",
105
- // {"allowSingleLine": true}
106
- // ],
107
- // "@stylistic/object-curly-spacing": ["error", "always"],
108
- // "@stylistic/arrow-spacing": ["error", {"before": true, "after": true}],
109
- // "@stylistic/implicit-arrow-linebreak": ["error", "beside"],
110
- // "@stylistic/arrow-parens": ["error", "as-needed"],
111
- // "@stylistic/no-trailing-spaces": ["error"],
112
- // "@stylistic/no-tabs": ["error"],
113
- // "@stylistic/no-whitespace-before-property": ["error"],
114
- // "@stylistic/template-curly-spacing": ["error", "never"],
115
- // "@stylistic/rest-spread-spacing": ["error", "never"],
116
- // "@stylistic/operator-linebreak": ["error", "before"],
117
- // "@stylistic/type-annotation-spacing": [
118
- // "error",
119
- // {
120
- // "before": false, "after": true, "overrides": {
121
- // "arrow": {
122
- // "before": true, "after": true
123
- // }
124
- // }
125
- // }
126
- // ],
127
- // "@stylistic/type-generic-spacing": ["error"],
128
- // "@stylistic/type-named-tuple-spacing": ["error"],
129
- //
130
- // // ----------------------------------------
131
- // // ---------------------- JSdoc
132
- // // ----------------------------------------
133
- // "jsdoc/check-access": "error",
134
- // "jsdoc/check-alignment": "error",
135
- // "jsdoc/check-param-names": "error",
136
- // "jsdoc/check-property-names": "error",
137
- // "jsdoc/check-tag-names": "error",
138
- // "jsdoc/check-types": "error",
139
- // "jsdoc/check-values": "error",
140
- // "jsdoc/empty-tags": "error",
141
- // "jsdoc/implements-on-classes": "error",
142
- // "jsdoc/multiline-blocks": "error",
143
- // "jsdoc/no-defaults": "error",
144
- // "jsdoc/no-multi-asterisks": "error",
145
- // "jsdoc/require-jsdoc": [
146
- // "error",
147
- // {
148
- // "require": {
149
- // "FunctionDeclaration": true,
150
- // "MethodDefinition": true,
151
- // "ClassDeclaration": true,
152
- // "ArrowFunctionExpression": true,
153
- // "FunctionExpression": true
154
- // }
155
- // }
156
- // ],
157
- // "jsdoc/require-param": "error",
158
- // "jsdoc/require-param-description": "error",
159
- // "jsdoc/require-param-name": "error",
160
- // "jsdoc/require-property": "error",
161
- // "jsdoc/require-property-description": "error",
162
- // "jsdoc/require-property-name": "error",
163
- // "jsdoc/require-returns": "error",
164
- // "jsdoc/require-returns-check": "error",
165
- // "jsdoc/require-returns-description": "error",
166
- // "jsdoc/require-yields": "error",
167
- // "jsdoc/require-yields-check": "error",
168
- // "jsdoc/tag-lines": [
169
- // "error",
170
- // "never",
171
- // {
172
- // "applyToEndTag": false,
173
- // "count": 1,
174
- // "startLines": 1,
175
- // "endLines": 0
176
- // }
177
- // ],
178
- // "jsdoc/valid-types": "error",
179
- //
180
- // // ----------------------------------------
181
- // // ---------------------- General
182
- // // ----------------------------------------
183
- //
184
- // "no-void": "off",
185
- // "no-undef": "off",
186
- // "indent": ["error", 4],
187
- // "no-console": [
188
- // "error",
189
- // {
190
- // allow: [
191
- // "warn",
192
- // "error",
193
- // "info",
194
- // "table"
195
- // ]
196
- // }
197
- // ],
198
- // "camelcase": [
199
- // "error",
200
- // {
201
- // "properties": "never", "ignoreDestructuring": true, "allow": ["^_[a-z]+_[a-z]+$"]
202
- // }
203
- // ],
204
- // "dot-notation": "off",
205
- // "no-underscore-dangle": "off",
206
- // "func-style": ["error", "declaration"],
207
- // "no-unused-expressions": "off",
208
- // }
209
- // }
210
- // );
211
- //
1
+ // @ts-check
2
+ import stylistic from '@stylistic/eslint-plugin';
3
+ import simpleImportSort from 'eslint-plugin-simple-import-sort';
4
+ import JSdoc from 'eslint-plugin-jsdoc';
5
+
6
+ import eslint from '@eslint/js';
7
+ import tseslint from 'typescript-eslint';
8
+
9
+ export default tseslint.config(
10
+ eslint.configs.recommended,
11
+ ...tseslint.configs.recommended,
12
+ {
13
+ plugins: {
14
+ '@stylistic': stylistic,
15
+ 'simple-import-sort': simpleImportSort,
16
+ jsdoc: JSdoc
17
+ },
18
+ files: ['src/**/*.ts'],
19
+ rules: {
20
+ // ----------------------------------------
21
+ // ---------------------- Simple Import Sort
22
+ // ----------------------------------------
23
+ 'simple-import-sort/exports': 'error',
24
+ 'simple-import-sort/imports': [
25
+ 'error',
26
+ {
27
+ groups: [
28
+ ['^\\u0000'],
29
+ ['^@?\\w'],
30
+ ['^/'],
31
+ ['^\\.\\.(?!/?$)', '^\\.\\./?$'],
32
+ [
33
+ '^\\./(?=.*/)(?!/?$)',
34
+ '^\\.(?!/?$)',
35
+ '^\\./?$'
36
+ ],
37
+ ['^.+\\.s?css$']
38
+ ]
39
+ }
40
+ ],
41
+ // ----------------------------------------
42
+ // ---------------------- TypeScript
43
+ // ----------------------------------------
44
+ '@typescript-eslint/no-explicit-any': 'off',
45
+ '@typescript-eslint/ban-ts-comment': 'off',
46
+ '@typescript-eslint/no-dynamic-delete': 'off',
47
+ '@typescript-eslint/no-namespace': 'off',
48
+ '@typescript-eslint/no-empty-object-type': 'off',
49
+ '@typescript-eslint/explicit-function-return-type': 'error',
50
+ '@typescript-eslint/consistent-indexed-object-style': 'error',
51
+ '@typescript-eslint/no-unused-expressions': 'error',
52
+
53
+ // ----------------------------------------
54
+ // ---------------------- Stylistic
55
+ // ----------------------------------------
56
+ '@stylistic/array-bracket-spacing': ['error', 'always'],
57
+ '@stylistic/function-paren-newline': ['error', 'multiline'],
58
+ '@stylistic/multiline-ternary': ['error', 'always-multiline'],
59
+ '@stylistic/quotes': [
60
+ 'error',
61
+ 'double',
62
+ {
63
+ avoidEscape: true,
64
+ allowTemplateLiterals: true
65
+ }
66
+ ],
67
+ '@stylistic/semi': [
68
+ 'error',
69
+ 'always',
70
+ {
71
+ omitLastInOneLineBlock: true,
72
+ omitLastInOneLineClassBody: true
73
+ }
74
+ ],
75
+ '@stylistic/space-before-function-paren': ['error', 'always'],
76
+ '@stylistic/space-in-parens': ['error', 'never'],
77
+ '@stylistic/space-infix-ops': ['error', { int32Hint: false }],
78
+ '@stylistic/space-before-blocks': ['error', 'always'],
79
+ '@stylistic/space-unary-ops': ['error', { words: true, nonwords: false }],
80
+ '@stylistic/keyword-spacing': ['error', { before: true, after: true }],
81
+ '@stylistic/block-spacing': ['error', 'always'],
82
+ '@stylistic/comma-dangle': ['error', 'never'],
83
+ '@stylistic/array-bracket-newline': ['error', { multiline: true }],
84
+ '@stylistic/array-element-newline': ['error', { multiline: true, minItems: 3 }],
85
+ '@stylistic/object-curly-newline': ['error', { multiline: true, consistent: true }],
86
+ '@stylistic/max-len': [
87
+ 'error',
88
+ {
89
+ code: 120,
90
+ tabWidth: 4,
91
+ ignoreComments: true,
92
+ ignoreUrls: true,
93
+ ignoreStrings: true,
94
+ ignoreTemplateLiterals: true,
95
+ ignoreRegExpLiterals: true,
96
+ ignorePattern: 'd=.*'
97
+ }
98
+ ],
99
+ '@stylistic/padded-blocks': ['error', 'never'],
100
+ '@stylistic/no-multiple-empty-lines': ['error', { max: 1, maxEOF: 0 }],
101
+ '@stylistic/eol-last': ['error', 'always'],
102
+ '@stylistic/lines-between-class-members': ['error', 'always'],
103
+ '@stylistic/brace-style': [
104
+ 'error',
105
+ '1tbs',
106
+ { allowSingleLine: true }
107
+ ],
108
+ '@stylistic/object-curly-spacing': ['error', 'always'],
109
+ '@stylistic/arrow-spacing': ['error', { before: true, after: true }],
110
+ '@stylistic/implicit-arrow-linebreak': ['error', 'beside'],
111
+ '@stylistic/arrow-parens': ['error', 'as-needed'],
112
+ '@stylistic/no-trailing-spaces': ['error'],
113
+ '@stylistic/no-tabs': ['error'],
114
+ '@stylistic/no-whitespace-before-property': ['error'],
115
+ '@stylistic/template-curly-spacing': ['error', 'never'],
116
+ '@stylistic/rest-spread-spacing': ['error', 'never'],
117
+ '@stylistic/operator-linebreak': ['error', 'before'],
118
+ '@stylistic/type-annotation-spacing': [
119
+ 'error',
120
+ {
121
+ before: false,
122
+ after: true,
123
+ overrides: {
124
+ arrow: {
125
+ before: true,
126
+ after: true
127
+ }
128
+ }
129
+ }
130
+ ],
131
+ '@stylistic/type-generic-spacing': ['error'],
132
+ '@stylistic/type-named-tuple-spacing': ['error'],
133
+
134
+ // ----------------------------------------
135
+ // ---------------------- JSdoc
136
+ // ----------------------------------------
137
+ 'jsdoc/check-access': 'error',
138
+ 'jsdoc/check-alignment': 'error',
139
+ 'jsdoc/check-param-names': 'error',
140
+ 'jsdoc/check-property-names': 'error',
141
+ 'jsdoc/check-tag-names': 'error',
142
+ 'jsdoc/check-types': 'error',
143
+ 'jsdoc/check-values': 'error',
144
+ 'jsdoc/empty-tags': 'error',
145
+ 'jsdoc/implements-on-classes': 'error',
146
+ 'jsdoc/multiline-blocks': 'error',
147
+ 'jsdoc/no-defaults': 'error',
148
+ 'jsdoc/no-multi-asterisks': 'error',
149
+ 'jsdoc/require-jsdoc': [
150
+ 'error',
151
+ {
152
+ require: {
153
+ FunctionDeclaration: true,
154
+ MethodDefinition: true,
155
+ ClassDeclaration: true,
156
+ ArrowFunctionExpression: true,
157
+ FunctionExpression: true
158
+ }
159
+ }
160
+ ],
161
+ 'jsdoc/require-param': 'error',
162
+ 'jsdoc/require-param-description': 'error',
163
+ 'jsdoc/require-param-name': 'error',
164
+ 'jsdoc/require-property': 'error',
165
+ 'jsdoc/require-property-description': 'error',
166
+ 'jsdoc/require-property-name': 'error',
167
+ 'jsdoc/require-returns': 'error',
168
+ 'jsdoc/require-returns-check': 'error',
169
+ 'jsdoc/require-returns-description': 'error',
170
+ 'jsdoc/require-yields': 'error',
171
+ 'jsdoc/require-yields-check': 'error',
172
+ 'jsdoc/tag-lines': [
173
+ 'error',
174
+ 'never',
175
+ {
176
+ applyToEndTag: false,
177
+ count: 1,
178
+ startLines: 1,
179
+ endLines: 0
180
+ }
181
+ ],
182
+ 'jsdoc/valid-types': 'error',
183
+
184
+ // ----------------------------------------
185
+ // ---------------------- General
186
+ // ----------------------------------------
187
+
188
+ 'no-void': 'off',
189
+ 'no-undef': 'off',
190
+ indent: ['error', 4],
191
+ 'no-console': [
192
+ 'error',
193
+ {
194
+ allow: ['warn', 'error', 'info', 'table']
195
+ }
196
+ ],
197
+ camelcase: [
198
+ 'error',
199
+ {
200
+ properties: 'never',
201
+ ignoreDestructuring: true,
202
+ allow: ['^_[a-z]+_[a-z]+$']
203
+ }
204
+ ],
205
+ 'dot-notation': 'off',
206
+ 'no-underscore-dangle': 'off',
207
+ 'func-style': ['error', 'declaration'],
208
+ 'no-unused-expressions': 'off'
209
+ }
210
+ }
211
+ );