lenix 1.6.3 β†’ 1.7.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 DELETED
@@ -1,51 +0,0 @@
1
- # lenix
2
-
3
- The All-in-one Repository
4
-
5
- ## πŸ—ΊοΈ Roadmap
6
-
7
- ### Lint
8
-
9
- - [ ] fix the lint tsconfig.json file creation when no file is found
10
-
11
- ### Extension
12
-
13
- - [x] trim the diff's unusefull text
14
- - [ ] use walkthrough instead of custom page
15
- - [ ] use webview to add quick settings
16
- - [ ] use modal dialog to confirm the walkthrough
17
- - [x] use progressive notify
18
- - [ ] use add commit reminder
19
- - ~~[/] add a revert last commit button~~ (use amend instead)
20
- - [ ] add more configuration to the commit composer extension
21
-
22
- ### OOP
23
-
24
- - [ ] Implement the complete annotation
25
- - [ ] Provide Documentation
26
- - [ ] Clearify the installation steps
27
-
28
- ## Usage
29
-
30
- ### Lint
31
-
32
- ```ts
33
- import lint from 'lenix/lint' with { type: "json" }
34
- {
35
- ...
36
- languageOptions: {
37
- ...,
38
- parserOptions: {
39
- projectService: true,
40
- tsconfigRootDir: import.meta.dirname,
41
- },
42
- ...,
43
- },
44
- rules: {
45
- ...,
46
- ...lint.strict,
47
- ...,
48
- }
49
- ...
50
- },
51
- ```
package/format/index.ts DELETED
@@ -1,64 +0,0 @@
1
- import { intro, outro, confirm, log, spinner } from '@clack/prompts'
2
- import { execSync } from 'child_process'
3
- import fs from 'fs'
4
-
5
- intro('Prettier Setup')
6
-
7
- const install = await confirm({
8
- message:
9
- 'Install prettier + eslint-config-prettier(to prevent conflicts)? (see https://prettier.io/docs/install)',
10
- })
11
- if (install === true) {
12
- const span = spinner()
13
- span.start('Installing...')
14
- execSync('pnpm add --save-dev --save-exact prettier eslint-config-prettier', {
15
- stdio: 'pipe',
16
- })
17
- span.stop('Installed')
18
- }
19
-
20
- const prompt = await confirm({ message: 'Create .prettierrc with a preset?' })
21
- if (prompt === true) {
22
- const preset = await import('./preset.json').then(file =>
23
- JSON.stringify(file.default, null, 2),
24
- )
25
- fs.writeFileSync('.prettierrc', `${preset}\n`)
26
- log.success('Created .prettierrc with a preset')
27
- }
28
-
29
- const ignore = await confirm({
30
- message: 'Create .prettierignore? (see https://prettier.io/docs/ignore)',
31
- })
32
- if (ignore === true) {
33
- fs.writeFileSync('.prettierignore', '# Ignore artifacts:\nbuild\ncoverage\n')
34
- log.success('Created .prettierignore')
35
- }
36
-
37
- log.warn(
38
- 'Manual (optional) β€” copy paste the import below and add "prettier" to the `end` of your ESLint extends',
39
- )
40
- log.info("---> import prettier from 'eslint-config-prettier' <---")
41
- await confirm({ message: 'Done?' })
42
-
43
- log.warn(
44
- 'Manual β€” add to .vscode/settings.json:\n "editor.formatOnSave": true,\n "editor.defaultFormatter": "esbenp.prettier-vscode"',
45
- )
46
- await confirm({ message: 'Done?' })
47
-
48
- log.warn(
49
- 'Manual (optional) β€” add to .vscode/extensions.json (inside "recommendations" array):\n "esbenp.prettier-vscode"',
50
- )
51
- log.info('like: "recommendations": ["esbenp.prettier-vscode"]')
52
- await confirm({ message: 'Done?' })
53
-
54
- const format = await confirm({
55
- message: 'Run prettier on existing files now to test it out?',
56
- })
57
- if (format === true) {
58
- const span = spinner()
59
- span.start('Formatting...')
60
- execSync('pnpm exec prettier . --write', { stdio: 'pipe' })
61
- span.stop('Formatted')
62
- }
63
-
64
- outro('Prettier setup complete!')
@@ -1,10 +0,0 @@
1
- {
2
- "experimentalTernaries": true,
3
- "experimentalOperatorPosition": "start",
4
- "tabWidth": 2,
5
- "useTabs": true,
6
- "semi": false,
7
- "singleQuote": true,
8
- "jsxSingleQuote": true,
9
- "arrowParens": "avoid"
10
- }
package/index.ts DELETED
@@ -1,17 +0,0 @@
1
- #!/usr/bin/env -S npx tsx
2
- const [, , cmd] = process.argv
3
-
4
- switch (cmd) {
5
- case 'format':
6
- await import('./format/index')
7
- break
8
- case '--lint':
9
- await import('./lint/src/lint.mts')
10
- break
11
- default:
12
- process.stdout.write(
13
- 'Usage: lenix <command>\n\nCommands:\n format Setup prettier\n --lint Setup eslint\n',
14
- )
15
- process.exit(0)
16
- }
17
- export {}
@@ -1,22 +0,0 @@
1
- export type Events = 'users-management'
2
- export interface CreateUser<Role> {
3
- identifier: string
4
- role: Role
5
- password: string
6
- }
7
- export interface UserAccount<Role, Label = string> {
8
- id: string
9
- identifier: string
10
- role: Role
11
- roleLabel: Label
12
- }
13
- export interface DeleteUser {
14
- identifier: string
15
- }
16
-
17
- /**
18
- * @private
19
- * DON NOT USE
20
- * @description
21
- * A proxy between client and server contexts that can provide a one source of truth instead of duplicating codes, lack of clearancy, race conditions, ...
22
- */
@@ -1,13 +0,0 @@
1
- /**
2
- * Get typed entries from an object (Typed Object.entries)
3
- * @param object - Object to get entries from
4
- * @returns Array of the passed entries
5
- */
6
- export const entries = <T extends Record<string, unknown>>(
7
- object: T,
8
- ): {
9
- [K in keyof T]: [K, T[K]]
10
- // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
11
- }[keyof T][] => Object.entries(object) as {
12
- [K in keyof T]: [K, T[K]]
13
- }[keyof T][]
@@ -1,21 +0,0 @@
1
- /**
2
- * A wrapper for fetch that throws an error if the request fails.
3
- * @param domain - domain of the URL (e.g. api.github.com)
4
- * @param endpoint - endpoint of the URL (e.g. users/lenixdev)
5
- * @param request - request options (e.g. { method: 'GET' })
6
- */
7
- export const caughtFetch = async (
8
- domain: string,
9
- endpoint: string,
10
- request?: RequestInit,
11
- ): Promise<Response> => {
12
- try {
13
- return await fetch(`https://${domain}/${endpoint}`, request)
14
- } catch (error) {
15
- throw new Error('An error occurred while making the request.', {
16
- cause: error,
17
- })
18
- } finally {
19
- console.debug(`End of ${domain}/${endpoint} request`)
20
- }
21
- }
@@ -1,8 +0,0 @@
1
- {
2
- "fx_version": "cerulean",
3
- "game": "gta5",
4
- "client_scripts": ["dist/client.js"],
5
- "server_scripts": ["dist/server.js"],
6
- "ui_page": "client/nui/dist/index.html",
7
- "files": ["client/nui/dist/**"]
8
- }
@@ -1,24 +0,0 @@
1
- import { writeFile } from 'fs/promises'
2
- type FileContent = Parameters<typeof writeFile>[1]
3
-
4
- const fxmanifest = Object.entries((await import('./fxmanifest.json')).default)
5
-
6
- const generateContent = () => {
7
- let defaultContent: FileContent = ''
8
- for (const [key, value] of fxmanifest) {
9
- if (Array.isArray(value)) {
10
- defaultContent += `${key} {
11
- "${value}",
12
- }
13
- `
14
- } else if (typeof value === 'string') {
15
- defaultContent += `${key} "${value}"
16
- `
17
- } else throw new Error('Invalid value type')
18
- }
19
- return defaultContent
20
- }
21
-
22
- export const createFxmanifest = async (content?: FileContent) => {
23
- await writeFile('fxmanifest.lua', content || generateContent())
24
- }
@@ -1,7 +0,0 @@
1
- {
2
- "extends": "../../../tsconfig.json",
3
- "compilerOptions": {
4
- "moduleResolution": "bundler",
5
- "resolveJsonModule": true
6
- }
7
- }
@@ -1,11 +0,0 @@
1
- /**
2
- * Checks if the value is one of the values in the array
3
- * @param value - The value to check
4
- * @param from - The array of values to check from
5
- * @returns boolean, True if the value is one of the values in the array, False otherwise
6
- * @example
7
- * guard(1, [1, 2, 3]): true
8
- * guard(4, [1, 2, 3]): false
9
- */
10
- export const guard = <T>(value: unknown, from: readonly T[]): value is T =>
11
- (from as readonly unknown[]).includes(value)
@@ -1,6 +0,0 @@
1
- export { wait } from './wait'
2
- export { caughtFetch } from './fetch'
3
- export { entries } from './entries'
4
- export { raise } from './raise'
5
- export { guard } from './guard'
6
- export type * as edge from './edge'
@@ -1,349 +0,0 @@
1
- {
2
- "strict": {
3
- "accessor-pairs": "error",
4
- "array-callback-return": "warn",
5
- "arrow-body-style": "warn",
6
- "block-scoped-var": "error",
7
- "camelcase": "warn",
8
- "capitalized-comments": "warn",
9
- "class-methods-use-this": "error",
10
- "complexity": "warn",
11
- "consistent-return": "warn",
12
- "consistent-this": "warn",
13
- "constructor-super": "warn",
14
- "curly": ["error", "multi"],
15
- "default-case": "error",
16
- "default-case-last": "error",
17
- "default-param-last": "error",
18
- "dot-notation": "error",
19
- "eqeqeq": "error",
20
- "for-direction": "error",
21
- "func-name-matching": "error",
22
- "func-names": "warn",
23
- "func-style": "error",
24
- "getter-return": "error",
25
- "grouped-accessor-pairs": "error",
26
- "guard-for-in": "warn",
27
- "id-denylist": "warn",
28
- "id-length": [
29
- "error",
30
- {
31
- "exceptions": ["_"]
32
- }
33
- ],
34
- "id-match": "error",
35
- "init-declarations": "error",
36
- "logical-assignment-operators": "error",
37
- "max-classes-per-file": "error",
38
- "max-depth": "error",
39
- "max-lines": "error",
40
- "max-lines-per-function": "warn",
41
- "max-nested-callbacks": "error",
42
- "max-params": "error",
43
- "max-statements": "error",
44
- "new-cap": "warn",
45
- "no-alert": "error",
46
- "no-array-constructor": "warn",
47
- "no-async-promise-executor": "warn",
48
- "no-await-in-loop": "warn",
49
- "no-bitwise": "warn",
50
- "no-caller": "warn",
51
- "no-case-declarations": "warn",
52
- "no-class-assign": "error",
53
- "no-compare-neg-zero": "error",
54
- "no-cond-assign": "warn",
55
- "no-console": "warn",
56
- "no-const-assign": "error",
57
- "no-constant-binary-expression": "warn",
58
- "no-constant-condition": "warn",
59
- "no-constructor-return": "error",
60
- "no-continue": "error",
61
- "no-control-regex": "warn",
62
- "no-debugger": "error",
63
- "no-delete-var": "error",
64
- "no-div-regex": "warn",
65
- "no-dupe-args": "error",
66
- "no-dupe-class-members": "error",
67
- "no-dupe-else-if": "error",
68
- "no-dupe-keys": "error",
69
- "no-duplicate-case": "error",
70
- "no-duplicate-imports": "error",
71
- "no-else-return": "error",
72
- "no-empty": "error",
73
- "no-empty-character-class": "warn",
74
- "no-empty-function": "error",
75
- "no-empty-pattern": "error",
76
- "no-empty-static-block": "error",
77
- "no-eq-null": "error",
78
- "no-eval": "error",
79
- "no-ex-assign": "error",
80
- "no-extend-native": "warn",
81
- "no-extra-bind": "warn",
82
- "no-extra-boolean-cast": "warn",
83
- "no-extra-label": "warn",
84
- "no-fallthrough": "warn",
85
- "no-func-assign": "error",
86
- "no-global-assign": "error",
87
- "no-implicit-coercion": "warn",
88
- "no-implicit-globals": "error",
89
- "no-implied-eval": "error",
90
- "no-import-assign": "error",
91
- "no-inline-comments": "warn",
92
- "no-inner-declarations": "error",
93
- "no-invalid-regexp": "warn",
94
- "no-invalid-this": "error",
95
- "no-irregular-whitespace": "warn",
96
- "no-iterator": "warn",
97
- "no-label-var": "error",
98
- "no-labels": "error",
99
- "no-lone-blocks": "error",
100
- "no-lonely-if": "error",
101
- "no-loop-func": "warn",
102
- "no-loss-of-precision": "error",
103
- "no-magic-numbers": [
104
- "warn",
105
- {
106
- "detectObjects": true,
107
- "enforceConst": true,
108
- "ignoreReadonlyClassProperties": true
109
- }
110
- ],
111
- "no-misleading-character-class": "warn",
112
- "no-multi-assign": "error",
113
- "no-multi-str": "error",
114
- "no-negated-condition": "warn",
115
- "no-nested-ternary": "error",
116
- "no-new": "error",
117
- "no-new-func": "error",
118
- "no-new-native-nonconstructor": "warn",
119
- "no-new-wrappers": "warn",
120
- "no-nonoctal-decimal-escape": "warn",
121
- "no-obj-calls": "warn",
122
- "no-object-constructor": "warn",
123
- "no-octal": "error",
124
- "no-octal-escape": "warn",
125
- "no-param-reassign": "warn",
126
- "no-plusplus": "warn",
127
- "no-promise-executor-return": "error",
128
- "no-proto": "warn",
129
- "no-prototype-builtins": "warn",
130
- "no-redeclare": "error",
131
- "no-regex-spaces": "warn",
132
- "no-restricted-exports": "error",
133
- "no-restricted-globals": "warn",
134
- "no-restricted-imports": "warn",
135
- "no-restricted-properties": "warn",
136
- "no-restricted-syntax": "warn",
137
- "no-return-assign": "error",
138
- "no-script-url": "warn",
139
- "no-self-assign": "error",
140
- "no-self-compare": "error",
141
- "no-sequences": "warn",
142
- "no-setter-return": "error",
143
- "no-shadow": "warn",
144
- "no-shadow-restricted-names": "error",
145
- "no-sparse-arrays": "error",
146
- "no-template-curly-in-string": "error",
147
- "no-this-before-super": "error",
148
- "no-throw-literal": "error",
149
- "no-unassigned-vars": "error",
150
- "no-undef": "error",
151
- "no-undef-init": "error",
152
- "no-undefined": "off",
153
- "no-underscore-dangle": "warn",
154
- "no-unexpected-multiline": "error",
155
- "no-unmodified-loop-condition": "warn",
156
- "no-unneeded-ternary": "error",
157
- "no-unreachable": "error",
158
- "no-unreachable-loop": "warn",
159
- "no-unsafe-finally": "warn",
160
- "no-unsafe-negation": "warn",
161
- "no-unsafe-optional-chaining": "error",
162
- "no-unused-expressions": "error",
163
- "no-unused-labels": "error",
164
- "no-unused-private-class-members": "error",
165
- "no-unused-vars": "error",
166
- "no-use-before-define": "error",
167
- "no-useless-assignment": "error",
168
- "no-useless-backreference": "warn",
169
- "no-useless-call": "warn",
170
- "no-useless-catch": "error",
171
- "no-useless-computed-key": "warn",
172
- "no-useless-concat": "error",
173
- "no-useless-constructor": "warn",
174
- "no-useless-escape": "warn",
175
- "no-useless-rename": "error",
176
- "no-useless-return": "error",
177
- "no-var": "error",
178
- "no-void": "error",
179
- "no-warning-comments": "warn",
180
- "no-with": "error",
181
- "object-shorthand": "error",
182
- "one-var": "off",
183
- "operator-assignment": "warn",
184
- "prefer-arrow-callback": "error",
185
- "prefer-const": "error",
186
- "prefer-destructuring": "error",
187
- "prefer-exponentiation-operator": "error",
188
- "prefer-named-capture-group": "warn",
189
- "prefer-numeric-literals": "warn",
190
- "prefer-object-has-own": "warn",
191
- "prefer-object-spread": "error",
192
- "prefer-promise-reject-errors": "warn",
193
- "prefer-regex-literals": "warn",
194
- "prefer-rest-params": "error",
195
- "prefer-spread": "error",
196
- "prefer-template": "error",
197
- "preserve-caught-error": "error",
198
- "radix": "warn",
199
- "require-atomic-updates": "warn",
200
- "require-await": "error",
201
- "require-unicode-regexp": "warn",
202
- "require-yield": "error",
203
- "sort-imports": "off",
204
- "sort-keys": "off",
205
- "sort-vars": "error",
206
- "strict": "error",
207
- "symbol-description": "error",
208
- "unicode-bom": "warn",
209
- "use-isnan": "error",
210
- "valid-typeof": "error",
211
- "vars-on-top": "error",
212
- "yoda": "error",
213
- "@typescript-eslint/adjacent-overload-signatures": "error",
214
- "@typescript-eslint/array-type": "error",
215
- "@typescript-eslint/ban-ts-comment": "error",
216
- "@typescript-eslint/ban-tslint-comment": "error",
217
- "@typescript-eslint/class-literal-property-style": "warn",
218
- "@typescript-eslint/class-methods-use-this": "warn",
219
- "@typescript-eslint/consistent-generic-constructors": "error",
220
- "@typescript-eslint/consistent-indexed-object-style": "error",
221
- "@typescript-eslint/consistent-type-assertions": "error",
222
- "@typescript-eslint/consistent-type-definitions": "error",
223
- "@typescript-eslint/consistent-type-imports": "error",
224
- "@typescript-eslint/default-param-last": "warn",
225
- "@typescript-eslint/explicit-function-return-type": "off",
226
- "@typescript-eslint/explicit-member-accessibility": "warn",
227
- "@typescript-eslint/explicit-module-boundary-types": "off",
228
- "@typescript-eslint/init-declarations": "error",
229
- "@typescript-eslint/max-params": "error",
230
- "@typescript-eslint/member-ordering": "error",
231
- "@typescript-eslint/method-signature-style": "error",
232
- "@typescript-eslint/no-array-constructor": "error",
233
- "@typescript-eslint/no-confusing-non-null-assertion": "error",
234
- "@typescript-eslint/no-duplicate-enum-values": "error",
235
- "@typescript-eslint/no-dynamic-delete": "error",
236
- "@typescript-eslint/no-empty-function": "error",
237
- "@typescript-eslint/no-empty-object-type": "error",
238
- "@typescript-eslint/no-explicit-any": "error",
239
- "@typescript-eslint/no-extra-non-null-assertion": "error",
240
- "@typescript-eslint/no-extraneous-class": "error",
241
- "@typescript-eslint/no-import-type-side-effects": "error",
242
- "@typescript-eslint/no-inferrable-types": "error",
243
- "@typescript-eslint/no-invalid-void-type": "error",
244
- "@typescript-eslint/no-loop-func": "error",
245
- "@typescript-eslint/no-magic-numbers": "off",
246
- "@typescript-eslint/no-misused-new": "error",
247
- "@typescript-eslint/no-namespace": "error",
248
- "@typescript-eslint/no-non-null-asserted-nullish-coalescing": "warn",
249
- "@typescript-eslint/no-non-null-asserted-optional-chain": "error",
250
- "@typescript-eslint/no-non-null-assertion": "error",
251
- "@typescript-eslint/no-redeclare": "warn",
252
- "@typescript-eslint/no-require-imports": "error",
253
- "@typescript-eslint/no-restricted-imports": "warn",
254
- "@typescript-eslint/no-restricted-types": "warn",
255
- "@typescript-eslint/no-shadow": "warn",
256
- "@typescript-eslint/no-this-alias": "error",
257
- "@typescript-eslint/no-unnecessary-parameter-property-assignment": "error",
258
- "@typescript-eslint/no-unnecessary-type-constraint": "error",
259
- "@typescript-eslint/no-unsafe-declaration-merging": "error",
260
- "@typescript-eslint/no-unsafe-function-type": "error",
261
- "@typescript-eslint/no-unused-expressions": "warn",
262
- "@typescript-eslint/no-unused-private-class-members": "error",
263
- "@typescript-eslint/no-unused-vars": "off",
264
- "@typescript-eslint/no-use-before-define": "error",
265
- "@typescript-eslint/no-useless-constructor": "error",
266
- "@typescript-eslint/no-useless-empty-export": "error",
267
- "@typescript-eslint/no-wrapper-object-types": "error",
268
- "@typescript-eslint/prefer-as-const": "error",
269
- "@typescript-eslint/prefer-enum-initializers": "error",
270
- "@typescript-eslint/prefer-for-of": "error",
271
- "@typescript-eslint/prefer-function-type": "error",
272
- "@typescript-eslint/prefer-literal-enum-member": "error",
273
- "@typescript-eslint/prefer-namespace-keyword": "error",
274
- "@typescript-eslint/triple-slash-reference": "error",
275
- "@typescript-eslint/unified-signatures": "error",
276
- "@typescript-eslint/await-thenable": "warn",
277
- "@typescript-eslint/consistent-return": "off",
278
- "@typescript-eslint/consistent-type-exports": "error",
279
- "@typescript-eslint/dot-notation": "error",
280
- "@typescript-eslint/naming-convention": [
281
- "warn",
282
- {
283
- "selector": "variable",
284
- "format": ["camelCase", "UPPER_CASE", "PascalCase"]
285
- }
286
- ],
287
- "@typescript-eslint/no-array-delete": "error",
288
- "@typescript-eslint/no-base-to-string": "warn",
289
- "@typescript-eslint/no-confusing-void-expression": "error",
290
- "@typescript-eslint/no-deprecated": "error",
291
- "@typescript-eslint/no-duplicate-type-constituents": "error",
292
- "@typescript-eslint/no-floating-promises": "warn",
293
- "@typescript-eslint/no-for-in-array": "error",
294
- "@typescript-eslint/no-implied-eval": "error",
295
- "@typescript-eslint/no-meaningless-void-operator": "error",
296
- "@typescript-eslint/no-misused-promises": "error",
297
- "@typescript-eslint/no-misused-spread": "error",
298
- "@typescript-eslint/no-mixed-enums": "error",
299
- "@typescript-eslint/no-redundant-type-constituents": "error",
300
- "@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
301
- "@typescript-eslint/no-unnecessary-condition": "error",
302
- "@typescript-eslint/no-unnecessary-qualifier": "warn",
303
- "@typescript-eslint/no-unnecessary-template-expression": "error",
304
- "@typescript-eslint/no-unnecessary-type-arguments": "error",
305
- "@typescript-eslint/no-unnecessary-type-assertion": "error",
306
- "@typescript-eslint/no-unnecessary-type-conversion": "error",
307
- "@typescript-eslint/no-unnecessary-type-parameters": "error",
308
- "@typescript-eslint/no-unsafe-argument": "warn",
309
- "@typescript-eslint/no-unsafe-assignment": "warn",
310
- "@typescript-eslint/no-unsafe-call": "warn",
311
- "@typescript-eslint/no-unsafe-enum-comparison": "error",
312
- "@typescript-eslint/no-unsafe-member-access": "warn",
313
- "@typescript-eslint/no-unsafe-return": "error",
314
- "@typescript-eslint/no-unsafe-type-assertion": "error",
315
- "@typescript-eslint/no-unsafe-unary-minus": "warn",
316
- "@typescript-eslint/no-useless-default-assignment": "error",
317
- "@typescript-eslint/non-nullable-type-assertion-style": "warn",
318
- "@typescript-eslint/only-throw-error": "error",
319
- "@typescript-eslint/prefer-destructuring": "error",
320
- "@typescript-eslint/prefer-find": "error",
321
- "@typescript-eslint/prefer-includes": "error",
322
- "@typescript-eslint/prefer-nullish-coalescing": "error",
323
- "@typescript-eslint/prefer-optional-chain": "error",
324
- "@typescript-eslint/prefer-promise-reject-errors": "error",
325
- "@typescript-eslint/prefer-readonly": "error",
326
- "@typescript-eslint/prefer-readonly-parameter-types": [
327
- "off",
328
- {
329
- "ignoreInferredTypes": true
330
- }
331
- ],
332
- "@typescript-eslint/prefer-reduce-type-parameter": "error",
333
- "@typescript-eslint/prefer-regexp-exec": "warn",
334
- "@typescript-eslint/prefer-return-this-type": "error",
335
- "@typescript-eslint/prefer-string-starts-ends-with": "error",
336
- "@typescript-eslint/promise-function-async": "error",
337
- "@typescript-eslint/related-getter-setter-pairs": "error",
338
- "@typescript-eslint/require-array-sort-compare": "error",
339
- "@typescript-eslint/require-await": "error",
340
- "@typescript-eslint/restrict-plus-operands": "error",
341
- "@typescript-eslint/restrict-template-expressions": "error",
342
- "@typescript-eslint/return-await": "error",
343
- "@typescript-eslint/strict-boolean-expressions": "error",
344
- "@typescript-eslint/strict-void-return": "off",
345
- "@typescript-eslint/switch-exhaustiveness-check": "error",
346
- "@typescript-eslint/unbound-method": "warn",
347
- "@typescript-eslint/use-unknown-in-catch-callback-variable": "error"
348
- }
349
- }
@@ -1,9 +0,0 @@
1
- /**
2
- * Throws an error.
3
- * @param error - The error to throw, can be a source of the error.
4
- * @param cause - The cause of the error.
5
- * @returns never, will crash the runtime.
6
- * @example
7
- * foo().catch(raise)
8
- */
9
- export const raise = (error: unknown, cause?: unknown): never => { throw new Error(String(error), { cause }) }
@@ -1,7 +0,0 @@
1
- /**
2
- * Delay execution for a given duration.
3
- * @param ms - Duration in milliseconds (1000ms = 1 second)
4
- */
5
- export const wait = async (ms: number): Promise<void> => {
6
- await new Promise(resolve => { setTimeout(resolve, ms) })
7
- }
package/oop/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Lenix
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.