Skip to content

Commit

Permalink
Merge pull request #26793 from mshima/react-eslint
Browse files Browse the repository at this point in the history
react: update eslint to v9
  • Loading branch information
DanielFran committed Jul 23, 2024
2 parents f411927 + cd1eb59 commit 5f6889b
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 14 deletions.
6 changes: 3 additions & 3 deletions generators/react/resources/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"webstomp-client": "1.2.6"
},
"devDependencies": {
"@eslint/js": "8.57.0",
"@eslint/js": "9.7.0",
"@module-federation/utilities": "3.0.3-0",
"@testing-library/react": "16.0.0",
"@types/jest": "29.5.12",
Expand All @@ -48,7 +48,7 @@
"cross-env": "7.0.3",
"css-loader": "7.1.2",
"css-minimizer-webpack-plugin": "7.0.0",
"eslint": "8.57.0",
"eslint": "9.7.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-prettier": "5.2.1",
"eslint-plugin-react": "7.35.0",
Expand Down Expand Up @@ -81,7 +81,7 @@
"ts-jest": "29.2.3",
"ts-loader": "9.5.1",
"typescript": "5.5.4",
"typescript-eslint": "7.17.0",
"typescript-eslint": "8.0.0-alpha.51",
"webpack": "5.93.0",
"webpack-cli": "5.1.4",
"webpack-dev-server": "5.0.4",
Expand Down
8 changes: 0 additions & 8 deletions generators/react/templates/eslint.config.js.jhi.react.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,6 @@ import react from 'eslint-plugin-react/configs/recommended.js';
'@typescript-eslint/restrict-template-expressions': 'off',
'@typescript-eslint/restrict-plus-operands': 'off',
'@typescript-eslint/no-floating-promises': 'off',
'@typescript-eslint/ban-types': [
'error',
{
types: {
Object: 'Use {} instead.',
},
},
],
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/unbound-method': 'off',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-%>
import axios from 'axios';
import axios, { type AxiosError } from 'axios';
import { Storage } from 'react-jhipster';

const TIMEOUT = 1 * 60 * 1000;
Expand All @@ -34,7 +34,7 @@ const setupAxiosInterceptors = onUnauthenticated => {
return config;
};
const onResponseSuccess = response => response;
const onResponseError = err => {
const onResponseError = (err: AxiosError) => {
const status = err.status || (err.response ? err.response.status : 0);
if (status === 401) {
onUnauthenticated();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ const getFieldErrorsTosts = (fieldErrors: FieldErrorVM[]): TostMessage[] =>
<%_ } _%>
});

// eslint-disable-next-line complexity
export default () => next => action => {
const { error, payload } = action;

Expand Down
1 change: 0 additions & 1 deletion generators/react/templates/webpack/webpack.common.js.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ return merge(
}),
new ESLintPlugin({
configType: 'flat',
eslintPath: 'eslint/use-at-your-own-risk',
extensions: ['ts', 'tsx'],
}),
new ForkTsCheckerWebpackPlugin(),
Expand Down

0 comments on commit 5f6889b

Please sign in to comment.