From 5d5b8e7c232319ffa178d1d6e29b84798360f445 Mon Sep 17 00:00:00 2001 From: Marcelo Shima Date: Fri, 9 Aug 2024 09:00:44 -0300 Subject: [PATCH 1/4] add more eslint rules to base --- lib/eslint/base.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/eslint/base.js b/lib/eslint/base.js index 07f83129e39..900872cbbab 100644 --- a/lib/eslint/base.js +++ b/lib/eslint/base.js @@ -14,6 +14,20 @@ const baseConfig = { import: fixupPluginRules(imports), }, rules: { + curly: 'error', + 'dot-notation': 'error', + eqeqeq: ['error', 'always', { null: 'ignore' }], + 'no-else-return': 'error', + 'no-regex-spaces': 'error', + 'no-useless-computed-key': 'error', + 'no-useless-return': 'error', + 'no-var': 'error', + 'object-shorthand': 'error', + 'prefer-const': 'error', + 'prefer-destructuring': ['error', { array: false }], + 'prefer-object-has-own': 'error', + 'prefer-object-spread': 'error', + 'prefer-template': 'error', 'sort-imports': ['error', { ignoreDeclarationSort: true }], // Configure unused-imports rule From a663a6fd0aab37a52fb564bb06d45c5297988c2d Mon Sep 17 00:00:00 2001 From: Marcelo Shima Date: Fri, 9 Aug 2024 09:09:10 -0300 Subject: [PATCH 2/4] drop deprecated rules --- eslint.config.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index 71bd1f5c936..1dc72ff21ec 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -78,9 +78,6 @@ export default ts.config( }, { rules: { - 'eol-last': 'error', - quotes: ['error', 'single', { avoidEscape: true }], - semi: ['error', 'always'], eqeqeq: ['error', 'smart'], 'no-use-before-define': ['error', 'nofunc'], 'no-multi-str': 'error', @@ -88,7 +85,6 @@ export default ts.config( 'no-console': 'error', 'no-template-curly-in-string': 'error', 'no-nested-ternary': 'error', - 'lines-between-class-members': ['error', 'always', { exceptAfterSingleLine: true }], 'no-restricted-syntax': [ 'error', { From 912721f52a14939076c035a97fc217bbf9b7fc2c Mon Sep 17 00:00:00 2001 From: Marcelo Shima Date: Fri, 9 Aug 2024 13:17:37 -0300 Subject: [PATCH 3/4] drop non required type --- .../src/main/webapp/app/core/util/data-util.service.ts.ejs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators/angular/templates/src/main/webapp/app/core/util/data-util.service.ts.ejs b/generators/angular/templates/src/main/webapp/app/core/util/data-util.service.ts.ejs index c44e12ba559..c3afb733558 100644 --- a/generators/angular/templates/src/main/webapp/app/core/util/data-util.service.ts.ejs +++ b/generators/angular/templates/src/main/webapp/app/core/util/data-util.service.ts.ejs @@ -89,7 +89,7 @@ export class DataUtils { }; observer.error(error); } else { - const fieldContentType: string = field + 'ContentType'; + const fieldContentType = field + 'ContentType'; this.toBase64(file, (base64Data: string) => { editForm.patchValue({ [field]: base64Data, From ec1b0aea1940bf6923292ae2d0294173d359c7bf Mon Sep 17 00:00:00 2001 From: Marcelo Shima Date: Fri, 9 Aug 2024 13:18:35 -0300 Subject: [PATCH 4/4] drop curly rule --- lib/eslint/base.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/eslint/base.js b/lib/eslint/base.js index 900872cbbab..bfca23e93db 100644 --- a/lib/eslint/base.js +++ b/lib/eslint/base.js @@ -14,7 +14,6 @@ const baseConfig = { import: fixupPluginRules(imports), }, rules: { - curly: 'error', 'dot-notation': 'error', eqeqeq: ['error', 'always', { null: 'ignore' }], 'no-else-return': 'error',