lenix 1.3.40 β†’ 1.4.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
@@ -1,96 +1,20 @@
1
1
  # lenix
2
2
 
3
- The Monorepo for the software engineering community
4
-
5
- ![](https://img.shields.io/npm/d18m/lenix)
6
- ![](https://img.shields.io/npm/v/lenix)
7
-
8
- ## πŸ”— Depend
9
- ```json
10
- "lenix": "latest",
11
- ```
12
-
13
- ## πŸ“₯ Install
14
- ### NPM
15
- ```bash
16
- npm i lenix
17
- ```
18
- ### PNPM
19
- ```bash
20
- pnpm i lenix
21
- ```
22
- ### BUN
23
- ```bash
24
- bun i lenix
25
- ```
26
- ### YARN
27
- ```bash
28
- yarn add lenix
29
- ```
30
-
31
- ## GitHub
32
- [![](https://img.shields.io/badge/github-%23121011.svg?style=for-the-badge&logo=github&logoColor=white)](https://github.com/lenixdev/lenix)
3
+ The All-in-one Repository
33
4
 
34
5
  ## πŸ—ΊοΈ Roadmap
6
+ ### Lint
35
7
  - [ ] fix the lint tsconfig.json file creation when no file is found
36
- - [-] trim the diff's unusefull text
8
+ ### Extension
9
+ - [x] trim the diff's unusefull text
37
10
  - [ ] use walkthrough instead of custom page
38
11
  - [ ] use webview to add quick settings
39
12
  - [ ] use modal dialog to confirm the walkthrough
40
13
  - [x] use progressive notify
41
14
  - [ ] use add commit reminder
42
- - [ ] add a revert last commit button
43
-
44
- ## 🧾License
45
- ![](https://img.shields.io/npm/l/lenix)
46
-
47
- ## πŸ“ž Support
48
- [![](https://img.shields.io/badge/Discord-%235865F2.svg?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/users/886958797631926373)
49
-
50
- ## πŸ’» Build with
51
- ![](https://img.shields.io/badge/typescript-%23007ACC.svg?style=for-the-badge&logo=typescript&logoColor=white)
52
- ![](https://img.shields.io/badge/node.js-%23007ACC.svg?style=for-the-badge&logo=node.js&logoColor=white)
53
-
54
- # Lua Object Oriented Programming Class Module
55
-
56
- Lua object oriented programming class module allow you to use oop similar to the TypeScript/JavaScript/Java/C++ Classes
57
-
58
- ## πŸ—ΊοΈ Roadmap
15
+ - ~~[/] add a revert last commit button~~ (use amend instead)
16
+ - [ ] add more configuration to the commit composer extension
17
+ ### OOP
59
18
  - [ ] Implement the complete annotation
60
19
  - [ ] Provide Documentation
61
- - [ ] Clearify the installation steps
62
-
63
- ## Lua Modules Setup
64
-
65
- Auto-configure Lua to use `./lua_modules` (like `node_modules`) instead of unorganized directories.
66
-
67
- ### Install
68
- - MAC
69
- ```bash
70
- npx mac-lua-modules
71
- ```
72
-
73
- ### Usage
74
- ```bash
75
- # Install Lua packages
76
- luarocks install --tree ./lua_modules inspect
77
-
78
- # Use in code (no setup needed)
79
- local inspect = require('inspect')
80
- print(inspect({name = "Lenix"}))
81
- ```
82
-
83
- ### What it does
84
-
85
- Adds environment variables to your shell config (for mac users: `~/.zshrc` or `~/.bashrc`) to automatically change your Lua modules configurations to `./lua_modules` instead of hidden nested directories.
86
-
87
-
88
- ## ESLINT Usage
89
- ### Build your own linter
90
- ```zsh
91
- npx lenix --lint
92
- ```
93
- ### Clone a preset lint
94
- ```zsh
95
- npx lenix --lint --preset
96
- ```
20
+ - [ ] Clearify the installation steps
@@ -1,6 +1,5 @@
1
1
  #!/usr/bin/env node
2
2
  import fs from 'fs';
3
- import { fileURLToPath } from 'url';
4
3
  import path from 'path';
5
4
  import eslintJs from '@eslint/js';
6
5
  import tseslint from 'typescript-eslint';
@@ -10,7 +9,6 @@ if (cmd !== '--lint') {
10
9
  process.exit(0);
11
10
  }
12
11
  process.argv = [process.argv[0], process.argv[1], ...args];
13
- const __dirname = path.dirname(fileURLToPath(import.meta.url));
14
12
  const c = { reset: '\x1b[0m', bold: '\x1b[1m', dim: '\x1b[2m', cyan: '\x1b[36m', yellow: '\x1b[33m', green: '\x1b[32m', red: '\x1b[31m', blue: '\x1b[34m', magenta: '\x1b[35m', gray: '\x1b[90m' };
15
13
  const title = (s) => `${c.bold}${c.cyan}${s}${c.reset}`;
16
14
  const section = (s) => `\n${c.bold}${c.blue}━━ ${s} ━━${c.reset}`;
@@ -145,48 +143,38 @@ function askSection(label, rules, state) {
145
143
  function generateConfig(allRules) {
146
144
  const core = {};
147
145
  const ts = {};
148
- const reactR = {};
149
- const imp = {};
150
146
  for (const [k, v] of Object.entries(allRules)) {
151
147
  if (k.startsWith('@typescript-eslint/'))
152
148
  ts[k] = v;
153
- else if (k.startsWith('react/') || k.startsWith('react-hooks/'))
154
- reactR[k] = v;
155
- else if (k.startsWith('import/'))
156
- imp[k] = v;
157
149
  else
158
150
  core[k] = v;
159
151
  }
160
- const hasTs = Object.keys(ts).length > 0;
161
- const hasReact = Object.keys(reactR).length > 0;
162
- const hasImp = Object.keys(imp).length > 0;
163
- const hasCore = Object.keys(core).length > 0;
164
- const ind = (o, n) => JSON.stringify(o, null, 2).split('\n').map((l, i) => i === 0 ? l : ' '.repeat(n) + l).join('\n');
152
+ const ind = (o) => JSON.stringify(o, null, 2).split('\n').map((l, i) => i === 0 ? l : ' ' + l).join('\n');
165
153
  return [
166
154
  `import js from '@eslint/js'`,
167
155
  `import globals from 'globals'`,
168
- hasTs ? `import tseslint from 'typescript-eslint'` : '',
169
- hasReact ? `import pluginReact from 'eslint-plugin-react'` : '',
170
- hasReact ? `import reactHooks from 'eslint-plugin-react-hooks'` : '',
171
- hasImp ? `import importPlugin from 'eslint-plugin-import'` : '',
156
+ `import tseslint from 'typescript-eslint'`,
157
+ `import { dirname } from 'path'`,
158
+ `import { fileURLToPath } from 'url'`,
159
+ ``,
160
+ `const __dirname = dirname(fileURLToPath(import.meta.url))`,
172
161
  ``,
173
162
  `export default [`,
174
- ` { ignores: ['node_modules'] },`,
175
- hasTs ? ` ...tseslint.configs.strictTypeChecked.map(config => ({ ...config, files: ['**/*.{ts,tsx,mts}'] })),` : '',
163
+ ` { ignores: ['node_modules', 'dist'] },`,
176
164
  ` js.configs.recommended,`,
165
+ ` ...tseslint.configs.strictTypeChecked,`,
177
166
  ` {`,
178
167
  ` files: ['**/*.{ts,tsx,mts}'],`,
179
168
  ` languageOptions: {`,
180
169
  ` globals: { ...globals.browser, ...globals.node },`,
181
- hasTs ? ` parserOptions: {\n projectService: true,\n tsconfigRootDir: import.meta.dirname,\n },` : '',
170
+ ` parserOptions: {`,
171
+ ` projectService: true,`,
172
+ ` tsconfigRootDir: __dirname,`,
173
+ ` },`,
182
174
  ` },`,
183
- hasCore ? ` rules: ${ind(core, 4)},` : '',
175
+ ` rules: ${ind(core)},`,
184
176
  ` },`,
185
- hasTs ? ` {\n files: ['**/*.{ts,tsx,mts}'],\n rules: ${ind(ts, 4)},\n },` : '',
186
- hasReact ? ` pluginReact.configs.flat['jsx-runtime'],` : '',
187
- hasReact ? ` { settings: { react: { version: 'detect' } } },` : '',
188
- hasReact ? ` {\n plugins: { 'react-hooks': reactHooks },\n rules: ${ind(reactR, 4)},\n },` : '',
189
- hasImp ? ` {\n plugins: { import: importPlugin },\n rules: ${ind(imp, 4)},\n },` : '',
177
+ Object.keys(ts).length > 0 ? ` {\n files: ['**/*.{ts,tsx,mts}'],\n rules: ${ind(ts)},\n },` : '',
190
178
  `]`,
191
179
  ].filter(Boolean).join('\n');
192
180
  }
@@ -202,7 +190,8 @@ if (clone) {
202
190
  }
203
191
  const preset = process.argv.includes('--preset');
204
192
  if (preset) {
205
- const res = await fetch('https://raw.githubusercontent.com/LenixDev/lenix/refs/heads/main/bin/lint-preset.json');
193
+ process.stdout.write(`${tag('IMPORTANT', c.red)}: This tool is deprecated, import our rules instead, e.g ${bold('import { lint } from "lenix"')}`);
194
+ const res = await fetch('https://raw.githubusercontent.com/LenixDev/lenix/refs/heads/main/lint/src/lint-preset.json');
206
195
  const data = await res.json();
207
196
  const config = generateConfig(data.rules);
208
197
  fs.writeFileSync('eslint.config.mts', config, 'utf8');
@@ -212,6 +201,7 @@ if (preset) {
212
201
  process.exit(0);
213
202
  }
214
203
  async function main() {
204
+ process.stdout.write(`${tag('IMPORTANT', c.red)}: This tool is deprecated')}`);
215
205
  process.stdout.write('\x1Bc');
216
206
  process.stdout.write(title('╔═══════════════════════╗\n'));
217
207
  process.stdout.write(title('β•‘ ESLint Config β•‘\n'));
@@ -3,4 +3,4 @@
3
3
  * @param endpoint - endpoint of the URL (e.g. users/lenixdev)
4
4
  * @param request - request options (e.g. { method: 'GET' })
5
5
  */
6
- export declare const safeRequest: (domain: string, endpoint: string, request?: RequestInit) => Promise<Response>;
6
+ export declare const caughtFetch: (domain: string, endpoint: string, request?: RequestInit) => Promise<Response>;
@@ -3,7 +3,7 @@
3
3
  * @param endpoint - endpoint of the URL (e.g. users/lenixdev)
4
4
  * @param request - request options (e.g. { method: 'GET' })
5
5
  */
6
- export const safeRequest = async (domain, endpoint, request) => {
6
+ export const caughtFetch = async (domain, endpoint, request) => {
7
7
  try {
8
8
  return await fetch(`https://${domain}/${endpoint}`, request);
9
9
  }
@@ -1,3 +1,4 @@
1
1
  export { wait } from './wait';
2
- export { safeRequest } from './fetch';
2
+ export { caughtFetch } from './fetch';
3
3
  export { entries } from './entries';
4
+ export { lint } from './lint';
@@ -1,3 +1,4 @@
1
1
  export { wait } from './wait';
2
- export { safeRequest } from './fetch';
2
+ export { caughtFetch } from './fetch';
3
3
  export { entries } from './entries';
4
+ export { lint } from './lint';
@@ -0,0 +1,342 @@
1
+ /**
2
+ * Load eslint preset rules.
3
+ * @see https://raw.githubusercontent.com/LenixDev/lenix/refs/heads/main/lint/src/lint-preset.json
4
+ */
5
+ export declare const lint: {
6
+ strict: {
7
+ "accessor-pairs": string;
8
+ "array-callback-return": string;
9
+ "arrow-body-style": string;
10
+ "block-scoped-var": string;
11
+ camelcase: string;
12
+ "capitalized-comments": string;
13
+ "class-methods-use-this": string;
14
+ complexity: string;
15
+ "consistent-return": string;
16
+ "consistent-this": string;
17
+ "constructor-super": string;
18
+ curly: string[];
19
+ "default-case": string;
20
+ "default-case-last": string;
21
+ "default-param-last": string;
22
+ "dot-notation": string;
23
+ eqeqeq: string;
24
+ "for-direction": string;
25
+ "func-name-matching": string;
26
+ "func-names": string;
27
+ "func-style": string;
28
+ "getter-return": string;
29
+ "grouped-accessor-pairs": string;
30
+ "guard-for-in": string;
31
+ "id-denylist": string;
32
+ "id-length": (string | {
33
+ exceptions: string[];
34
+ })[];
35
+ "id-match": string;
36
+ "init-declarations": string;
37
+ "logical-assignment-operators": string;
38
+ "max-classes-per-file": string;
39
+ "max-depth": string;
40
+ "max-lines": string;
41
+ "max-lines-per-function": string;
42
+ "max-nested-callbacks": string;
43
+ "max-params": string;
44
+ "max-statements": string;
45
+ "new-cap": string;
46
+ "no-alert": string;
47
+ "no-array-constructor": string;
48
+ "no-async-promise-executor": string;
49
+ "no-await-in-loop": string;
50
+ "no-bitwise": string;
51
+ "no-caller": string;
52
+ "no-case-declarations": string;
53
+ "no-class-assign": string;
54
+ "no-compare-neg-zero": string;
55
+ "no-cond-assign": string;
56
+ "no-console": string;
57
+ "no-const-assign": string;
58
+ "no-constant-binary-expression": string;
59
+ "no-constant-condition": string;
60
+ "no-constructor-return": string;
61
+ "no-continue": string;
62
+ "no-control-regex": string;
63
+ "no-debugger": string;
64
+ "no-delete-var": string;
65
+ "no-div-regex": string;
66
+ "no-dupe-args": string;
67
+ "no-dupe-class-members": string;
68
+ "no-dupe-else-if": string;
69
+ "no-dupe-keys": string;
70
+ "no-duplicate-case": string;
71
+ "no-duplicate-imports": string;
72
+ "no-else-return": string;
73
+ "no-empty": string;
74
+ "no-empty-character-class": string;
75
+ "no-empty-function": string;
76
+ "no-empty-pattern": string;
77
+ "no-empty-static-block": string;
78
+ "no-eq-null": string;
79
+ "no-eval": string;
80
+ "no-ex-assign": string;
81
+ "no-extend-native": string;
82
+ "no-extra-bind": string;
83
+ "no-extra-boolean-cast": string;
84
+ "no-extra-label": string;
85
+ "no-fallthrough": string;
86
+ "no-func-assign": string;
87
+ "no-global-assign": string;
88
+ "no-implicit-coercion": string;
89
+ "no-implicit-globals": string;
90
+ "no-implied-eval": string;
91
+ "no-import-assign": string;
92
+ "no-inline-comments": string;
93
+ "no-inner-declarations": string;
94
+ "no-invalid-regexp": string;
95
+ "no-invalid-this": string;
96
+ "no-irregular-whitespace": string;
97
+ "no-iterator": string;
98
+ "no-label-var": string;
99
+ "no-labels": string;
100
+ "no-lone-blocks": string;
101
+ "no-lonely-if": string;
102
+ "no-loop-func": string;
103
+ "no-loss-of-precision": string;
104
+ "no-magic-numbers": (string | {
105
+ detectObjects: boolean;
106
+ enforceConst: boolean;
107
+ ignore: number[];
108
+ ignoreReadonlyClassProperties: boolean;
109
+ })[];
110
+ "no-misleading-character-class": string;
111
+ "no-multi-assign": string;
112
+ "no-multi-str": string;
113
+ "no-negated-condition": string;
114
+ "no-nested-ternary": string;
115
+ "no-new": string;
116
+ "no-new-func": string;
117
+ "no-new-native-nonconstructor": string;
118
+ "no-new-wrappers": string;
119
+ "no-nonoctal-decimal-escape": string;
120
+ "no-obj-calls": string;
121
+ "no-object-constructor": string;
122
+ "no-octal": string;
123
+ "no-octal-escape": string;
124
+ "no-param-reassign": string;
125
+ "no-plusplus": string;
126
+ "no-promise-executor-return": string;
127
+ "no-proto": string;
128
+ "no-prototype-builtins": string;
129
+ "no-redeclare": string;
130
+ "no-regex-spaces": string;
131
+ "no-restricted-exports": string;
132
+ "no-restricted-globals": string;
133
+ "no-restricted-imports": string;
134
+ "no-restricted-properties": string;
135
+ "no-restricted-syntax": string;
136
+ "no-return-assign": string;
137
+ "no-script-url": string;
138
+ "no-self-assign": string;
139
+ "no-self-compare": string;
140
+ "no-sequences": string;
141
+ "no-setter-return": string;
142
+ "no-shadow": string;
143
+ "no-shadow-restricted-names": string;
144
+ "no-sparse-arrays": string;
145
+ "no-template-curly-in-string": string;
146
+ "no-this-before-super": string;
147
+ "no-throw-literal": string;
148
+ "no-unassigned-vars": string;
149
+ "no-undef": string;
150
+ "no-undef-init": string;
151
+ "no-undefined": string;
152
+ "no-underscore-dangle": string;
153
+ "no-unexpected-multiline": string;
154
+ "no-unmodified-loop-condition": string;
155
+ "no-unneeded-ternary": string;
156
+ "no-unreachable": string;
157
+ "no-unreachable-loop": string;
158
+ "no-unsafe-finally": string;
159
+ "no-unsafe-negation": string;
160
+ "no-unsafe-optional-chaining": string;
161
+ "no-unused-expressions": string;
162
+ "no-unused-labels": string;
163
+ "no-unused-private-class-members": string;
164
+ "no-unused-vars": string;
165
+ "no-use-before-define": string;
166
+ "no-useless-assignment": string;
167
+ "no-useless-backreference": string;
168
+ "no-useless-call": string;
169
+ "no-useless-catch": string;
170
+ "no-useless-computed-key": string;
171
+ "no-useless-concat": string;
172
+ "no-useless-constructor": string;
173
+ "no-useless-escape": string;
174
+ "no-useless-rename": string;
175
+ "no-useless-return": string;
176
+ "no-var": string;
177
+ "no-void": string;
178
+ "no-warning-comments": string;
179
+ "no-with": string;
180
+ "object-shorthand": string;
181
+ "one-var": string;
182
+ "operator-assignment": string;
183
+ "prefer-arrow-callback": string;
184
+ "prefer-const": string;
185
+ "prefer-destructuring": string;
186
+ "prefer-exponentiation-operator": string;
187
+ "prefer-named-capture-group": string;
188
+ "prefer-numeric-literals": string;
189
+ "prefer-object-has-own": string;
190
+ "prefer-object-spread": string;
191
+ "prefer-promise-reject-errors": string;
192
+ "prefer-regex-literals": string;
193
+ "prefer-rest-params": string;
194
+ "prefer-spread": string;
195
+ "prefer-template": string;
196
+ "preserve-caught-error": string;
197
+ radix: string;
198
+ "require-atomic-updates": string;
199
+ "require-await": string;
200
+ "require-unicode-regexp": string;
201
+ "require-yield": string;
202
+ "sort-imports": string;
203
+ "sort-keys": string;
204
+ "sort-vars": string;
205
+ strict: string;
206
+ "symbol-description": string;
207
+ "unicode-bom": string;
208
+ "use-isnan": string;
209
+ "valid-typeof": string;
210
+ "vars-on-top": string;
211
+ yoda: string;
212
+ "@typescript-eslint/adjacent-overload-signatures": string;
213
+ "@typescript-eslint/array-type": string;
214
+ "@typescript-eslint/ban-ts-comment": string;
215
+ "@typescript-eslint/ban-tslint-comment": string;
216
+ "@typescript-eslint/class-literal-property-style": string;
217
+ "@typescript-eslint/class-methods-use-this": string;
218
+ "@typescript-eslint/consistent-generic-constructors": string;
219
+ "@typescript-eslint/consistent-indexed-object-style": string;
220
+ "@typescript-eslint/consistent-type-assertions": string;
221
+ "@typescript-eslint/consistent-type-definitions": string;
222
+ "@typescript-eslint/consistent-type-imports": string;
223
+ "@typescript-eslint/default-param-last": string;
224
+ "@typescript-eslint/explicit-function-return-type": string;
225
+ "@typescript-eslint/explicit-member-accessibility": string;
226
+ "@typescript-eslint/explicit-module-boundary-types": string;
227
+ "@typescript-eslint/init-declarations": string;
228
+ "@typescript-eslint/max-params": string;
229
+ "@typescript-eslint/member-ordering": string;
230
+ "@typescript-eslint/method-signature-style": string;
231
+ "@typescript-eslint/no-array-constructor": string;
232
+ "@typescript-eslint/no-confusing-non-null-assertion": string;
233
+ "@typescript-eslint/no-duplicate-enum-values": string;
234
+ "@typescript-eslint/no-dynamic-delete": string;
235
+ "@typescript-eslint/no-empty-function": string;
236
+ "@typescript-eslint/no-empty-object-type": string;
237
+ "@typescript-eslint/no-explicit-any": string;
238
+ "@typescript-eslint/no-extra-non-null-assertion": string;
239
+ "@typescript-eslint/no-extraneous-class": string;
240
+ "@typescript-eslint/no-import-type-side-effects": string;
241
+ "@typescript-eslint/no-inferrable-types": string;
242
+ "@typescript-eslint/no-invalid-void-type": string;
243
+ "@typescript-eslint/no-loop-func": string;
244
+ "@typescript-eslint/no-magic-numbers": string;
245
+ "@typescript-eslint/no-misused-new": string;
246
+ "@typescript-eslint/no-namespace": string;
247
+ "@typescript-eslint/no-non-null-asserted-nullish-coalescing": string;
248
+ "@typescript-eslint/no-non-null-asserted-optional-chain": string;
249
+ "@typescript-eslint/no-non-null-assertion": string;
250
+ "@typescript-eslint/no-redeclare": string;
251
+ "@typescript-eslint/no-require-imports": string;
252
+ "@typescript-eslint/no-restricted-imports": string;
253
+ "@typescript-eslint/no-restricted-types": string;
254
+ "@typescript-eslint/no-shadow": string;
255
+ "@typescript-eslint/no-this-alias": string;
256
+ "@typescript-eslint/no-unnecessary-parameter-property-assignment": string;
257
+ "@typescript-eslint/no-unnecessary-type-constraint": string;
258
+ "@typescript-eslint/no-unsafe-declaration-merging": string;
259
+ "@typescript-eslint/no-unsafe-function-type": string;
260
+ "@typescript-eslint/no-unused-expressions": string;
261
+ "@typescript-eslint/no-unused-private-class-members": string;
262
+ "@typescript-eslint/no-unused-vars": string;
263
+ "@typescript-eslint/no-use-before-define": string;
264
+ "@typescript-eslint/no-useless-constructor": string;
265
+ "@typescript-eslint/no-useless-empty-export": string;
266
+ "@typescript-eslint/no-wrapper-object-types": string;
267
+ "@typescript-eslint/prefer-as-const": string;
268
+ "@typescript-eslint/prefer-enum-initializers": string;
269
+ "@typescript-eslint/prefer-for-of": string;
270
+ "@typescript-eslint/prefer-function-type": string;
271
+ "@typescript-eslint/prefer-literal-enum-member": string;
272
+ "@typescript-eslint/prefer-namespace-keyword": string;
273
+ "@typescript-eslint/triple-slash-reference": string;
274
+ "@typescript-eslint/unified-signatures": string;
275
+ "@typescript-eslint/await-thenable": string;
276
+ "@typescript-eslint/consistent-return": string;
277
+ "@typescript-eslint/consistent-type-exports": string;
278
+ "@typescript-eslint/dot-notation": string;
279
+ "@typescript-eslint/naming-convention": (string | {
280
+ selector: string;
281
+ format: string[];
282
+ })[];
283
+ "@typescript-eslint/no-array-delete": string;
284
+ "@typescript-eslint/no-base-to-string": string;
285
+ "@typescript-eslint/no-confusing-void-expression": string;
286
+ "@typescript-eslint/no-deprecated": string;
287
+ "@typescript-eslint/no-duplicate-type-constituents": string;
288
+ "@typescript-eslint/no-floating-promises": string;
289
+ "@typescript-eslint/no-for-in-array": string;
290
+ "@typescript-eslint/no-implied-eval": string;
291
+ "@typescript-eslint/no-meaningless-void-operator": string;
292
+ "@typescript-eslint/no-misused-promises": string;
293
+ "@typescript-eslint/no-misused-spread": string;
294
+ "@typescript-eslint/no-mixed-enums": string;
295
+ "@typescript-eslint/no-redundant-type-constituents": string;
296
+ "@typescript-eslint/no-unnecessary-boolean-literal-compare": string;
297
+ "@typescript-eslint/no-unnecessary-condition": string;
298
+ "@typescript-eslint/no-unnecessary-qualifier": string;
299
+ "@typescript-eslint/no-unnecessary-template-expression": string;
300
+ "@typescript-eslint/no-unnecessary-type-arguments": string;
301
+ "@typescript-eslint/no-unnecessary-type-assertion": string;
302
+ "@typescript-eslint/no-unnecessary-type-conversion": string;
303
+ "@typescript-eslint/no-unnecessary-type-parameters": string;
304
+ "@typescript-eslint/no-unsafe-argument": string;
305
+ "@typescript-eslint/no-unsafe-assignment": string;
306
+ "@typescript-eslint/no-unsafe-call": string;
307
+ "@typescript-eslint/no-unsafe-enum-comparison": string;
308
+ "@typescript-eslint/no-unsafe-member-access": string;
309
+ "@typescript-eslint/no-unsafe-return": string;
310
+ "@typescript-eslint/no-unsafe-type-assertion": string;
311
+ "@typescript-eslint/no-unsafe-unary-minus": string;
312
+ "@typescript-eslint/no-useless-default-assignment": string;
313
+ "@typescript-eslint/non-nullable-type-assertion-style": string;
314
+ "@typescript-eslint/only-throw-error": string;
315
+ "@typescript-eslint/prefer-destructuring": string;
316
+ "@typescript-eslint/prefer-find": string;
317
+ "@typescript-eslint/prefer-includes": string;
318
+ "@typescript-eslint/prefer-nullish-coalescing": string;
319
+ "@typescript-eslint/prefer-optional-chain": string;
320
+ "@typescript-eslint/prefer-promise-reject-errors": string;
321
+ "@typescript-eslint/prefer-readonly": string;
322
+ "@typescript-eslint/prefer-readonly-parameter-types": (string | {
323
+ ignoreInferredTypes: boolean;
324
+ })[];
325
+ "@typescript-eslint/prefer-reduce-type-parameter": string;
326
+ "@typescript-eslint/prefer-regexp-exec": string;
327
+ "@typescript-eslint/prefer-return-this-type": string;
328
+ "@typescript-eslint/prefer-string-starts-ends-with": string;
329
+ "@typescript-eslint/promise-function-async": string;
330
+ "@typescript-eslint/related-getter-setter-pairs": string;
331
+ "@typescript-eslint/require-array-sort-compare": string;
332
+ "@typescript-eslint/require-await": string;
333
+ "@typescript-eslint/restrict-plus-operands": string;
334
+ "@typescript-eslint/restrict-template-expressions": string;
335
+ "@typescript-eslint/return-await": string;
336
+ "@typescript-eslint/strict-boolean-expressions": string;
337
+ "@typescript-eslint/strict-void-return": string;
338
+ "@typescript-eslint/switch-exhaustiveness-check": string;
339
+ "@typescript-eslint/unbound-method": string;
340
+ "@typescript-eslint/use-unknown-in-catch-callback-variable": string;
341
+ };
342
+ };
@@ -0,0 +1,6 @@
1
+ import preset from "./preset.json";
2
+ /**
3
+ * Load eslint preset rules.
4
+ * @see https://raw.githubusercontent.com/LenixDev/lenix/refs/heads/main/lint/src/lint-preset.json
5
+ */
6
+ export const lint = { strict: preset.rules };
@@ -0,0 +1,370 @@
1
+ {
2
+ "outFile": "eslint.config.mts",
3
+ "rules": {
4
+ "accessor-pairs": "error",
5
+ "array-callback-return": "warn",
6
+ "arrow-body-style": "error",
7
+ "block-scoped-var": "error",
8
+ "camelcase": "error",
9
+ "capitalized-comments": "warn",
10
+ "class-methods-use-this": "error",
11
+ "complexity": "warn",
12
+ "consistent-return": "warn",
13
+ "consistent-this": "warn",
14
+ "constructor-super": "warn",
15
+ "curly": [
16
+ "error",
17
+ "multi"
18
+ ],
19
+ "default-case": "error",
20
+ "default-case-last": "error",
21
+ "default-param-last": "error",
22
+ "dot-notation": "error",
23
+ "eqeqeq": "error",
24
+ "for-direction": "error",
25
+ "func-name-matching": "error",
26
+ "func-names": "warn",
27
+ "func-style": "error",
28
+ "getter-return": "error",
29
+ "grouped-accessor-pairs": "error",
30
+ "guard-for-in": "warn",
31
+ "id-denylist": "warn",
32
+ "id-length": [
33
+ "error",
34
+ {
35
+ "exceptions": [
36
+ "_"
37
+ ]
38
+ }
39
+ ],
40
+ "id-match": "error",
41
+ "init-declarations": "error",
42
+ "logical-assignment-operators": "error",
43
+ "max-classes-per-file": "error",
44
+ "max-depth": "error",
45
+ "max-lines": "error",
46
+ "max-lines-per-function": "warn",
47
+ "max-nested-callbacks": "error",
48
+ "max-params": "error",
49
+ "max-statements": "error",
50
+ "new-cap": "warn",
51
+ "no-alert": "error",
52
+ "no-array-constructor": "warn",
53
+ "no-async-promise-executor": "warn",
54
+ "no-await-in-loop": "warn",
55
+ "no-bitwise": "warn",
56
+ "no-caller": "warn",
57
+ "no-case-declarations": "warn",
58
+ "no-class-assign": "error",
59
+ "no-compare-neg-zero": "error",
60
+ "no-cond-assign": "warn",
61
+ "no-console": "warn",
62
+ "no-const-assign": "error",
63
+ "no-constant-binary-expression": "warn",
64
+ "no-constant-condition": "warn",
65
+ "no-constructor-return": "error",
66
+ "no-continue": "error",
67
+ "no-control-regex": "warn",
68
+ "no-debugger": "error",
69
+ "no-delete-var": "error",
70
+ "no-div-regex": "warn",
71
+ "no-dupe-args": "error",
72
+ "no-dupe-class-members": "error",
73
+ "no-dupe-else-if": "error",
74
+ "no-dupe-keys": "error",
75
+ "no-duplicate-case": "error",
76
+ "no-duplicate-imports": "error",
77
+ "no-else-return": "error",
78
+ "no-empty": "error",
79
+ "no-empty-character-class": "warn",
80
+ "no-empty-function": "error",
81
+ "no-empty-pattern": "error",
82
+ "no-empty-static-block": "error",
83
+ "no-eq-null": "error",
84
+ "no-eval": "error",
85
+ "no-ex-assign": "error",
86
+ "no-extend-native": "warn",
87
+ "no-extra-bind": "warn",
88
+ "no-extra-boolean-cast": "warn",
89
+ "no-extra-label": "warn",
90
+ "no-fallthrough": "warn",
91
+ "no-func-assign": "error",
92
+ "no-global-assign": "error",
93
+ "no-implicit-coercion": "warn",
94
+ "no-implicit-globals": "error",
95
+ "no-implied-eval": "error",
96
+ "no-import-assign": "error",
97
+ "no-inline-comments": "warn",
98
+ "no-inner-declarations": "error",
99
+ "no-invalid-regexp": "warn",
100
+ "no-invalid-this": "error",
101
+ "no-irregular-whitespace": "warn",
102
+ "no-iterator": "warn",
103
+ "no-label-var": "error",
104
+ "no-labels": "error",
105
+ "no-lone-blocks": "error",
106
+ "no-lonely-if": "error",
107
+ "no-loop-func": "warn",
108
+ "no-loss-of-precision": "error",
109
+ "no-magic-numbers": [
110
+ "error",
111
+ {
112
+ "detectObjects": true,
113
+ "enforceConst": true,
114
+ "ignore": [
115
+ 0,
116
+ 1
117
+ ],
118
+ "ignoreReadonlyClassProperties": true
119
+ }
120
+ ],
121
+ "no-misleading-character-class": "warn",
122
+ "no-multi-assign": "error",
123
+ "no-multi-str": "error",
124
+ "no-negated-condition": "warn",
125
+ "no-nested-ternary": "error",
126
+ "no-new": "error",
127
+ "no-new-func": "error",
128
+ "no-new-native-nonconstructor": "warn",
129
+ "no-new-wrappers": "warn",
130
+ "no-nonoctal-decimal-escape": "warn",
131
+ "no-obj-calls": "warn",
132
+ "no-object-constructor": "warn",
133
+ "no-octal": "error",
134
+ "no-octal-escape": "warn",
135
+ "no-param-reassign": "warn",
136
+ "no-plusplus": "warn",
137
+ "no-promise-executor-return": "error",
138
+ "no-proto": "warn",
139
+ "no-prototype-builtins": "warn",
140
+ "no-redeclare": "error",
141
+ "no-regex-spaces": "warn",
142
+ "no-restricted-exports": "error",
143
+ "no-restricted-globals": "warn",
144
+ "no-restricted-imports": "warn",
145
+ "no-restricted-properties": "warn",
146
+ "no-restricted-syntax": "warn",
147
+ "no-return-assign": "error",
148
+ "no-script-url": "warn",
149
+ "no-self-assign": "error",
150
+ "no-self-compare": "error",
151
+ "no-sequences": "warn",
152
+ "no-setter-return": "error",
153
+ "no-shadow": "warn",
154
+ "no-shadow-restricted-names": "error",
155
+ "no-sparse-arrays": "error",
156
+ "no-template-curly-in-string": "error",
157
+ "no-this-before-super": "error",
158
+ "no-throw-literal": "error",
159
+ "no-unassigned-vars": "error",
160
+ "no-undef": "error",
161
+ "no-undef-init": "error",
162
+ "no-undefined": "off",
163
+ "no-underscore-dangle": "warn",
164
+ "no-unexpected-multiline": "error",
165
+ "no-unmodified-loop-condition": "warn",
166
+ "no-unneeded-ternary": "error",
167
+ "no-unreachable": "error",
168
+ "no-unreachable-loop": "warn",
169
+ "no-unsafe-finally": "warn",
170
+ "no-unsafe-negation": "warn",
171
+ "no-unsafe-optional-chaining": "error",
172
+ "no-unused-expressions": "error",
173
+ "no-unused-labels": "error",
174
+ "no-unused-private-class-members": "error",
175
+ "no-unused-vars": "error",
176
+ "no-use-before-define": "error",
177
+ "no-useless-assignment": "error",
178
+ "no-useless-backreference": "warn",
179
+ "no-useless-call": "warn",
180
+ "no-useless-catch": "error",
181
+ "no-useless-computed-key": "warn",
182
+ "no-useless-concat": "error",
183
+ "no-useless-constructor": "warn",
184
+ "no-useless-escape": "warn",
185
+ "no-useless-rename": "error",
186
+ "no-useless-return": "error",
187
+ "no-var": "error",
188
+ "no-void": "error",
189
+ "no-warning-comments": "warn",
190
+ "no-with": "error",
191
+ "object-shorthand": "error",
192
+ "one-var": "off",
193
+ "operator-assignment": "warn",
194
+ "prefer-arrow-callback": "error",
195
+ "prefer-const": "error",
196
+ "prefer-destructuring": "error",
197
+ "prefer-exponentiation-operator": "error",
198
+ "prefer-named-capture-group": "warn",
199
+ "prefer-numeric-literals": "warn",
200
+ "prefer-object-has-own": "warn",
201
+ "prefer-object-spread": "error",
202
+ "prefer-promise-reject-errors": "warn",
203
+ "prefer-regex-literals": "warn",
204
+ "prefer-rest-params": "error",
205
+ "prefer-spread": "error",
206
+ "prefer-template": "error",
207
+ "preserve-caught-error": "error",
208
+ "radix": "warn",
209
+ "require-atomic-updates": "warn",
210
+ "require-await": "error",
211
+ "require-unicode-regexp": "warn",
212
+ "require-yield": "error",
213
+ "sort-imports": "off",
214
+ "sort-keys": "off",
215
+ "sort-vars": "error",
216
+ "strict": "error",
217
+ "symbol-description": "error",
218
+ "unicode-bom": "warn",
219
+ "use-isnan": "error",
220
+ "valid-typeof": "error",
221
+ "vars-on-top": "error",
222
+ "yoda": "error",
223
+ "@typescript-eslint/adjacent-overload-signatures": "error",
224
+ "@typescript-eslint/array-type": "error",
225
+ "@typescript-eslint/ban-ts-comment": "error",
226
+ "@typescript-eslint/ban-tslint-comment": "error",
227
+ "@typescript-eslint/class-literal-property-style": "warn",
228
+ "@typescript-eslint/class-methods-use-this": "warn",
229
+ "@typescript-eslint/consistent-generic-constructors": "error",
230
+ "@typescript-eslint/consistent-indexed-object-style": "error",
231
+ "@typescript-eslint/consistent-type-assertions": "error",
232
+ "@typescript-eslint/consistent-type-definitions": "error",
233
+ "@typescript-eslint/consistent-type-imports": "error",
234
+ "@typescript-eslint/default-param-last": "warn",
235
+ "@typescript-eslint/explicit-function-return-type": "off",
236
+ "@typescript-eslint/explicit-member-accessibility": "warn",
237
+ "@typescript-eslint/explicit-module-boundary-types": "off",
238
+ "@typescript-eslint/init-declarations": "error",
239
+ "@typescript-eslint/max-params": "error",
240
+ "@typescript-eslint/member-ordering": "error",
241
+ "@typescript-eslint/method-signature-style": "error",
242
+ "@typescript-eslint/no-array-constructor": "error",
243
+ "@typescript-eslint/no-confusing-non-null-assertion": "error",
244
+ "@typescript-eslint/no-duplicate-enum-values": "error",
245
+ "@typescript-eslint/no-dynamic-delete": "error",
246
+ "@typescript-eslint/no-empty-function": "error",
247
+ "@typescript-eslint/no-empty-object-type": "error",
248
+ "@typescript-eslint/no-explicit-any": "error",
249
+ "@typescript-eslint/no-extra-non-null-assertion": "error",
250
+ "@typescript-eslint/no-extraneous-class": "error",
251
+ "@typescript-eslint/no-import-type-side-effects": "error",
252
+ "@typescript-eslint/no-inferrable-types": "error",
253
+ "@typescript-eslint/no-invalid-void-type": "error",
254
+ "@typescript-eslint/no-loop-func": "error",
255
+ "@typescript-eslint/no-magic-numbers": "off",
256
+ "@typescript-eslint/no-misused-new": "error",
257
+ "@typescript-eslint/no-namespace": "error",
258
+ "@typescript-eslint/no-non-null-asserted-nullish-coalescing": "warn",
259
+ "@typescript-eslint/no-non-null-asserted-optional-chain": "error",
260
+ "@typescript-eslint/no-non-null-assertion": "error",
261
+ "@typescript-eslint/no-redeclare": "warn",
262
+ "@typescript-eslint/no-require-imports": "error",
263
+ "@typescript-eslint/no-restricted-imports": "warn",
264
+ "@typescript-eslint/no-restricted-types": "warn",
265
+ "@typescript-eslint/no-shadow": "warn",
266
+ "@typescript-eslint/no-this-alias": "error",
267
+ "@typescript-eslint/no-unnecessary-parameter-property-assignment": "error",
268
+ "@typescript-eslint/no-unnecessary-type-constraint": "error",
269
+ "@typescript-eslint/no-unsafe-declaration-merging": "error",
270
+ "@typescript-eslint/no-unsafe-function-type": "error",
271
+ "@typescript-eslint/no-unused-expressions": "warn",
272
+ "@typescript-eslint/no-unused-private-class-members": "error",
273
+ "@typescript-eslint/no-unused-vars": "error",
274
+ "@typescript-eslint/no-use-before-define": "error",
275
+ "@typescript-eslint/no-useless-constructor": "error",
276
+ "@typescript-eslint/no-useless-empty-export": "error",
277
+ "@typescript-eslint/no-wrapper-object-types": "error",
278
+ "@typescript-eslint/prefer-as-const": "error",
279
+ "@typescript-eslint/prefer-enum-initializers": "error",
280
+ "@typescript-eslint/prefer-for-of": "error",
281
+ "@typescript-eslint/prefer-function-type": "error",
282
+ "@typescript-eslint/prefer-literal-enum-member": "error",
283
+ "@typescript-eslint/prefer-namespace-keyword": "error",
284
+ "@typescript-eslint/triple-slash-reference": "error",
285
+ "@typescript-eslint/unified-signatures": "error",
286
+ "@typescript-eslint/await-thenable": "warn",
287
+ "@typescript-eslint/consistent-return": "error",
288
+ "@typescript-eslint/consistent-type-exports": "error",
289
+ "@typescript-eslint/dot-notation": "error",
290
+ "@typescript-eslint/naming-convention": [
291
+ "warn",
292
+ {
293
+ "selector": "variable",
294
+ "format": [
295
+ "camelCase",
296
+ "UPPER_CASE",
297
+ "PascalCase"
298
+ ]
299
+ }
300
+ ],
301
+ "@typescript-eslint/no-array-delete": "error",
302
+ "@typescript-eslint/no-base-to-string": "warn",
303
+ "@typescript-eslint/no-confusing-void-expression": "error",
304
+ "@typescript-eslint/no-deprecated": "error",
305
+ "@typescript-eslint/no-duplicate-type-constituents": "error",
306
+ "@typescript-eslint/no-floating-promises": "warn",
307
+ "@typescript-eslint/no-for-in-array": "error",
308
+ "@typescript-eslint/no-implied-eval": "error",
309
+ "@typescript-eslint/no-meaningless-void-operator": "error",
310
+ "@typescript-eslint/no-misused-promises": "error",
311
+ "@typescript-eslint/no-misused-spread": "error",
312
+ "@typescript-eslint/no-mixed-enums": "error",
313
+ "@typescript-eslint/no-redundant-type-constituents": "error",
314
+ "@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
315
+ "@typescript-eslint/no-unnecessary-condition": "error",
316
+ "@typescript-eslint/no-unnecessary-qualifier": "warn",
317
+ "@typescript-eslint/no-unnecessary-template-expression": "error",
318
+ "@typescript-eslint/no-unnecessary-type-arguments": "error",
319
+ "@typescript-eslint/no-unnecessary-type-assertion": "error",
320
+ "@typescript-eslint/no-unnecessary-type-conversion": "error",
321
+ "@typescript-eslint/no-unnecessary-type-parameters": "error",
322
+ "@typescript-eslint/no-unsafe-argument": "error",
323
+ "@typescript-eslint/no-unsafe-assignment": "error",
324
+ "@typescript-eslint/no-unsafe-call": "error",
325
+ "@typescript-eslint/no-unsafe-enum-comparison": "error",
326
+ "@typescript-eslint/no-unsafe-member-access": "error",
327
+ "@typescript-eslint/no-unsafe-return": "error",
328
+ "@typescript-eslint/no-unsafe-type-assertion": "error",
329
+ "@typescript-eslint/no-unsafe-unary-minus": "warn",
330
+ "@typescript-eslint/no-useless-default-assignment": "error",
331
+ "@typescript-eslint/non-nullable-type-assertion-style": "warn",
332
+ "@typescript-eslint/only-throw-error": "error",
333
+ "@typescript-eslint/prefer-destructuring": "error",
334
+ "@typescript-eslint/prefer-find": "error",
335
+ "@typescript-eslint/prefer-includes": "error",
336
+ "@typescript-eslint/prefer-nullish-coalescing": "error",
337
+ "@typescript-eslint/prefer-optional-chain": "error",
338
+ "@typescript-eslint/prefer-promise-reject-errors": "error",
339
+ "@typescript-eslint/prefer-readonly": "error",
340
+ "@typescript-eslint/prefer-readonly-parameter-types": [
341
+ "error",
342
+ {
343
+ "ignoreInferredTypes": true
344
+ }
345
+ ],
346
+ "@typescript-eslint/prefer-reduce-type-parameter": "error",
347
+ "@typescript-eslint/prefer-regexp-exec": "warn",
348
+ "@typescript-eslint/prefer-return-this-type": "error",
349
+ "@typescript-eslint/prefer-string-starts-ends-with": "error",
350
+ "@typescript-eslint/promise-function-async": "error",
351
+ "@typescript-eslint/related-getter-setter-pairs": "error",
352
+ "@typescript-eslint/require-array-sort-compare": "error",
353
+ "@typescript-eslint/require-await": "error",
354
+ "@typescript-eslint/restrict-plus-operands": "error",
355
+ "@typescript-eslint/restrict-template-expressions": "error",
356
+ "@typescript-eslint/return-await": "error",
357
+ "@typescript-eslint/strict-boolean-expressions": "error",
358
+ "@typescript-eslint/strict-void-return": "off",
359
+ "@typescript-eslint/switch-exhaustiveness-check": "error",
360
+ "@typescript-eslint/unbound-method": "warn",
361
+ "@typescript-eslint/use-unknown-in-catch-callback-variable": "error"
362
+ },
363
+ "completedSections": [
364
+ "Core β€” Other",
365
+ "TypeScript",
366
+ "TypeScript β€” type-aware"
367
+ ],
368
+ "pausedSection": null,
369
+ "pausedAt": 0
370
+ }
package/oop/README.md ADDED
@@ -0,0 +1,27 @@
1
+ # Lua Object Oriented Programming Class Module
2
+
3
+ Lua object oriented programming class module allow you to use oop similar to the TypeScript/JavaScript/Java/C++ Classes
4
+
5
+ ## Lua Modules Setup
6
+
7
+ Auto-configure Lua to use `./lua_modules` (like `node_modules`) instead of unorganized directories.
8
+
9
+ ### Install
10
+ - MAC
11
+ ```bash
12
+ npx mac-lua-modules
13
+ ```
14
+
15
+ ### Usage
16
+ ```bash
17
+ # Install Lua packages
18
+ luarocks install --tree ./lua_modules inspect
19
+
20
+ # Use in code (no setup needed)
21
+ local inspect = require('inspect')
22
+ print(inspect({name = "Lenix"}))
23
+ ```
24
+
25
+ ### What it does
26
+
27
+ Adds environment variables to your shell config (for mac users: `~/.zshrc` or `~/.bashrc`) to automatically change your Lua modules configurations to `./lua_modules` instead of hidden nested directories.
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "lenix",
3
- "version": "1.3.40",
4
- "description": "The Monorepo for the software engineering community",
3
+ "version": "1.4.0",
4
+ "description": "The All-in-one Package",
5
5
  "author": "Lenix",
6
6
  "license": "GPL-3.0",
7
7
  "type": "module",
8
+ "readme": "modules/README.md",
8
9
  "keywords": [
9
10
  "lenix",
10
11
  "modules",