Skip to content

Commit

Permalink
Merge pull request #26828 from mshima/editorconfig
Browse files Browse the repository at this point in the history
convert editorconfig to multistep template
  • Loading branch information
DanielFran authored Jul 26, 2024
2 parents 2105b09 + 173ff10 commit 4e9ff87
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
3 changes: 0 additions & 3 deletions generators/common/__snapshots__/generator.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ insert_final_newline = true
# Change these settings to your own preference
indent_style = space
indent_size = 4
[*.{ts,tsx,js,jsx,json,css,scss,yml,html,vue}]
indent_size = 2
[*.md]
Expand Down
2 changes: 1 addition & 1 deletion generators/common/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
export const commonFiles = {
global: [
{
templates: ['README.md.jhi', '.editorconfig'],
templates: ['README.md.jhi', '.editorconfig.jhi'],
},
],
sonar: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@ insert_final_newline = true

# Change these settings to your own preference
indent_style = space
indent_size = 4

[*.{ts,tsx,js,jsx,json,css,scss,yml,html,vue}]
indent_size = 2
indent_size = <%= prettierTabWidth %>

[*.md]
trim_trailing_whitespace = false

<&- fragments.render({ join: '\n\n' }) &>
2 changes: 1 addition & 1 deletion generators/init/generator.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ describe(`generator - ${generator}`, () => {
await helpers
.runJHipster('init')
.withMockedJHipsterGenerators(['bootstrap'])
.withSharedApplication({ projectDescription: 'projectDescription' })
.withSharedApplication({ projectDescription: 'projectDescription', prettierTabWidth: 'prettierTabWidth' })
.withJHipsterConfig();
});
it('should write files and match snapshot', () => {
Expand Down
2 changes: 1 addition & 1 deletion generators/init/templates/.editorconfig.jhi.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ insert_final_newline = true

# Change these settings to your own preference
indent_style = space
indent_size = 2
indent_size = <%= prettierTabWidth %>

[*.md]
trim_trailing_whitespace = false
Expand Down
1 change: 1 addition & 0 deletions generators/java/generators/bootstrap/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ export default class BootstrapGenerator extends BaseApplicationGenerator {
javaMainPackageTemplatesBlock({
templates: ['GeneratedByJHipster.java'],
}),
{ templates: ['.editorconfig.jhi.java'] },
],
context: application,
});
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Generated by jhipster:java:bootstrap generator
[*.java]
indent_size = 4

0 comments on commit 4e9ff87

Please sign in to comment.