Skip to content

Commit

Permalink
lint adjusts
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima committed Nov 2, 2023
1 parent a699fe2 commit 9f23b13
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 33 deletions.
3 changes: 1 addition & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"node": true,
"es2020": true
},
"extends": ["airbnb-base", "plugin:prettier/recommended"],
"extends": ["eslint:recommended", "plugin:prettier/recommended"],
"parserOptions": {
"ecmaVersion": 11,
"sourceType": "module"
Expand All @@ -15,7 +15,6 @@
],
"rules": {
"func-names": "off",
"import/no-extraneous-dependencies": ["error", { "devDependencies": true }],
"import/no-unresolved": "off",
"no-restricted-syntax": [
"error",
Expand Down
1 change: 0 additions & 1 deletion cli/logo.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const {
versions: { micronaut: MICRONAUT_VERSION },
} = constants;

// eslint-disable-next-line import/prefer-default-export
export function getLogo() {
const { version } = JSON.parse(readFileSync(new URL('../package.json', import.meta.url)));

Expand Down
33 changes: 3 additions & 30 deletions generators/server/generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@ import {
GENERATOR_MAVEN,
} from 'generator-jhipster/generators';
import { createNeedleCallback, createBase64Secret } from 'generator-jhipster/generators/base/support';
import { addJavaAnnotation } from 'generator-jhipster/generators/java/support';
import mnConstants from '../constants.cjs';
import { writeFiles } from './files.js';

import command from './command.js';
import { entityFiles } from './entity-files.js';

export default class extends ServerGenerator {
command = command;

constructor(args, opts, features) {
super(args, opts, {
...features,
checkBlueprint: true,
});

this.command = command;
if (!this.options.help) {
this.jhipsterTemplatesFolders.push(
// For _persistClass_.java.jhi.hibernate_cache file
Expand Down Expand Up @@ -72,8 +72,7 @@ export default class extends ServerGenerator {
get [ServerGenerator.COMPOSING]() {
return this.asComposingTaskGroup({
async composing() {
const { buildTool, enableTranslation, databaseType, messageBroker, searchEngine, testFrameworks, websocket, cacheProvider } =
this.jhipsterConfigWithDefaults;
const { buildTool, enableTranslation, databaseType, cacheProvider } = this.jhipsterConfigWithDefaults;
if (buildTool === 'gradle') {
await this.composeWithJHipster(GENERATOR_GRADLE);
} else if (buildTool === 'maven') {
Expand All @@ -92,32 +91,6 @@ export default class extends ServerGenerator {
if (databaseType === 'sql') {
await this.composeWithJHipster(GENERATOR_LIQUIBASE);
}
/*
else if (databaseType === CASSANDRA) {
await this.composeWithJHipster(GENERATOR_SPRING_DATA_CASSANDRA);
} else if (databaseType === COUCHBASE) {
await this.composeWithJHipster(GENERATOR_SPRING_DATA_COUCHBASE);
} else if (databaseType === MONGODB) {
await this.composeWithJHipster(GENERATOR_SPRING_DATA_MONGODB);
} else if (databaseType === NEO4J) {
await this.composeWithJHipster(GENERATOR_SPRING_DATA_NEO4J);
}
if (messageBroker === KAFKA || messageBroker === PULSAR) {
await this.composeWithJHipster(GENERATOR_SPRING_CLOUD_STREAM);
}
if (searchEngine === ELASTICSEARCH) {
await this.composeWithJHipster(GENERATOR_SPRING_DATA_ELASTICSEARCH);
}
if (testFrameworks?.includes(CUCUMBER)) {
await this.composeWithJHipster(GENERATOR_CUCUMBER);
}
if (testFrameworks?.includes(GATLING)) {
await this.composeWithJHipster(GENERATOR_GATLING);
}
if (websocket === SPRING_WEBSOCKET) {
await this.composeWithJHipster(GENERATOR_SPRING_WEBSOCKET);
}
*/
if (['ehcache', 'caffeine', 'hazelcast', 'infinispan', 'memcached', 'redis'].includes(cacheProvider)) {
await this.composeWithJHipster('jhipster-micronaut:micronaut-cache');
}
Expand Down

0 comments on commit 9f23b13

Please sign in to comment.