diff --git a/.eslintrc.cjs b/.eslintrc.cjs
index 80bb7e7..8393e3a 100644
--- a/.eslintrc.cjs
+++ b/.eslintrc.cjs
@@ -17,10 +17,15 @@ module.exports = {
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
- project: ['./tsconfig.json', './tsconfig.node.json'],
+ project: ['./tsconfig.json', './tsconfig.node.json', "./tsconfig.app.json"],
},
plugins: ['react', '@typescript-eslint', 'prettier'],
rules: {
'react/react-in-jsx-scope': 0,
+ 'import/no-extraneous-dependencies': 'off',
+ 'import/prefer-default-export': 'warn',
+ "import/prefer-default-export": "off",
+ "import/order": 'warn',
+ "import/extensions": 'warn'
},
};
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
index d589575..f5e7f7f 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -39,6 +39,7 @@
"eslint": "^8.57.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-typescript": "^18.0.0",
+ "eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsx-a11y": "^6.9.0",
"eslint-plugin-prettier": "^5.1.3",
@@ -3986,6 +3987,18 @@
"eslint": "^8.56.0"
}
},
+ "node_modules/eslint-config-prettier": {
+ "version": "9.1.0",
+ "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz",
+ "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==",
+ "dev": true,
+ "bin": {
+ "eslint-config-prettier": "bin/cli.js"
+ },
+ "peerDependencies": {
+ "eslint": ">=7.0.0"
+ }
+ },
"node_modules/eslint-import-resolver-node": {
"version": "0.3.9",
"resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz",
diff --git a/package.json b/package.json
index a9445e3..9525c19 100644
--- a/package.json
+++ b/package.json
@@ -47,6 +47,7 @@
"eslint": "^8.57.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-typescript": "^18.0.0",
+ "eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsx-a11y": "^6.9.0",
"eslint-plugin-prettier": "^5.1.3",
diff --git a/src/App.spec.tsx b/src/App.spec.tsx
index 35fd460..2c42088 100644
--- a/src/App.spec.tsx
+++ b/src/App.spec.tsx
@@ -1,9 +1,9 @@
-import React from "react";
-import { render, screen } from "@testing-library/react";
-import App from "./App";
+import React from 'react';
+import { render, screen } from '@testing-library/react';
+import App from './App';
-test("renders test text", () => {
- render();
- const linkElement = screen.getByText(/test/i);
- expect(linkElement).toBeInTheDocument();
+test('renders test text', () => {
+ render();
+ const linkElement = screen.getByText(/test/i);
+ expect(linkElement).toBeInTheDocument();
});
diff --git a/src/App.tsx b/src/App.tsx
index 702ab7b..9d941b8 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -1,5 +1,5 @@
-import React from "react";
-import "./App.css";
+import React from 'react';
+import './App.css';
function App() {
return <>test>;
diff --git a/src/api/index.ts b/src/api/index.ts
index 11b4680..89bd8c0 100644
--- a/src/api/index.ts
+++ b/src/api/index.ts
@@ -1,8 +1,8 @@
-import axios from "axios";
+import axios from 'axios';
export const client = axios.create({
- baseURL: "",
+ baseURL: '',
headers: {
- "Content-Type": "application/json",
+ 'Content-Type': 'application/json',
},
});
diff --git a/src/main.tsx b/src/main.tsx
index d2e3f10..6caeef8 100644
--- a/src/main.tsx
+++ b/src/main.tsx
@@ -1,9 +1,9 @@
-import React from "react";
-import ReactDOM from "react-dom/client";
-import App from "./App.tsx";
-import "./index.css";
-import { BrowserRouter } from "react-router-dom";
-import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
+import React from 'react';
+import ReactDOM from 'react-dom/client';
+import App from './App.tsx';
+import './index.css';
+import { BrowserRouter } from 'react-router-dom';
+import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import '@fontsource/roboto/300.css';
import '@fontsource/roboto/400.css';
@@ -20,12 +20,12 @@ const queryClient = new QueryClient({
},
});
-ReactDOM.createRoot(document.getElementById("root")!).render(
+ReactDOM.createRoot(document.getElementById('root')!).render(
- ,
+
);
diff --git a/src/setupTests.ts b/src/setupTests.ts
index bbd1951..7fdab8b 100644
--- a/src/setupTests.ts
+++ b/src/setupTests.ts
@@ -1,4 +1,4 @@
-import * as matchers from "@testing-library/jest-dom/matchers";
-import { expect } from "vitest";
+import * as matchers from '@testing-library/jest-dom/matchers';
+import { expect } from 'vitest';
expect.extend(matchers);
diff --git a/src/store/authStore.ts b/src/store/authStore.ts
index 6d5848f..da4f435 100644
--- a/src/store/authStore.ts
+++ b/src/store/authStore.ts
@@ -1,4 +1,4 @@
-import { create } from "zustand";
+import { create } from 'zustand';
export const useAuthStore = create(() => ({
user: null,
diff --git a/tsconfig.app.json b/tsconfig.app.json
index 571953b..d1883b6 100644
--- a/tsconfig.app.json
+++ b/tsconfig.app.json
@@ -16,7 +16,7 @@
"isolatedModules": true,
"moduleDetection": "force",
"noEmit": true,
- "jsx": "react",
+ "jsx": "react-jsx",
/* Linting */
"strict": true,
@@ -24,5 +24,5 @@
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true
},
- "include": ["src", ".eslintrc.cjs"]
+ "include": [".prettierrc.cjs", ".eslintrc.cjs", "src"]
}