From a0ab33c9289a54651484729a6ced32c54ad7b035 Mon Sep 17 00:00:00 2001 From: Bastien Dumont <bdumont@grandlyon.com> Date: Mon, 11 Sep 2023 11:23:06 +0200 Subject: [PATCH] add eslint plugin import --- .eslintrc.js | 7 +++++++ src/services/consent.service.ts | 5 +++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index d7dcf07f..1a4985d5 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -6,6 +6,8 @@ module.exports = { 'prettier', // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier 'plugin:prettier/recommended', // Enables eslint-plugin-prettier and displays prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array. 'plugin:react-hooks/recommended', + 'react-app', + 'plugin:import/recommended', ], plugins: ['@typescript-eslint', 'react', 'react-hooks'], overrides: [ @@ -48,5 +50,10 @@ module.exports = { react: { version: 'detect', // Tells eslint-plugin-react to automatically detect the version of React to use }, + 'import/resolver': { + node: { + extensions: ['.js', '.jsx', '.ts', '.tsx'], + }, + }, }, } diff --git a/src/services/consent.service.ts b/src/services/consent.service.ts index ba6a8748..b68d040d 100644 --- a/src/services/consent.service.ts +++ b/src/services/consent.service.ts @@ -1,11 +1,12 @@ import axios, { AxiosRequestConfig } from 'axios' import { DateTime } from 'luxon' import { toast } from 'react-toastify' -import { ConsentEntity, IConsent } from '../models/consent.model' import { + ConsentEntity, ConsentPaginationEntity, + IConsent, IConsentPagination, -} from './../models/consent.model' +} from '../models/consent.model' export class ConsentService { /** -- GitLab