jhipster / generator-jhipster

JHipster is a development platform to quickly generate, develop, & deploy modern web applications & microservice architectures.
https://www.jhipster.tech
Apache License 2.0
21.56k stars 4.02k forks source link

JHipster creates an invalid project when creating entities with underscore. #11527

Closed mshima closed 4 years ago

mshima commented 4 years ago
Overview of the issue

JHipster validation allows underscore on entityName, but the generated client code is invalid. Both angular/react are affected.

Lots of error Interface 'ITest_dashed' must be PascalCased @typescript-eslint/class-name-casing

Motivation for or Use Case

Don't allow a invalid code to be generated.

Reproduce the error
Create an all default project
$ jhipster
INFO! Using JHipster version installed globally
INFO! Running default command
INFO! Executing jhipster:app
INFO! Options: from-cli: true

        ██╗ ██╗   ██╗ ████████╗ ███████╗   ██████╗ ████████╗ ████████╗ ███████╗
        ██║ ██║   ██║ ╚══██╔══╝ ██╔═══██╗ ██╔════╝ ╚══██╔══╝ ██╔═════╝ ██╔═══██╗
        ██║ ████████║    ██║    ███████╔╝ ╚█████╗     ██║    ██████╗   ███████╔╝
  ██╗   ██║ ██╔═══██║    ██║    ██╔════╝   ╚═══██╗    ██║    ██╔═══╝   ██╔══██║
  ╚██████╔╝ ██║   ██║ ████████╗ ██║       ██████╔╝    ██║    ████████╗ ██║  ╚██╗
   ╚═════╝  ╚═╝   ╚═╝ ╚═══════╝ ╚═╝       ╚═════╝     ╚═╝    ╚═══════╝ ╚═╝   ╚═╝

                            https://www.jhipster.tech

Welcome to JHipster v6.8.0
Application files will be generated in folder: /Users/mshima/tmp/jhipster_entities
 _______________________________________________________________________________________________________________

  Documentation for creating an application is at https://www.jhipster.tech/creating-an-app/
  If you find JHipster useful, consider sponsoring the project at https://opencollective.com/generator-jhipster
 _______________________________________________________________________________________________________________

? Which *type* of application would you like to create? Monolithic application (recommended for simple projects)
? [Alpha] Do you want to make it reactive with Spring WebFlux? No
? What is the base name of your application? jhipster_entities
? What is your default Java package name? com.mycompany.myapp
? Do you want to use the JHipster Registry to configure, monitor and scale your application? No
? Which *type* of authentication would you like to use? JWT authentication (stateless, with a token)
? Which *type* of database would you like to use? SQL (H2, MySQL, MariaDB, PostgreSQL, Oracle, MSSQL)
? Which *production* database would you like to use? MySQL
? Which *development* database would you like to use? H2 with disk-based persistence
? Do you want to use the Spring cache abstraction? Yes, with the Ehcache implementation (local cache, for a single node)
? Do you want to use Hibernate 2nd level cache? Yes
? Would you like to use Maven or Gradle for building the backend? Maven
? Which other technologies would you like to use? (Press  to select,  to toggle all,  to invert selection)
? Which *Framework* would you like to use for the client? Angular

? Would you like to use a Bootswatch theme (https://bootswatch.com/)? Default JHipster
? Would you like to enable internationalization support? Yes
? Please choose the native language of the application English
? Please choose additional languages to install (Press  to select,  to toggle all,  to invert selection)
? Besides JUnit and Jest, which testing frameworks would you like to use? (Press  to select,  to toggle all,  to invert selection)
? Would you like to install other generators from the JHipster Marketplace? No

Installing languages: en

Git repository initialized.

.
.
.
.

  run `npm audit fix` to fix them, or `npm audit` for details
Application successfully committed to Git from /Users/mshima/tmp/jhipster_entities.

If you find JHipster useful consider sponsoring the project https://www.jhipster.tech/sponsors/

Server application generated successfully.

Run your Spring Boot application:
./mvnw

Client application generated successfully.

Start your Webpack development server with:
 npm start

> jhipster-entities@0.0.1-SNAPSHOT cleanup /Users/mshima/tmp/jhipster_entities
> rimraf target/classes/static/ target/classes/aot

INFO! Congratulations, JHipster execution is complete!
 
Create an entity with underscore
$ jhipster entity test_dashed
INFO! Using JHipster version installed locally in current project's node_modules
INFO! Executing jhipster:entity test_dashed
INFO! Options: from-cli: true

The entity test_dashed is being created.

Generating field #1

? Do you want to add a field to your entity? Yes
? What is the name of your field? test
? What is the type of your field? String
? Do you want to add validation rules to your field? No

================= Test_dashed =================
Fields
test (String)

Generating field #2

? Do you want to add a field to your entity? No

================= Test_dashed =================
Fields
test (String)

Generating relationships to other entities

? Do you want to add a relationship to another entity? No

================= Test_dashed =================
Fields
test (String)

? Do you want to use separate service class for your business logic? Yes, generate a separate service class
? Do you want to use a Data Transfer Object (DTO)? No, use the entity directly
? Do you want to add filtering? Not needed
? Is this entity read-only? No
? Do you want pagination on your entity? Yes, with pagination links

Everything is configured, generating the entity...

> jhipster-entities@0.0.1-SNAPSHOT webpack:build /Users/mshima/tmp/jhipster_entities
> npm run cleanup && npm run webpack:build:main

> jhipster-entities@0.0.1-SNAPSHOT cleanup /Users/mshima/tmp/jhipster_entities
> rimraf target/classes/static/ target/classes/aot

> jhipster-entities@0.0.1-SNAPSHOT webpack:build:main /Users/mshima/tmp/jhipster_entities
> npm run webpack -- --config webpack/webpack.dev.js --env.stats=minimal

> jhipster-entities@0.0.1-SNAPSHOT webpack /Users/mshima/tmp/jhipster_entities
> node --max_old_space_size=4096 node_modules/webpack/bin/webpack.js "--config" "webpack/webpack.dev.js" "--env.stats=minimal"

Webpack: Starting ...

  ❯ Compile modules

Compiling @angular/core : es2015 as esm2015

Compiling @angular/common : es2015 as esm2015

Compiling @angular/platform-browser : es2015 as esm2015

Compiling @angular/platform-browser-dynamic : es2015 as esm2015

Compiling @angular/forms : es2015 as esm2015

Compiling @ng-bootstrap/ng-bootstrap : es2015 as esm2015

Compiling @fortawesome/angular-fontawesome : es2015 as esm2015

Compiling @ngx-translate/core : es2015 as esm2015

Compiling @angular/common/http : es2015 as esm2015

Compiling @ngx-translate/http-loader : es2015 as esm2015

Compiling @angular/router : es2015 as esm2015

Compiling ng-jhipster : es2015 as esm2015

Compiling ngx-infinite-scroll : es2015 as esm2015

Webpack: Starting ...

  ✔ Compile modules
  ✔ Build modules
  ✔ Optimize modules
  ✔ Emit files

Webpack: Finished after 70.810 seconds.

 ERROR  Failed to compile with 8 errors                                                                                                                                                                      12:11:19 PM

 error  in ./src/main/webapp/app/entities/test-dashed/test-dashed-delete-dialog.component.ts

Module Error (from ./node_modules/eslint-loader/dist/cjs.js):

/Users/mshima/tmp/jhipster_entities/src/main/webapp/app/entities/test-dashed/test-dashed-delete-dialog.component.ts
   5:10  error  Identifier 'ITest_dashed' is not in camel case                      @typescript-eslint/camelcase
   5:10  error  Identifier 'ITest_dashed' is not in camel case                      @typescript-eslint/camelcase
   6:10  error  Identifier 'Test_dashedService' is not in camel case                @typescript-eslint/camelcase
   6:10  error  Identifier 'Test_dashedService' is not in camel case                @typescript-eslint/camelcase
  11:14  error  Class 'Test_dashedDeleteDialogComponent' must be PascalCased        @typescript-eslint/class-name-casing
  11:14  error  Identifier 'Test_dashedDeleteDialogComponent' is not in camel case  @typescript-eslint/camelcase
  12:17  error  Identifier 'ITest_dashed' is not in camel case                      @typescript-eslint/camelcase
  15:35  error  Identifier 'Test_dashedService' is not in camel case                @typescript-eslint/camelcase

✖ 8 problems (8 errors, 0 warnings)

 @ ./src/main/webapp/app/entities/test-dashed/test-dashed.module.ts 7:0-89 15:218-250 20:109-141 21:34-66
 @ ./src/main/webapp/app/entities/entity.module.ts
 @ ./src/main/webapp/app/app.module.ts
 @ ./src/main/webapp/app/app.main.ts

 error  in ./src/main/webapp/app/entities/test-dashed/test-dashed-detail.component.ts

Module Error (from ./node_modules/eslint-loader/dist/cjs.js):

/Users/mshima/tmp/jhipster_entities/src/main/webapp/app/entities/test-dashed/test-dashed-detail.component.ts
   4:10  error  Identifier 'ITest_dashed' is not in camel case                @typescript-eslint/camelcase
   4:10  error  Identifier 'ITest_dashed' is not in camel case                @typescript-eslint/camelcase
  10:14  error  Class 'Test_dashedDetailComponent' must be PascalCased        @typescript-eslint/class-name-casing
  10:14  error  Identifier 'Test_dashedDetailComponent' is not in camel case  @typescript-eslint/camelcase
  11:16  error  Identifier 'ITest_dashed' is not in camel case                @typescript-eslint/camelcase
  16:43  error  Identifier 'test_dashed' is not in camel case                 @typescript-eslint/camelcase
  16:67  error  Identifier 'test_dashed' is not in camel case                 @typescript-eslint/camelcase
  16:81  error  Identifier 'test_dashed' is not in camel case                 @typescript-eslint/camelcase

✖ 8 problems (8 errors, 0 warnings)

 @ ./src/main/webapp/app/entities/test-dashed/test-dashed.route.ts 11:0-76 59:19-45
 @ ./src/main/webapp/app/entities/test-dashed/test-dashed.module.ts
 @ ./src/main/webapp/app/entities/entity.module.ts
 @ ./src/main/webapp/app/app.module.ts
 @ ./src/main/webapp/app/app.main.ts

 error  in ./src/main/webapp/app/entities/test-dashed/test-dashed-update.component.ts

Module Error (from ./node_modules/eslint-loader/dist/cjs.js):

/Users/mshima/tmp/jhipster_entities/src/main/webapp/app/entities/test-dashed/test-dashed-update.component.ts
   8:10  error  Identifier 'ITest_dashed' is not in camel case                @typescript-eslint/camelcase
   8:10  error  Identifier 'ITest_dashed' is not in camel case                @typescript-eslint/camelcase
   8:24  error  Identifier 'Test_dashed' is not in camel case                 @typescript-eslint/camelcase
   8:24  error  Identifier 'Test_dashed' is not in camel case                 @typescript-eslint/camelcase
   9:10  error  Identifier 'Test_dashedService' is not in camel case          @typescript-eslint/camelcase
   9:10  error  Identifier 'Test_dashedService' is not in camel case          @typescript-eslint/camelcase
  15:14  error  Class 'Test_dashedUpdateComponent' must be PascalCased        @typescript-eslint/class-name-casing
  15:14  error  Identifier 'Test_dashedUpdateComponent' is not in camel case  @typescript-eslint/camelcase
  23:45  error  Identifier 'Test_dashedService' is not in camel case          @typescript-eslint/camelcase
  26:43  error  Identifier 'test_dashed' is not in camel case                 @typescript-eslint/camelcase
  31:14  error  Identifier 'test_dashed' is not in camel case                 @typescript-eslint/camelcase
  31:27  error  Identifier 'ITest_dashed' is not in camel case                @typescript-eslint/camelcase
  33:11  error  Identifier 'test_dashed' is not in camel case                 @typescript-eslint/camelcase
  34:13  error  Identifier 'test_dashed' is not in camel case                 @typescript-eslint/camelcase
  44:11  error  Identifier 'test_dashed' is not in camel case                 @typescript-eslint/camelcase
  45:9   error  Identifier 'test_dashed' is not in camel case                 @typescript-eslint/camelcase
  52:29  error  Identifier 'ITest_dashed' is not in camel case                @typescript-eslint/camelcase
  60:69  error  Identifier 'ITest_dashed' is not in camel case                @typescript-eslint/camelcase

✖ 18 problems (18 errors, 0 warnings)

 @ ./src/main/webapp/app/entities/test-dashed/test-dashed.route.ts 12:0-76 71:19-45 83:19-45
 @ ./src/main/webapp/app/entities/test-dashed/test-dashed.module.ts
 @ ./src/main/webapp/app/entities/entity.module.ts
 @ ./src/main/webapp/app/app.module.ts
 @ ./src/main/webapp/app/app.main.ts

 error  in ./src/main/webapp/app/entities/test-dashed/test-dashed.component.ts

Module Error (from ./node_modules/eslint-loader/dist/cjs.js):

/Users/mshima/tmp/jhipster_entities/src/main/webapp/app/entities/test-dashed/test-dashed.component.ts
    8:10  error  Identifier 'ITest_dashed' is not in camel case                      @typescript-eslint/camelcase
    8:10  error  Identifier 'ITest_dashed' is not in camel case                      @typescript-eslint/camelcase
   11:10  error  Identifier 'Test_dashedService' is not in camel case                @typescript-eslint/camelcase
   11:10  error  Identifier 'Test_dashedService' is not in camel case                @typescript-eslint/camelcase
   12:10  error  Identifier 'Test_dashedDeleteDialogComponent' is not in camel case  @typescript-eslint/camelcase
   12:10  error  Identifier 'Test_dashedDeleteDialogComponent' is not in camel case  @typescript-eslint/camelcase
   18:14  error  Class 'Test_dashedComponent' must be PascalCased                    @typescript-eslint/class-name-casing
   18:14  error  Identifier 'Test_dashedComponent' is not in camel case              @typescript-eslint/camelcase
   19:18  error  Identifier 'ITest_dashed' is not in camel case                      @typescript-eslint/camelcase
   29:35  error  Identifier 'Test_dashedService' is not in camel case                @typescript-eslint/camelcase
   46:28  error  Identifier 'ITest_dashed' is not in camel case                      @typescript-eslint/camelcase
   68:32  error  Identifier 'ITest_dashed' is not in camel case                      @typescript-eslint/camelcase
   73:3   error  Identifier 'registerChangeInTest_dasheds' is not in camel case      @typescript-eslint/camelcase
   77:10  error  Identifier 'test_dashed' is not in camel case                       @typescript-eslint/camelcase
   77:23  error  Identifier 'ITest_dashed' is not in camel case                      @typescript-eslint/camelcase
   79:32  error  Identifier 'test_dashed' is not in camel case                       @typescript-eslint/camelcase
   79:46  error  Identifier 'test_dashed' is not in camel case                       @typescript-eslint/camelcase
   90:29  error  Identifier 'ITest_dashed' is not in camel case                      @typescript-eslint/camelcase
  100:10  error  Identifier 'test_dasheds' is not in camel case                      @typescript-eslint/camelcase

✖ 19 problems (19 errors, 0 warnings)

 @ ./src/main/webapp/app/entities/test-dashed/test-dashed.route.ts 10:0-63 46:19-39
 @ ./src/main/webapp/app/entities/test-dashed/test-dashed.module.ts
 @ ./src/main/webapp/app/entities/entity.module.ts
 @ ./src/main/webapp/app/app.module.ts
 @ ./src/main/webapp/app/app.main.ts

 error  in ./src/main/webapp/app/entities/test-dashed/test-dashed.module.ts

Module Error (from ./node_modules/eslint-loader/dist/cjs.js):

/Users/mshima/tmp/jhipster_entities/src/main/webapp/app/entities/test-dashed/test-dashed.module.ts
   5:10  error  Identifier 'Test_dashedComponent' is not in camel case               @typescript-eslint/camelcase
   5:10  error  Identifier 'Test_dashedComponent' is not in camel case               @typescript-eslint/camelcase
   6:10  error  Identifier 'Test_dashedDetailComponent' is not in camel case         @typescript-eslint/camelcase
   6:10  error  Identifier 'Test_dashedDetailComponent' is not in camel case         @typescript-eslint/camelcase
   7:10  error  Identifier 'Test_dashedUpdateComponent' is not in camel case         @typescript-eslint/camelcase
   7:10  error  Identifier 'Test_dashedUpdateComponent' is not in camel case         @typescript-eslint/camelcase
   8:10  error  Identifier 'Test_dashedDeleteDialogComponent' is not in camel case   @typescript-eslint/camelcase
   8:10  error  Identifier 'Test_dashedDeleteDialogComponent' is not in camel case   @typescript-eslint/camelcase
   9:10  error  Identifier 'test_dashedRoute' is not in camel case                   @typescript-eslint/camelcase
   9:10  error  Identifier 'test_dashedRoute' is not in camel case                   @typescript-eslint/camelcase
  13:18  error  Identifier 'Test_dashedComponent' is not in camel case               @typescript-eslint/camelcase
  13:40  error  Identifier 'Test_dashedDetailComponent' is not in camel case         @typescript-eslint/camelcase
  13:68  error  Identifier 'Test_dashedUpdateComponent' is not in camel case         @typescript-eslint/camelcase
  13:96  error  Identifier 'Test_dashedDeleteDialogComponent' is not in camel case   @typescript-eslint/camelcase
  14:21  error  Identifier 'Test_dashedDeleteDialogComponent' is not in camel case   @typescript-eslint/camelcase
  16:14  error  Class 'JhipsterEntitiesTest_dashedModule' must be PascalCased        @typescript-eslint/class-name-casing
  16:14  error  Identifier 'JhipsterEntitiesTest_dashedModule' is not in camel case  @typescript-eslint/camelcase

✖ 17 problems (17 errors, 0 warnings)

 @ ./src/main/webapp/app/entities/entity.module.ts 12:40-82 25:48-90
 @ ./src/main/webapp/app/app.module.ts
 @ ./src/main/webapp/app/app.main.ts

 error  in ./src/main/webapp/app/entities/test-dashed/test-dashed.route.ts

Module Error (from ./node_modules/eslint-loader/dist/cjs.js):

/Users/mshima/tmp/jhipster_entities/src/main/webapp/app/entities/test-dashed/test-dashed.route.ts
  10:10  error  Identifier 'ITest_dashed' is not in camel case                @typescript-eslint/camelcase
  10:10  error  Identifier 'ITest_dashed' is not in camel case                @typescript-eslint/camelcase
  10:24  error  Identifier 'Test_dashed' is not in camel case                 @typescript-eslint/camelcase
  10:24  error  Identifier 'Test_dashed' is not in camel case                 @typescript-eslint/camelcase
  11:10  error  Identifier 'Test_dashedService' is not in camel case          @typescript-eslint/camelcase
  11:10  error  Identifier 'Test_dashedService' is not in camel case          @typescript-eslint/camelcase
  12:10  error  Identifier 'Test_dashedComponent' is not in camel case        @typescript-eslint/camelcase
  12:10  error  Identifier 'Test_dashedComponent' is not in camel case        @typescript-eslint/camelcase
  13:10  error  Identifier 'Test_dashedDetailComponent' is not in camel case  @typescript-eslint/camelcase
  13:10  error  Identifier 'Test_dashedDetailComponent' is not in camel case  @typescript-eslint/camelcase
  14:10  error  Identifier 'Test_dashedUpdateComponent' is not in camel case  @typescript-eslint/camelcase
  14:10  error  Identifier 'Test_dashedUpdateComponent' is not in camel case  @typescript-eslint/camelcase
  17:14  error  Class 'Test_dashedResolve' must be PascalCased                @typescript-eslint/class-name-casing
  17:14  error  Identifier 'Test_dashedResolve' is not in camel case          @typescript-eslint/camelcase
  17:52  error  Identifier 'ITest_dashed' is not in camel case                @typescript-eslint/camelcase
  18:32  error  Identifier 'Test_dashedService' is not in camel case          @typescript-eslint/camelcase
  20:54  error  Identifier 'ITest_dashed' is not in camel case                @typescript-eslint/camelcase
  24:18  error  Identifier 'test_dashed' is not in camel case                 @typescript-eslint/camelcase
  24:44  error  Identifier 'Test_dashed' is not in camel case                 @typescript-eslint/camelcase
  25:15  error  Identifier 'test_dashed' is not in camel case                 @typescript-eslint/camelcase
  26:23  error  Identifier 'test_dashed' is not in camel case                 @typescript-eslint/camelcase
  38:14  error  Identifier 'test_dashedRoute' is not in camel case            @typescript-eslint/camelcase
  41:16  error  Identifier 'Test_dashedComponent' is not in camel case        @typescript-eslint/camelcase
  54:16  error  Identifier 'Test_dashedDetailComponent' is not in camel case  @typescript-eslint/camelcase
  56:7   error  Identifier 'test_dashed' is not in camel case                 @typescript-eslint/camelcase
  56:20  error  Identifier 'Test_dashedResolve' is not in camel case          @typescript-eslint/camelcase
  66:16  error  Identifier 'Test_dashedUpdateComponent' is not in camel case  @typescript-eslint/camelcase
  68:7   error  Identifier 'test_dashed' is not in camel case                 @typescript-eslint/camelcase
  68:20  error  Identifier 'Test_dashedResolve' is not in camel case          @typescript-eslint/camelcase
  78:16  error  Identifier 'Test_dashedUpdateComponent' is not in camel case  @typescript-eslint/camelcase
  80:7   error  Identifier 'test_dashed' is not in camel case                 @typescript-eslint/camelcase
  80:20  error  Identifier 'Test_dashedResolve' is not in camel case          @typescript-eslint/camelcase

✖ 32 problems (32 errors, 0 warnings)

 @ ./src/main/webapp/app/entities/test-dashed/test-dashed.module.ts 8:0-55 14:249-265 19:78-94
 @ ./src/main/webapp/app/entities/entity.module.ts
 @ ./src/main/webapp/app/app.module.ts
 @ ./src/main/webapp/app/app.main.ts

 error  in ./src/main/webapp/app/entities/test-dashed/test-dashed.service.ts

Module Error (from ./node_modules/eslint-loader/dist/cjs.js):

/Users/mshima/tmp/jhipster_entities/src/main/webapp/app/entities/test-dashed/test-dashed.service.ts
   7:10  error  Identifier 'ITest_dashed' is not in camel case        @typescript-eslint/camelcase
   7:10  error  Identifier 'ITest_dashed' is not in camel case        @typescript-eslint/camelcase
   9:40  error  Identifier 'ITest_dashed' is not in camel case        @typescript-eslint/camelcase
  10:45  error  Identifier 'ITest_dashed' is not in camel case        @typescript-eslint/camelcase
  13:14  error  Class 'Test_dashedService' must be PascalCased        @typescript-eslint/class-name-casing
  13:14  error  Identifier 'Test_dashedService' is not in camel case  @typescript-eslint/camelcase
  18:10  error  Identifier 'test_dashed' is not in camel case         @typescript-eslint/camelcase
  18:23  error  Identifier 'ITest_dashed' is not in camel case        @typescript-eslint/camelcase
  19:27  error  Identifier 'ITest_dashed' is not in camel case        @typescript-eslint/camelcase
  22:10  error  Identifier 'test_dashed' is not in camel case         @typescript-eslint/camelcase
  22:23  error  Identifier 'ITest_dashed' is not in camel case        @typescript-eslint/camelcase
  23:26  error  Identifier 'ITest_dashed' is not in camel case        @typescript-eslint/camelcase
  27:26  error  Identifier 'ITest_dashed' is not in camel case        @typescript-eslint/camelcase
  32:26  error  Identifier 'ITest_dashed' is not in camel case        @typescript-eslint/camelcase

✖ 14 problems (14 errors, 0 warnings)

 @ ./src/main/webapp/app/entities/test-dashed/test-dashed-delete-dialog.component.ts 4:0-59 6:0-44 89:167-188 101:38-59
 @ ./src/main/webapp/app/entities/test-dashed/test-dashed.module.ts
 @ ./src/main/webapp/app/entities/entity.module.ts
 @ ./src/main/webapp/app/app.module.ts
 @ ./src/main/webapp/app/app.main.ts

 error  in ./src/main/webapp/app/shared/model/test-dashed.model.ts

Module Error (from ./node_modules/eslint-loader/dist/cjs.js):

/Users/mshima/tmp/jhipster_entities/src/main/webapp/app/shared/model/test-dashed.model.ts
  1:18  error  Interface 'ITest_dashed' must be PascalCased    @typescript-eslint/class-name-casing
  1:18  error  Identifier 'ITest_dashed' is not in camel case  @typescript-eslint/camelcase
  6:14  error  Class 'Test_dashed' must be PascalCased         @typescript-eslint/class-name-casing
  6:14  error  Identifier 'Test_dashed' is not in camel case   @typescript-eslint/camelcase
  6:37  error  Identifier 'ITest_dashed' is not in camel case  @typescript-eslint/camelcase

✖ 5 problems (5 errors, 0 warnings)

 @ ./src/main/webapp/app/entities/test-dashed/test-dashed.route.ts 8:0-65 34:22-33
 @ ./src/main/webapp/app/entities/test-dashed/test-dashed.module.ts
 @ ./src/main/webapp/app/entities/entity.module.ts
 @ ./src/main/webapp/app/app.module.ts
 @ ./src/main/webapp/app/app.main.ts

   468 modules

ERROR in ./src/main/webapp/app/entities/test-dashed/test-dashed-delete-dialog.component.ts
Module Error (from ./node_modules/eslint-loader/dist/cjs.js):

/Users/mshima/tmp/jhipster_entities/src/main/webapp/app/entities/test-dashed/test-dashed-delete-dialog.component.ts
   5:10  error  Identifier 'ITest_dashed' is not in camel case                      @typescript-eslint/camelcase
   5:10  error  Identifier 'ITest_dashed' is not in camel case                      @typescript-eslint/camelcase
   6:10  error  Identifier 'Test_dashedService' is not in camel case                @typescript-eslint/camelcase
   6:10  error  Identifier 'Test_dashedService' is not in camel case                @typescript-eslint/camelcase
  11:14  error  Class 'Test_dashedDeleteDialogComponent' must be PascalCased        @typescript-eslint/class-name-casing
  11:14  error  Identifier 'Test_dashedDeleteDialogComponent' is not in camel case  @typescript-eslint/camelcase
  12:17  error  Identifier 'ITest_dashed' is not in camel case                      @typescript-eslint/camelcase
  15:35  error  Identifier 'Test_dashedService' is not in camel case                @typescript-eslint/camelcase

✖ 8 problems (8 errors, 0 warnings)

ERROR in ./src/main/webapp/app/entities/test-dashed/test-dashed-detail.component.ts
Module Error (from ./node_modules/eslint-loader/dist/cjs.js):

/Users/mshima/tmp/jhipster_entities/src/main/webapp/app/entities/test-dashed/test-dashed-detail.component.ts
   4:10  error  Identifier 'ITest_dashed' is not in camel case                @typescript-eslint/camelcase
   4:10  error  Identifier 'ITest_dashed' is not in camel case                @typescript-eslint/camelcase
  10:14  error  Class 'Test_dashedDetailComponent' must be PascalCased        @typescript-eslint/class-name-casing
  10:14  error  Identifier 'Test_dashedDetailComponent' is not in camel case  @typescript-eslint/camelcase
  11:16  error  Identifier 'ITest_dashed' is not in camel case                @typescript-eslint/camelcase
  16:43  error  Identifier 'test_dashed' is not in camel case                 @typescript-eslint/camelcase
  16:67  error  Identifier 'test_dashed' is not in camel case                 @typescript-eslint/camelcase
  16:81  error  Identifier 'test_dashed' is not in camel case                 @typescript-eslint/camelcase

✖ 8 problems (8 errors, 0 warnings)

ERROR in ./src/main/webapp/app/entities/test-dashed/test-dashed-update.component.ts
Module Error (from ./node_modules/eslint-loader/dist/cjs.js):

/Users/mshima/tmp/jhipster_entities/src/main/webapp/app/entities/test-dashed/test-dashed-update.component.ts
   8:10  error  Identifier 'ITest_dashed' is not in camel case                @typescript-eslint/camelcase
   8:10  error  Identifier 'ITest_dashed' is not in camel case                @typescript-eslint/camelcase
   8:24  error  Identifier 'Test_dashed' is not in camel case                 @typescript-eslint/camelcase
   8:24  error  Identifier 'Test_dashed' is not in camel case                 @typescript-eslint/camelcase
   9:10  error  Identifier 'Test_dashedService' is not in camel case          @typescript-eslint/camelcase
   9:10  error  Identifier 'Test_dashedService' is not in camel case          @typescript-eslint/camelcase
  15:14  error  Class 'Test_dashedUpdateComponent' must be PascalCased        @typescript-eslint/class-name-casing
  15:14  error  Identifier 'Test_dashedUpdateComponent' is not in camel case  @typescript-eslint/camelcase
  23:45  error  Identifier 'Test_dashedService' is not in camel case          @typescript-eslint/camelcase
  26:43  error  Identifier 'test_dashed' is not in camel case                 @typescript-eslint/camelcase
  31:14  error  Identifier 'test_dashed' is not in camel case                 @typescript-eslint/camelcase
  31:27  error  Identifier 'ITest_dashed' is not in camel case                @typescript-eslint/camelcase
  33:11  error  Identifier 'test_dashed' is not in camel case                 @typescript-eslint/camelcase
  34:13  error  Identifier 'test_dashed' is not in camel case                 @typescript-eslint/camelcase
  44:11  error  Identifier 'test_dashed' is not in camel case                 @typescript-eslint/camelcase
  45:9   error  Identifier 'test_dashed' is not in camel case                 @typescript-eslint/camelcase
  52:29  error  Identifier 'ITest_dashed' is not in camel case                @typescript-eslint/camelcase
  60:69  error  Identifier 'ITest_dashed' is not in camel case                @typescript-eslint/camelcase

✖ 18 problems (18 errors, 0 warnings)

ERROR in ./src/main/webapp/app/entities/test-dashed/test-dashed.component.ts
Module Error (from ./node_modules/eslint-loader/dist/cjs.js):

/Users/mshima/tmp/jhipster_entities/src/main/webapp/app/entities/test-dashed/test-dashed.component.ts
    8:10  error  Identifier 'ITest_dashed' is not in camel case                      @typescript-eslint/camelcase
    8:10  error  Identifier 'ITest_dashed' is not in camel case                      @typescript-eslint/camelcase
   11:10  error  Identifier 'Test_dashedService' is not in camel case                @typescript-eslint/camelcase
   11:10  error  Identifier 'Test_dashedService' is not in camel case                @typescript-eslint/camelcase
   12:10  error  Identifier 'Test_dashedDeleteDialogComponent' is not in camel case  @typescript-eslint/camelcase
   12:10  error  Identifier 'Test_dashedDeleteDialogComponent' is not in camel case  @typescript-eslint/camelcase
   18:14  error  Class 'Test_dashedComponent' must be PascalCased                    @typescript-eslint/class-name-casing
   18:14  error  Identifier 'Test_dashedComponent' is not in camel case              @typescript-eslint/camelcase
   19:18  error  Identifier 'ITest_dashed' is not in camel case                      @typescript-eslint/camelcase
   29:35  error  Identifier 'Test_dashedService' is not in camel case                @typescript-eslint/camelcase
   46:28  error  Identifier 'ITest_dashed' is not in camel case                      @typescript-eslint/camelcase
   68:32  error  Identifier 'ITest_dashed' is not in camel case                      @typescript-eslint/camelcase
   73:3   error  Identifier 'registerChangeInTest_dasheds' is not in camel case      @typescript-eslint/camelcase
   77:10  error  Identifier 'test_dashed' is not in camel case                       @typescript-eslint/camelcase
   77:23  error  Identifier 'ITest_dashed' is not in camel case                      @typescript-eslint/camelcase
   79:32  error  Identifier 'test_dashed' is not in camel case                       @typescript-eslint/camelcase
   79:46  error  Identifier 'test_dashed' is not in camel case                       @typescript-eslint/camelcase
   90:29  error  Identifier 'ITest_dashed' is not in camel case                      @typescript-eslint/camelcase
  100:10  error  Identifier 'test_dasheds' is not in camel case                      @typescript-eslint/camelcase

✖ 19 problems (19 errors, 0 warnings)

ERROR in ./src/main/webapp/app/entities/test-dashed/test-dashed.module.ts
Module Error (from ./node_modules/eslint-loader/dist/cjs.js):

/Users/mshima/tmp/jhipster_entities/src/main/webapp/app/entities/test-dashed/test-dashed.module.ts
   5:10  error  Identifier 'Test_dashedComponent' is not in camel case               @typescript-eslint/camelcase
   5:10  error  Identifier 'Test_dashedComponent' is not in camel case               @typescript-eslint/camelcase
   6:10  error  Identifier 'Test_dashedDetailComponent' is not in camel case         @typescript-eslint/camelcase
   6:10  error  Identifier 'Test_dashedDetailComponent' is not in camel case         @typescript-eslint/camelcase
   7:10  error  Identifier 'Test_dashedUpdateComponent' is not in camel case         @typescript-eslint/camelcase
   7:10  error  Identifier 'Test_dashedUpdateComponent' is not in camel case         @typescript-eslint/camelcase
   8:10  error  Identifier 'Test_dashedDeleteDialogComponent' is not in camel case   @typescript-eslint/camelcase
   8:10  error  Identifier 'Test_dashedDeleteDialogComponent' is not in camel case   @typescript-eslint/camelcase
   9:10  error  Identifier 'test_dashedRoute' is not in camel case                   @typescript-eslint/camelcase
   9:10  error  Identifier 'test_dashedRoute' is not in camel case                   @typescript-eslint/camelcase
  13:18  error  Identifier 'Test_dashedComponent' is not in camel case               @typescript-eslint/camelcase
  13:40  error  Identifier 'Test_dashedDetailComponent' is not in camel case         @typescript-eslint/camelcase
  13:68  error  Identifier 'Test_dashedUpdateComponent' is not in camel case         @typescript-eslint/camelcase
  13:96  error  Identifier 'Test_dashedDeleteDialogComponent' is not in camel case   @typescript-eslint/camelcase
  14:21  error  Identifier 'Test_dashedDeleteDialogComponent' is not in camel case   @typescript-eslint/camelcase
  16:14  error  Class 'JhipsterEntitiesTest_dashedModule' must be PascalCased        @typescript-eslint/class-name-casing
  16:14  error  Identifier 'JhipsterEntitiesTest_dashedModule' is not in camel case  @typescript-eslint/camelcase

✖ 17 problems (17 errors, 0 warnings)

ERROR in ./src/main/webapp/app/entities/test-dashed/test-dashed.route.ts
Module Error (from ./node_modules/eslint-loader/dist/cjs.js):

/Users/mshima/tmp/jhipster_entities/src/main/webapp/app/entities/test-dashed/test-dashed.route.ts
  10:10  error  Identifier 'ITest_dashed' is not in camel case                @typescript-eslint/camelcase
  10:10  error  Identifier 'ITest_dashed' is not in camel case                @typescript-eslint/camelcase
  10:24  error  Identifier 'Test_dashed' is not in camel case                 @typescript-eslint/camelcase
  10:24  error  Identifier 'Test_dashed' is not in camel case                 @typescript-eslint/camelcase
  11:10  error  Identifier 'Test_dashedService' is not in camel case          @typescript-eslint/camelcase
  11:10  error  Identifier 'Test_dashedService' is not in camel case          @typescript-eslint/camelcase
  12:10  error  Identifier 'Test_dashedComponent' is not in camel case        @typescript-eslint/camelcase
  12:10  error  Identifier 'Test_dashedComponent' is not in camel case        @typescript-eslint/camelcase
  13:10  error  Identifier 'Test_dashedDetailComponent' is not in camel case  @typescript-eslint/camelcase
  13:10  error  Identifier 'Test_dashedDetailComponent' is not in camel case  @typescript-eslint/camelcase
  14:10  error  Identifier 'Test_dashedUpdateComponent' is not in camel case  @typescript-eslint/camelcase
  14:10  error  Identifier 'Test_dashedUpdateComponent' is not in camel case  @typescript-eslint/camelcase
  17:14  error  Class 'Test_dashedResolve' must be PascalCased                @typescript-eslint/class-name-casing
  17:14  error  Identifier 'Test_dashedResolve' is not in camel case          @typescript-eslint/camelcase
  17:52  error  Identifier 'ITest_dashed' is not in camel case                @typescript-eslint/camelcase
  18:32  error  Identifier 'Test_dashedService' is not in camel case          @typescript-eslint/camelcase
  20:54  error  Identifier 'ITest_dashed' is not in camel case                @typescript-eslint/camelcase
  24:18  error  Identifier 'test_dashed' is not in camel case                 @typescript-eslint/camelcase
  24:44  error  Identifier 'Test_dashed' is not in camel case                 @typescript-eslint/camelcase
  25:15  error  Identifier 'test_dashed' is not in camel case                 @typescript-eslint/camelcase
  26:23  error  Identifier 'test_dashed' is not in camel case                 @typescript-eslint/camelcase
  38:14  error  Identifier 'test_dashedRoute' is not in camel case            @typescript-eslint/camelcase
  41:16  error  Identifier 'Test_dashedComponent' is not in camel case        @typescript-eslint/camelcase
  54:16  error  Identifier 'Test_dashedDetailComponent' is not in camel case  @typescript-eslint/camelcase
  56:7   error  Identifier 'test_dashed' is not in camel case                 @typescript-eslint/camelcase
  56:20  error  Identifier 'Test_dashedResolve' is not in camel case          @typescript-eslint/camelcase
  66:16  error  Identifier 'Test_dashedUpdateComponent' is not in camel case  @typescript-eslint/camelcase
  68:7   error  Identifier 'test_dashed' is not in camel case                 @typescript-eslint/camelcase
  68:20  error  Identifier 'Test_dashedResolve' is not in camel case          @typescript-eslint/camelcase
  78:16  error  Identifier 'Test_dashedUpdateComponent' is not in camel case  @typescript-eslint/camelcase
  80:7   error  Identifier 'test_dashed' is not in camel case                 @typescript-eslint/camelcase
  80:20  error  Identifier 'Test_dashedResolve' is not in camel case          @typescript-eslint/camelcase

✖ 32 problems (32 errors, 0 warnings)

ERROR in ./src/main/webapp/app/entities/test-dashed/test-dashed.service.ts
Module Error (from ./node_modules/eslint-loader/dist/cjs.js):

/Users/mshima/tmp/jhipster_entities/src/main/webapp/app/entities/test-dashed/test-dashed.service.ts
   7:10  error  Identifier 'ITest_dashed' is not in camel case        @typescript-eslint/camelcase
   7:10  error  Identifier 'ITest_dashed' is not in camel case        @typescript-eslint/camelcase
   9:40  error  Identifier 'ITest_dashed' is not in camel case        @typescript-eslint/camelcase
  10:45  error  Identifier 'ITest_dashed' is not in camel case        @typescript-eslint/camelcase
  13:14  error  Class 'Test_dashedService' must be PascalCased        @typescript-eslint/class-name-casing
  13:14  error  Identifier 'Test_dashedService' is not in camel case  @typescript-eslint/camelcase
  18:10  error  Identifier 'test_dashed' is not in camel case         @typescript-eslint/camelcase
  18:23  error  Identifier 'ITest_dashed' is not in camel case        @typescript-eslint/camelcase
  19:27  error  Identifier 'ITest_dashed' is not in camel case        @typescript-eslint/camelcase
  22:10  error  Identifier 'test_dashed' is not in camel case         @typescript-eslint/camelcase
  22:23  error  Identifier 'ITest_dashed' is not in camel case        @typescript-eslint/camelcase
  23:26  error  Identifier 'ITest_dashed' is not in camel case        @typescript-eslint/camelcase
  27:26  error  Identifier 'ITest_dashed' is not in camel case        @typescript-eslint/camelcase
  32:26  error  Identifier 'ITest_dashed' is not in camel case        @typescript-eslint/camelcase

✖ 14 problems (14 errors, 0 warnings)

ERROR in ./src/main/webapp/app/shared/model/test-dashed.model.ts
Module Error (from ./node_modules/eslint-loader/dist/cjs.js):

/Users/mshima/tmp/jhipster_entities/src/main/webapp/app/shared/model/test-dashed.model.ts
  1:18  error  Interface 'ITest_dashed' must be PascalCased    @typescript-eslint/class-name-casing
  1:18  error  Identifier 'ITest_dashed' is not in camel case  @typescript-eslint/camelcase
  6:14  error  Class 'Test_dashed' must be PascalCased         @typescript-eslint/class-name-casing
  6:14  error  Identifier 'Test_dashed' is not in camel case   @typescript-eslint/camelcase
  6:37  error  Identifier 'ITest_dashed' is not in camel case  @typescript-eslint/camelcase

✖ 5 problems (5 errors, 0 warnings)

npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! jhipster-entities@0.0.1-SNAPSHOT webpack: `node --max_old_space_size=4096 node_modules/webpack/bin/webpack.js "--config" "webpack/webpack.dev.js" "--env.stats=minimal"`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the jhipster-entities@0.0.1-SNAPSHOT webpack script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/mshima/.npm/_logs/2020-03-29T15_11_19_669Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! jhipster-entities@0.0.1-SNAPSHOT webpack:build:main: `npm run webpack -- --config webpack/webpack.dev.js --env.stats=minimal`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the jhipster-entities@0.0.1-SNAPSHOT webpack:build:main script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/mshima/.npm/_logs/2020-03-29T15_11_19_695Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! jhipster-entities@0.0.1-SNAPSHOT webpack:build: `npm run cleanup && npm run webpack:build:main`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the jhipster-entities@0.0.1-SNAPSHOT webpack:build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/mshima/.npm/_logs/2020-03-29T15_11_19_716Z-debug.log
INFO! Congratulations, JHipster execution is complete!

 
Related issues
Suggest a Fix
  • Disable underscore for entity server and client. (Breaking change if someone is using skipClient with underscore)
  • Disable underscore for client only (skipClient is false)
  • Let entity name to have underscore but change entityClass to cameCase and fix every compilation error. Looks like there are many places that should be fixed.
  • Disable @typescript-eslint/class-name-casing?
JHipster Version(s)

master

JHipster configuration
Entity configuration(s) entityName.json files generated in the .jhipster directory
Browsers and Operating System
  • [ ] Checking this box is mandatory (this is just to show you read everything)
mshima commented 4 years ago

Fix 1 and 2 are easy. I done locally. I've started fix 3, but I don't want to waste time if 1 or 2 are enough. I don't like fix 4.

I want to know the better approach.

I an in favor of fix 1.

pascalgrimaud commented 4 years ago

adding a bounty as it's a bug

MathieuAA commented 4 years ago

We should forbid that...