Skip to content

Commit

Permalink
Merge pull request #2471 from DamnClin/format-typescript-module-factory
Browse files Browse the repository at this point in the history
Add manual format to typescript module factory
  • Loading branch information
pascalgrimaud authored Jul 11, 2022
2 parents 5f91e28 + d4eb6a7 commit d947791
Showing 1 changed file with 22 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,29 +20,31 @@ public class TypescriptModuleFactory {
public JHipsterModule buildTypescriptModule(JHipsterModuleProperties properties) {
Assert.notNull("properties", properties);

//@formatter:off
return moduleBuilder(properties)
.packageJson()
.addDevDependency(packageName("typescript"), COMMON)
.addDevDependency(packageName("@typescript-eslint/eslint-plugin"), COMMON)
.addDevDependency(packageName("@typescript-eslint/parser"), COMMON)
.addDevDependency(packageName("eslint"), COMMON)
.addDevDependency(packageName("eslint-import-resolver-typescript"), COMMON)
.addDevDependency(packageName("eslint-plugin-import"), COMMON)
.addDevDependency(packageName("eslint-plugin-prettier"), COMMON)
.addDevDependency(packageName("jest"), COMMON)
.addDevDependency(packageName("@types/jest"), COMMON)
.addDevDependency(packageName("ts-jest"), COMMON)
.addScript(scriptKey("test"), scriptCommand("jest"))
.addScript(scriptKey("test:watch"), scriptCommand("jest --watch"))
.addScript(scriptKey("test:watch:all"), scriptCommand("jest --watchAll"))
.addScript(scriptKey("eslint:ci"), scriptCommand("eslint './**/*.{ts,js}'"))
.addScript(scriptKey("eslint"), scriptCommand("eslint './**/*.{ts,js}' --fix"))
.and()
.addDevDependency(packageName("typescript"), COMMON)
.addDevDependency(packageName("@typescript-eslint/eslint-plugin"), COMMON)
.addDevDependency(packageName("@typescript-eslint/parser"), COMMON)
.addDevDependency(packageName("eslint"), COMMON)
.addDevDependency(packageName("eslint-import-resolver-typescript"), COMMON)
.addDevDependency(packageName("eslint-plugin-import"), COMMON)
.addDevDependency(packageName("eslint-plugin-prettier"), COMMON)
.addDevDependency(packageName("jest"), COMMON)
.addDevDependency(packageName("@types/jest"), COMMON)
.addDevDependency(packageName("ts-jest"), COMMON)
.addScript(scriptKey("test"), scriptCommand("jest"))
.addScript(scriptKey("test:watch"), scriptCommand("jest --watch"))
.addScript(scriptKey("test:watch:all"), scriptCommand("jest --watchAll"))
.addScript(scriptKey("eslint:ci"), scriptCommand("eslint './**/*.{ts,js}'"))
.addScript(scriptKey("eslint"), scriptCommand("eslint './**/*.{ts,js}' --fix"))
.and()
.files()
.add(SOURCE.file(".eslintrc.js"), to(".eslintrc.js"))
.add(SOURCE.file("jest.config.js"), to("jest.config.js"))
.add(SOURCE.file("tsconfig.json"), to("tsconfig.json"))
.and()
.add(SOURCE.file(".eslintrc.js"), to(".eslintrc.js"))
.add(SOURCE.file("jest.config.js"), to("jest.config.js"))
.add(SOURCE.file("tsconfig.json"), to("tsconfig.json"))
.and()
.build();
//@formatter:on
}
}

0 comments on commit d947791

Please sign in to comment.