-
-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10598 from qmonmert/eslint990
ESLint 9
- Loading branch information
Showing
15 changed files
with
177 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 0 additions & 24 deletions
24
src/main/resources/generator/client/react/core/.eslintrc.cjs
This file was deleted.
Oops, something went wrong.
42 changes: 42 additions & 0 deletions
42
src/main/resources/generator/client/react/core/eslint.config.js.mustache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import globals from 'globals'; | ||
import typescript from 'typescript-eslint'; | ||
import eslint from '@eslint/js'; | ||
import react from 'eslint-plugin-react/configs/recommended.js'; | ||
|
||
export default typescript.config( | ||
{ | ||
languageOptions: { | ||
globals: { | ||
...globals.node, | ||
}, | ||
}, | ||
}, | ||
{ | ||
ignores: ['{{projectBuildDirectory}}/'], | ||
}, | ||
eslint.configs.recommended, | ||
{ | ||
files: ['src/main/webapp/**/*.{ts,tsx}', 'src/main/webapp/**/*.spec.ts'], | ||
extends: [...typescript.configs.recommendedTypeChecked, react], | ||
settings: { | ||
react: { | ||
version: 'detect', | ||
}, | ||
}, | ||
languageOptions: { | ||
globals: { | ||
...globals.browser, | ||
}, | ||
parserOptions: { | ||
project: ['./tsconfig.json'], | ||
}, | ||
}, | ||
rules: { | ||
'react/react-in-jsx-scope': 'off', | ||
'@typescript-eslint/no-unsafe-argument': 'off', | ||
'@typescript-eslint/no-unsafe-member-access': 'off', | ||
'@typescript-eslint/no-floating-promises': 'off', | ||
'@typescript-eslint/no-misused-promises': 'off', | ||
}, | ||
}, | ||
); |
This file was deleted.
Oops, something went wrong.
40 changes: 40 additions & 0 deletions
40
src/main/resources/generator/client/vue/eslint.config.js.mustache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import globals from 'globals'; | ||
import typescript from 'typescript-eslint'; | ||
import js from '@eslint/js'; | ||
import vue from 'eslint-plugin-vue'; | ||
|
||
export default typescript.config( | ||
{ | ||
languageOptions: { | ||
globals: { | ||
...globals.node, | ||
}, | ||
}, | ||
}, | ||
{ | ||
ignores: ['{{projectBuildDirectory}}/'], | ||
}, | ||
js.configs.recommended, | ||
...typescript.configs.recommended.map(config => (config.name === 'typescript-eslint/base' ? config : { ...config, files: ['**/*.ts'] })), | ||
...vue.configs['flat/recommended'], | ||
{ | ||
files: ['**/*.vue'], | ||
languageOptions: { | ||
parserOptions: { parser: '@typescript-eslint/parser' }, | ||
globals: { ...globals.browser }, | ||
}, | ||
}, | ||
{ | ||
files: ['src/*/webapp/**/*.vue', 'src/*/webapp/**/*.ts'], | ||
languageOptions: { | ||
globals: { ...globals.browser }, | ||
}, | ||
rules: { | ||
quotes: ['error', 'single', { avoidEscape: true }], | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'@typescript-eslint/no-unused-vars': ['error'], | ||
'vue/html-self-closing': 'off', | ||
'@typescript-eslint/no-empty-object-type': 'off', | ||
}, | ||
}, | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
63 changes: 63 additions & 0 deletions
63
src/main/resources/generator/typescript/eslint.config.js.mustache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
import js from '@eslint/js'; | ||
import imports from 'eslint-plugin-import-x'; | ||
import globals from 'globals'; | ||
import typescript from 'typescript-eslint'; | ||
|
||
export default typescript.config( | ||
{ | ||
languageOptions: { | ||
globals: { | ||
...globals.node, | ||
}, | ||
}, | ||
}, | ||
{ | ||
ignores: [ | ||
'{{projectBuildDirectory}}/' | ||
], | ||
}, | ||
js.configs.recommended, | ||
...typescript.configs.recommended.map(config => (config.name === 'typescript-eslint/base' ? config : { ...config, files: ['**/*.ts'] })), | ||
{ | ||
extends: [imports.flatConfigs.recommended, imports.flatConfigs.typescript], | ||
languageOptions: { | ||
// import plugin does not use ecmaVersion and sourceType from languageOptions object | ||
parserOptions: { | ||
ecmaVersion: 2022, | ||
sourceType: 'module', | ||
}, | ||
}, | ||
rules: { | ||
'import-x/no-unresolved': 'off', | ||
'import-x/order': [ | ||
'error', | ||
{ | ||
alphabetize: { | ||
order: 'asc', | ||
caseInsensitive: true, | ||
}, | ||
'newlines-between': 'always', | ||
}, | ||
], | ||
}, | ||
}, | ||
{ | ||
files: ['src/*/webapp/**/*.ts'], | ||
languageOptions: { | ||
globals: { ...globals.browser }, | ||
}, | ||
rules: { | ||
quotes: ['error', 'single', { avoidEscape: true }], | ||
'comma-dangle': [ | ||
'error', | ||
{ | ||
arrays: 'always-multiline', | ||
objects: 'always-multiline', | ||
imports: 'always-multiline', | ||
exports: 'always-multiline', | ||
functions: 'never', | ||
}, | ||
], | ||
}, | ||
}, | ||
); |
Oops, something went wrong.