Skip to content

Commit

Permalink
client structure
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima committed Oct 31, 2024
1 parent 2aa9c51 commit 0d9909e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 14 deletions.
7 changes: 5 additions & 2 deletions generators/javascript/generators/eslint/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,25 @@
*/
import type { JHipsterCommandDefinition } from '../../../../lib/command/index.js';

const command: JHipsterCommandDefinition = {
const command = {
configs: {
typescriptEslint: {
cli: {
type: Boolean,
hide: true,
},
scope: 'storage',
},
eslintPrettier: {
cli: {
type: Boolean,
hide: true,
},
default: true,
scope: 'storage',
},
},
import: [],
};
} as const satisfies JHipsterCommandDefinition;

export default command;
26 changes: 14 additions & 12 deletions generators/javascript/types.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* eslint-disable @typescript-eslint/consistent-type-imports */
import type { Merge, PackageJson, Simplify } from 'type-fest';
import type { ExportApplicationPropertiesFromCommand } from '../../lib/command/types.js';
import type JavascriptBootstrapCommand from './generators/bootstrap/command.ts';
import type JavascriptBootstrapCommand from './generators/bootstrap/command.js';

type JavascriptBootstrapProperties = ExportApplicationPropertiesFromCommand<typeof JavascriptBootstrapCommand>;
type DependencyValue = string | undefined | null;
Expand All @@ -20,15 +21,16 @@ export type JavaScriptSourceType = {
): void;
};

export type JavaScriptApplication = JavascriptBootstrapProperties & {
packageJsonNodeEngine?: boolean | string;
eslintConfigFile?: string;
cjsExtension?: string;
mjsExtension?: string;
/** Root package.json scripts */
packageJsonScripts: Record<string, string>;
/** Root package.json scripts */
clientPackageJsonScripts: Record<string, string>;
export type JavaScriptApplication = JavascriptBootstrapProperties &
ExportApplicationPropertiesFromCommand<typeof import('./generators/eslint/command.js').default> & {
packageJsonNodeEngine?: boolean | string;
eslintConfigFile?: string;
cjsExtension?: string;
mjsExtension?: string;
/** Root package.json scripts */
packageJsonScripts: Record<string, string>;
/** Root package.json scripts */
clientPackageJsonScripts: Record<string, string>;

addPrettierExtensions?: (extensions: string[]) => void;
};
addPrettierExtensions?: (extensions: string[]) => void;
};

0 comments on commit 0d9909e

Please sign in to comment.