create-absolutejs 0.10.2 → 0.10.3

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/dist/data.js CHANGED
@@ -102,17 +102,29 @@ export const scopedStatePlugin = {
102
102
  value: 'elysia-scoped-state'
103
103
  };
104
104
  export const eslintAndPrettierDependencies = [
105
+ {
106
+ latestVersion: versions['@eslint/compat'],
107
+ value: '@eslint/compat'
108
+ },
109
+ {
110
+ latestVersion: versions['@eslint/js'],
111
+ value: '@eslint/js'
112
+ },
105
113
  {
106
114
  latestVersion: versions['eslint'],
107
115
  value: 'eslint'
108
116
  },
117
+ {
118
+ latestVersion: versions['globals'],
119
+ value: 'globals'
120
+ },
109
121
  {
110
122
  latestVersion: versions['prettier'],
111
123
  value: 'prettier'
112
124
  },
113
125
  {
114
- latestVersion: versions['@stylistic/eslint-plugin-ts'],
115
- value: '@stylistic/eslint-plugin-ts'
126
+ latestVersion: versions['@stylistic/eslint-plugin'],
127
+ value: '@stylistic/eslint-plugin'
116
128
  },
117
129
  {
118
130
  latestVersion: versions['@typescript-eslint/parser'],
@@ -155,6 +167,10 @@ export const eslintReactDependencies = [
155
167
  {
156
168
  latestVersion: versions['eslint-plugin-react-hooks'],
157
169
  value: 'eslint-plugin-react-hooks'
170
+ },
171
+ {
172
+ latestVersion: versions['zod-validation-error'],
173
+ value: 'zod-validation-error'
158
174
  }
159
175
  ];
160
176
  export const defaultDependencies = [
@@ -0,0 +1,2 @@
1
+ import type { Frontend } from '../../types';
2
+ export declare const generateEslintConfig: (frontends: Frontend[]) => string;
@@ -0,0 +1,253 @@
1
+ export const generateEslintConfig = (frontends) => {
2
+ const hasReact = frontends.includes('react');
3
+ const reactImports = hasReact
4
+ ? `import jsxA11yPlugin from 'eslint-plugin-jsx-a11y';
5
+ import reactPlugin from 'eslint-plugin-react';
6
+ import reactCompilerPlugin from 'eslint-plugin-react-compiler';
7
+ import reactHooksPlugin from 'eslint-plugin-react-hooks';
8
+ `
9
+ : '';
10
+ const reactBlock = hasReact
11
+ ? ` {
12
+ files: ['example/**/*.{js,jsx,ts,tsx}'],
13
+ plugins: {
14
+ 'jsx-a11y': fixupPluginRules(jsxA11yPlugin),
15
+ react: fixupPluginRules(reactPlugin),
16
+ 'react-compiler': reactCompilerPlugin,
17
+ 'react-hooks': reactHooksPlugin
18
+ },
19
+ rules: {
20
+ 'jsx-a11y/prefer-tag-over-role': 'error',
21
+ 'react-compiler/react-compiler': 'error',
22
+ 'react-hooks/exhaustive-deps': 'warn',
23
+ 'react-hooks/rules-of-hooks': 'error',
24
+ 'react/checked-requires-onchange-or-readonly': 'error',
25
+ 'react/destructuring-assignment': ['error', 'always'],
26
+ 'react/jsx-filename-extension': ['error', { extensions: ['.tsx'] }],
27
+ 'react/jsx-no-leaked-render': 'error',
28
+ 'react/jsx-no-target-blank': 'error',
29
+ 'react/jsx-no-useless-fragment': 'error',
30
+ 'react/jsx-pascal-case': ['error', { allowAllCaps: true }],
31
+ 'react/no-multi-comp': 'error',
32
+ 'react/no-unknown-property': 'off',
33
+ 'react/react-in-jsx-scope': 'off',
34
+ 'react/self-closing-comp': 'error'
35
+ },
36
+ settings: {
37
+ react: { version: 'detect' }
38
+ }
39
+ },
40
+ `
41
+ : '';
42
+ return `// eslint.config.mjs
43
+ import { dirname } from 'path';
44
+ import { fileURLToPath } from 'url';
45
+ import { fixupPluginRules } from '@eslint/compat';
46
+ import pluginJs from '@eslint/js';
47
+ import stylistic from '@stylistic/eslint-plugin';
48
+ import tsParser from '@typescript-eslint/parser';
49
+ import { defineConfig } from 'eslint/config';
50
+ import absolutePlugin from 'eslint-plugin-absolute';
51
+ import importPlugin from 'eslint-plugin-import';
52
+ ${reactImports}import promisePlugin from 'eslint-plugin-promise';
53
+ import securityPlugin from 'eslint-plugin-security';
54
+ import globals from 'globals';
55
+ import tseslint from 'typescript-eslint';
56
+
57
+ const __dirname = dirname(fileURLToPath(import.meta.url));
58
+
59
+ export default defineConfig([
60
+ pluginJs.configs.recommended,
61
+
62
+ ...tseslint.configs.recommended,
63
+
64
+ {
65
+ files: ['**/*.{ts,tsx}'],
66
+ languageOptions: {
67
+ globals: globals.browser,
68
+ parser: tsParser,
69
+ parserOptions: {
70
+ createDefaultProgram: true,
71
+ project: './tsconfig.json',
72
+ tsconfigRootDir: __dirname
73
+ }
74
+ }
75
+ },
76
+
77
+ {
78
+ files: ['**/*.{ts,tsx}'],
79
+ plugins: { '@stylistic': stylistic },
80
+ rules: {
81
+ '@stylistic/padding-line-between-statements': [
82
+ 'error',
83
+ { blankLine: 'always', next: 'return', prev: '*' }
84
+ ]
85
+ }
86
+ },
87
+
88
+ {
89
+ files: ['**/*.{js,mjs,cjs,ts,tsx,jsx}'],
90
+ ignores: ['example/build/**'],
91
+ plugins: {
92
+ absolute: fixupPluginRules(absolutePlugin),
93
+ import: fixupPluginRules(importPlugin),
94
+ promise: fixupPluginRules(promisePlugin),
95
+ security: fixupPluginRules(securityPlugin)
96
+ },
97
+ rules: {
98
+ 'absolute/explicit-object-types': 'error',
99
+ 'absolute/localize-react-props': 'error',
100
+ 'absolute/max-depth-extended': ['error', 1],
101
+ 'absolute/max-jsxnesting': ['error', 5],
102
+ 'absolute/min-var-length': [
103
+ 'error',
104
+ { allowedVars: ['_', 'id', 'db', 'OK'], minLength: 3 }
105
+ ],
106
+ 'absolute/no-button-navigation': 'error',
107
+ 'absolute/no-explicit-return-type': 'error',
108
+ 'absolute/no-inline-prop-types': 'error',
109
+ 'absolute/no-multi-style-objects': 'error',
110
+ 'absolute/no-nested-jsx-return': 'error',
111
+ 'absolute/no-or-none-component': 'error',
112
+ 'absolute/no-transition-cssproperties': 'error',
113
+ 'absolute/no-unnecessary-div': 'error',
114
+ 'absolute/no-unnecessary-key': 'error',
115
+ 'absolute/no-useless-function': 'error',
116
+ 'absolute/seperate-style-files': 'error',
117
+ 'absolute/sort-exports': [
118
+ 'error',
119
+ {
120
+ caseSensitive: true,
121
+ natural: true,
122
+ order: 'asc',
123
+ variablesBeforeFunctions: true
124
+ }
125
+ ],
126
+ 'absolute/sort-keys-fixable': [
127
+ 'error',
128
+ {
129
+ caseSensitive: true,
130
+ natural: true,
131
+ order: 'asc',
132
+ variablesBeforeFunctions: true
133
+ }
134
+ ],
135
+ 'arrow-body-style': ['error', 'as-needed'],
136
+ 'consistent-return': 'error',
137
+ eqeqeq: 'error',
138
+ 'func-style': [
139
+ 'error',
140
+ 'expression',
141
+ { allowArrowFunctions: true }
142
+ ],
143
+ 'import/no-cycle': 'error',
144
+ 'import/no-default-export': 'error',
145
+ 'import/no-relative-packages': 'error',
146
+ 'import/no-unused-modules': ['error', { missingExports: true }],
147
+ 'import/order': ['error', { alphabetize: { order: 'asc' } }],
148
+ 'no-await-in-loop': 'error',
149
+ 'no-console': ['error', { allow: ['warn', 'error'] }],
150
+ 'no-debugger': 'error',
151
+ 'no-duplicate-case': 'error',
152
+ 'no-duplicate-imports': 'error',
153
+ 'no-else-return': 'error',
154
+ 'no-empty-function': 'error',
155
+ 'no-empty-pattern': 'error',
156
+ 'no-empty-static-block': 'error',
157
+ 'no-fallthrough': 'error',
158
+ 'no-floating-decimal': 'error',
159
+ 'no-global-assign': 'error',
160
+ 'no-implicit-coercion': 'error',
161
+ 'no-implicit-globals': 'error',
162
+ 'no-loop-func': 'error',
163
+ 'no-magic-numbers': [
164
+ 'warn',
165
+ { detectObjects: false, enforceConst: true, ignore: [0, 1] }
166
+ ],
167
+ 'no-misleading-character-class': 'error',
168
+ 'no-nested-ternary': 'error',
169
+ 'no-new-native-nonconstructor': 'error',
170
+ 'no-new-wrappers': 'error',
171
+ 'no-param-reassign': 'error',
172
+ 'no-restricted-imports': [
173
+ 'error',
174
+ {
175
+ paths: [
176
+ {
177
+ importNames: ['default'],
178
+ message:
179
+ 'Import only named React exports for tree-shaking.',
180
+ name: 'react'
181
+ },
182
+ {
183
+ importNames: ['default'],
184
+ message: 'Import only the required Bun exports.',
185
+ name: 'bun'
186
+ }
187
+ ]
188
+ }
189
+ ],
190
+ 'no-return-await': 'error',
191
+ 'no-shadow': 'error',
192
+ 'no-undef': 'error',
193
+ 'no-unneeded-ternary': 'error',
194
+ 'no-unreachable': 'error',
195
+ 'no-useless-assignment': 'error',
196
+ 'no-useless-concat': 'error',
197
+ 'no-useless-return': 'error',
198
+ 'no-var': 'error',
199
+ 'prefer-arrow-callback': 'error',
200
+ 'prefer-const': 'error',
201
+ 'prefer-destructuring': [
202
+ 'error',
203
+ { array: true, object: true },
204
+ { enforceForRenamedProperties: false }
205
+ ],
206
+ 'prefer-template': 'error',
207
+ 'promise/always-return': 'warn',
208
+ 'promise/avoid-new': 'warn',
209
+ 'promise/catch-or-return': 'error',
210
+ 'promise/no-callback-in-promise': 'warn',
211
+ 'promise/no-nesting': 'warn',
212
+ 'promise/no-promise-in-callback': 'warn',
213
+ 'promise/no-return-wrap': 'error',
214
+ 'promise/param-names': 'error'
215
+ }
216
+ },
217
+ ${reactBlock} {
218
+ files: [
219
+ 'example/server.ts',
220
+ 'example/indexes/*.tsx',
221
+ 'example/db/migrate.ts'
222
+ ],
223
+ rules: {
224
+ 'import/no-unused-modules': 'off'
225
+ }
226
+ },
227
+ {
228
+ files: ['example/db/migrate.ts', 'example/utils/absoluteAuthConfig.ts'],
229
+ rules: {
230
+ 'no-console': 'off'
231
+ }
232
+ },
233
+ {
234
+ files: ['eslint.config.mjs'],
235
+ rules: {
236
+ 'no-magic-numbers': 'off'
237
+ }
238
+ },
239
+ {
240
+ files: ['eslint.config.mjs'],
241
+ rules: {
242
+ 'import/no-default-export': 'off'
243
+ }
244
+ },
245
+ {
246
+ files: ['example/db/schema.ts'],
247
+ rules: {
248
+ 'absolute/explicit-object-types': 'off'
249
+ }
250
+ }
251
+ ]);
252
+ `;
253
+ };
@@ -2,6 +2,7 @@ import { copyFileSync, writeFileSync } from 'fs';
2
2
  import { join } from 'path';
3
3
  import { dim, yellow } from 'picocolors';
4
4
  import { generateEnv } from './generateEnv';
5
+ import { generateEslintConfig } from './generateEslintConfig';
5
6
  import { generatePrettierrc } from './generatePrettierrc';
6
7
  export const scaffoldConfigurationFiles = ({ tailwind, templatesDirectory, databaseEngine, envVariables, databaseHost, codeQualityTool, frontends, initializeGitNow, projectName }) => {
7
8
  copyFileSync(join(templatesDirectory, 'configurations', 'tsconfig.example.json'), join(projectName, 'tsconfig.json'));
@@ -12,7 +13,7 @@ export const scaffoldConfigurationFiles = ({ tailwind, templatesDirectory, datab
12
13
  if (initializeGitNow)
13
14
  copyFileSync(join(templatesDirectory, 'git', 'gitignore'), join(projectName, '.gitignore'));
14
15
  if (codeQualityTool === 'eslint+prettier') {
15
- copyFileSync(join(templatesDirectory, 'configurations', 'eslint.config.mjs'), join(projectName, 'eslint.config.mjs'));
16
+ writeFileSync(join(projectName, 'eslint.config.mjs'), generateEslintConfig(frontends));
16
17
  copyFileSync(join(templatesDirectory, 'configurations', '.prettierignore'), join(projectName, '.prettierignore'));
17
18
  const prettierrc = generatePrettierrc(frontends);
18
19
  writeFileSync(join(projectName, '.prettierrc.json'), prettierrc);
@@ -1,8 +1,9 @@
1
1
  // eslint.config.mjs
2
2
  import { dirname } from 'path';
3
3
  import { fileURLToPath } from 'url';
4
+ import { fixupPluginRules } from '@eslint/compat';
4
5
  import pluginJs from '@eslint/js';
5
- import stylisticTs from '@stylistic/eslint-plugin-ts';
6
+ import stylistic from '@stylistic/eslint-plugin';
6
7
  import tsParser from '@typescript-eslint/parser';
7
8
  import { defineConfig } from 'eslint/config';
8
9
  import absolutePlugin from 'eslint-plugin-absolute';
@@ -38,9 +39,9 @@ export default defineConfig([
38
39
 
39
40
  {
40
41
  files: ['**/*.{ts,tsx}'],
41
- plugins: { '@stylistic/ts': stylisticTs },
42
+ plugins: { '@stylistic': stylistic },
42
43
  rules: {
43
- '@stylistic/ts/padding-line-between-statements': [
44
+ '@stylistic/padding-line-between-statements': [
44
45
  'error',
45
46
  { blankLine: 'always', next: 'return', prev: '*' }
46
47
  ]
@@ -51,10 +52,10 @@ export default defineConfig([
51
52
  files: ['**/*.{js,mjs,cjs,ts,tsx,jsx}'],
52
53
  ignores: ['example/build/**'],
53
54
  plugins: {
54
- absolute: absolutePlugin,
55
- import: importPlugin,
56
- promise: promisePlugin,
57
- security: securityPlugin
55
+ absolute: fixupPluginRules(absolutePlugin),
56
+ import: fixupPluginRules(importPlugin),
57
+ promise: fixupPluginRules(promisePlugin),
58
+ security: fixupPluginRules(securityPlugin)
58
59
  },
59
60
  rules: {
60
61
  'absolute/explicit-object-types': 'error',
@@ -72,7 +73,6 @@ export default defineConfig([
72
73
  'absolute/no-nested-jsx-return': 'error',
73
74
  'absolute/no-or-none-component': 'error',
74
75
  'absolute/no-transition-cssproperties': 'error',
75
- 'absolute/no-type-cast': 'error',
76
76
  'absolute/no-unnecessary-div': 'error',
77
77
  'absolute/no-unnecessary-key': 'error',
78
78
  'absolute/no-useless-function': 'error',
@@ -180,8 +180,8 @@ export default defineConfig([
180
180
  {
181
181
  files: ['example/**/*.{js,jsx,ts,tsx}'],
182
182
  plugins: {
183
- 'jsx-a11y': jsxA11yPlugin,
184
- react: reactPlugin,
183
+ 'jsx-a11y': fixupPluginRules(jsxA11yPlugin),
184
+ react: fixupPluginRules(reactPlugin),
185
185
  'react-compiler': reactCompilerPlugin,
186
186
  'react-hooks': reactHooksPlugin
187
187
  },
@@ -4,38 +4,42 @@
4
4
  * Run `bun run check-versions` to compare against latest npm versions.
5
5
  */
6
6
  export declare const versions: {
7
- readonly '@absolutejs/absolute': "0.16.9";
7
+ readonly '@absolutejs/absolute': "0.16.10";
8
8
  readonly '@absolutejs/auth': "0.22.0";
9
9
  readonly '@elysiajs/static': "1.4.7";
10
- readonly elysia: "1.4.22";
10
+ readonly elysia: "1.4.25";
11
11
  readonly 'elysia-scoped-state': "0.1.1";
12
12
  readonly '@elysiajs/cors': "1.4.1";
13
13
  readonly '@elysiajs/swagger': "1.3.1";
14
14
  readonly 'elysia-rate-limit': "4.5.0";
15
15
  readonly typescript: "5.9.3";
16
- readonly '@tailwindcss/cli': "4.1.18";
16
+ readonly '@tailwindcss/cli': "4.2.0";
17
17
  readonly autoprefixer: "10.4.24";
18
18
  readonly postcss: "8.5.6";
19
- readonly tailwindcss: "4.1.18";
20
- readonly '@types/react': "19.2.13";
19
+ readonly tailwindcss: "4.2.0";
20
+ readonly '@types/react': "19.2.14";
21
21
  readonly react: "19.2.4";
22
22
  readonly 'react-dom': "19.2.4";
23
- readonly 'prettier-plugin-svelte': "3.4.1";
24
- readonly svelte: "5.49.2";
25
- readonly vue: "3.5.27";
26
- readonly '@stylistic/eslint-plugin-ts': "4.4.1";
27
- readonly '@typescript-eslint/parser': "8.47.0";
28
- readonly eslint: "9.39.2";
29
- readonly 'eslint-plugin-absolute': "0.1.6";
23
+ readonly 'prettier-plugin-svelte': "3.5.0";
24
+ readonly svelte: "5.53.0";
25
+ readonly vue: "3.5.28";
26
+ readonly '@eslint/compat': "2.0.2";
27
+ readonly '@eslint/js': "10.0.1";
28
+ readonly globals: "17.3.0";
29
+ readonly '@stylistic/eslint-plugin': "5.9.0";
30
+ readonly '@typescript-eslint/parser': "8.56.0";
31
+ readonly eslint: "10.0.0";
32
+ readonly 'eslint-plugin-absolute': "0.2.0";
30
33
  readonly 'eslint-plugin-import': "2.32.0";
31
34
  readonly 'eslint-plugin-promise': "7.2.1";
32
- readonly 'eslint-plugin-security': "3.0.1";
35
+ readonly 'eslint-plugin-security': "4.0.0";
33
36
  readonly prettier: "3.8.1";
34
- readonly 'typescript-eslint': "8.47.0";
37
+ readonly 'typescript-eslint': "8.56.0";
38
+ readonly 'zod-validation-error': "4.0.2";
35
39
  readonly 'eslint-plugin-jsx-a11y': "6.10.2";
36
40
  readonly 'eslint-plugin-react': "7.37.5";
37
41
  readonly 'eslint-plugin-react-compiler': "19.1.0-rc.2";
38
- readonly 'eslint-plugin-react-hooks': "7.0.1";
42
+ readonly 'eslint-plugin-react-hooks': "7.1.0-canary-e8c63626-20260213";
39
43
  readonly 'drizzle-orm': "0.45.1";
40
44
  readonly '@libsql/client': "0.17.0";
41
45
  readonly '@neondatabase/serverless': "1.0.2";
@@ -43,8 +47,8 @@ export declare const versions: {
43
47
  readonly '@types/mssql': "9.1.9";
44
48
  readonly '@types/pg': "8.16.0";
45
49
  readonly gel: "2.2.0";
46
- readonly mongodb: "6.12.0";
50
+ readonly mongodb: "7.1.0";
47
51
  readonly mssql: "12.2.0";
48
- readonly mysql2: "3.16.3";
52
+ readonly mysql2: "3.17.3";
49
53
  readonly pg: "8.18.0";
50
54
  };
package/dist/versions.js CHANGED
@@ -5,10 +5,10 @@
5
5
  */
6
6
  export const versions = {
7
7
  /* ── Core ─────────────────────────────────────────────── */
8
- '@absolutejs/absolute': '0.16.9',
8
+ '@absolutejs/absolute': '0.16.10',
9
9
  '@absolutejs/auth': '0.22.0',
10
10
  '@elysiajs/static': '1.4.7',
11
- elysia: '1.4.22',
11
+ elysia: '1.4.25',
12
12
  'elysia-scoped-state': '0.1.1',
13
13
  /* ── Plugins ──────────────────────────────────────────── */
14
14
  '@elysiajs/cors': '1.4.1',
@@ -17,34 +17,38 @@ export const versions = {
17
17
  /* ── Build / TypeScript ───────────────────────────────── */
18
18
  typescript: '5.9.3',
19
19
  /* ── Tailwind CSS ─────────────────────────────────────── */
20
- '@tailwindcss/cli': '4.1.18',
20
+ '@tailwindcss/cli': '4.2.0',
21
21
  autoprefixer: '10.4.24',
22
22
  postcss: '8.5.6',
23
- tailwindcss: '4.1.18',
23
+ tailwindcss: '4.2.0',
24
24
  /* ── React ────────────────────────────────────────────── */
25
- '@types/react': '19.2.13',
25
+ '@types/react': '19.2.14',
26
26
  react: '19.2.4',
27
27
  'react-dom': '19.2.4',
28
28
  /* ── Svelte ───────────────────────────────────────────── */
29
- 'prettier-plugin-svelte': '3.4.1',
30
- svelte: '5.49.2',
29
+ 'prettier-plugin-svelte': '3.5.0',
30
+ svelte: '5.53.0',
31
31
  /* ── Vue ──────────────────────────────────────────────── */
32
- vue: '3.5.27',
32
+ vue: '3.5.28',
33
33
  /* ── ESLint + Prettier ────────────────────────────────── */
34
- '@stylistic/eslint-plugin-ts': '4.4.1',
35
- '@typescript-eslint/parser': '8.47.0',
36
- eslint: '9.39.2',
37
- 'eslint-plugin-absolute': '0.1.6',
34
+ '@eslint/compat': '2.0.2',
35
+ '@eslint/js': '10.0.1',
36
+ globals: '17.3.0',
37
+ '@stylistic/eslint-plugin': '5.9.0',
38
+ '@typescript-eslint/parser': '8.56.0',
39
+ eslint: '10.0.0',
40
+ 'eslint-plugin-absolute': '0.2.0',
38
41
  'eslint-plugin-import': '2.32.0',
39
42
  'eslint-plugin-promise': '7.2.1',
40
- 'eslint-plugin-security': '3.0.1',
43
+ 'eslint-plugin-security': '4.0.0',
41
44
  prettier: '3.8.1',
42
- 'typescript-eslint': '8.47.0',
45
+ 'typescript-eslint': '8.56.0',
46
+ 'zod-validation-error': '4.0.2',
43
47
  /* ── ESLint React ─────────────────────────────────────── */
44
48
  'eslint-plugin-jsx-a11y': '6.10.2',
45
49
  'eslint-plugin-react': '7.37.5',
46
50
  'eslint-plugin-react-compiler': '19.1.0-rc.2',
47
- 'eslint-plugin-react-hooks': '7.0.1',
51
+ 'eslint-plugin-react-hooks': '7.1.0-canary-e8c63626-20260213',
48
52
  /* ── ORM ──────────────────────────────────────────────── */
49
53
  'drizzle-orm': '0.45.1',
50
54
  /* ── Database Hosts ───────────────────────────────────── */
@@ -55,8 +59,8 @@ export const versions = {
55
59
  '@types/mssql': '9.1.9',
56
60
  '@types/pg': '8.16.0',
57
61
  gel: '2.2.0',
58
- mongodb: '6.12.0',
62
+ mongodb: '7.1.0',
59
63
  mssql: '12.2.0',
60
- mysql2: '3.16.3',
64
+ mysql2: '3.17.3',
61
65
  pg: '8.18.0'
62
66
  };
package/package.json CHANGED
@@ -50,5 +50,5 @@
50
50
  "typecheck": "bun run tsc --noEmit"
51
51
  },
52
52
  "type": "module",
53
- "version": "0.10.2"
53
+ "version": "0.10.3"
54
54
  }