Skip to content

Commit 1c0dde3

Browse files
authored
Merge pull request #15 from codeXsit/codex-config-change
feat: config changes
2 parents e06d46d + e23d505 commit 1c0dde3

File tree

6 files changed

+21
-18
lines changed

6 files changed

+21
-18
lines changed

.eslintrc.cjs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ module.exports = {
2121
sourceType: "module",
2222
},
2323
rules: {
24-
quotes: ["error", "double", { avoidEscape: true }],
24+
// quotes: ["error", "single", { avoidEscape: true }],
2525
"no-shadow": "off",
26-
"strict": "off",
26+
strict: "off",
2727
"react/jsx-uses-react": ["off"],
2828
"react/react-in-jsx-scope": ["off"],
2929
"no-unused-vars": [
@@ -32,6 +32,8 @@ module.exports = {
3232
],
3333
"react/jsx-pascal-case": ["error", { allowAllCaps: true }],
3434
"no-console": "error",
35-
"import/no-extraneous-dependencies": ["error", { devDependencies: true }],
35+
"import/no-unresolved": "off",
36+
"import/extensions": "off",
37+
// "import/no-extraneous-dependencies": ["error", { devDependencies: true }],
3638
},
3739
};

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,15 @@
1616
"react": "^18.2.0",
1717
"react-dom": "^18.2.0",
1818
"react-router-dom": "^6.22.1",
19-
"react-toastify": "^10.0.4"
19+
"react-toastify": "^10.0.4",
20+
"@vitejs/plugin-react": "^4.2.1",
21+
"vite": "^5.1.0"
2022
},
2123
"devDependencies": {
2224
"@commitlint/cli": "^18.6.1",
2325
"@commitlint/config-conventional": "^18.6.2",
2426
"@types/react": "^18.2.55",
2527
"@types/react-dom": "^18.2.19",
26-
"@vitejs/plugin-react": "^4.2.1",
2728
"autoprefixer": "^10.4.17",
2829
"eslint": "^8.56.0",
2930
"eslint-config-airbnb": "^19.0.4",
@@ -38,8 +39,7 @@
3839
"lint-staged": "^15.2.2",
3940
"postcss-cli": "^11.0.0",
4041
"prettier": "^3.2.5",
41-
"tailwindcss": "^3.4.1",
42-
"vite": "^5.1.0"
42+
"tailwindcss": "^3.4.1"
4343
},
4444
"husky": {
4545
"hooks": {

src/App.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { HashRouter as Router, Routes, Route } from "react-router-dom";
22
import { ToastContainer } from "react-toastify";
3-
import routes from "./routes/index";
3+
import routes from "@/routes/index";
44

55
function App() {
66
return (

src/main.jsx

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
1-
import React from "react";
21
import ReactDOM from "react-dom/client";
3-
import App from "./App";
4-
import "./assets/styles/index.css";
2+
import App from "@/App";
3+
import "@/assets/styles/index.css";
54

6-
ReactDOM.createRoot(document.getElementById("root")).render(
7-
<React.StrictMode>
8-
<App />
9-
</React.StrictMode>,
10-
);
5+
ReactDOM.createRoot(document.getElementById("root")).render(<App />);

src/pages/Home/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
function Home() {
2-
return <div className="bg-background">Home</div>;
2+
return <div>Home</div>;
33
}
44

55
export default Home;

vite.config.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
import { defineConfig } from "vite";
22
import react from "@vitejs/plugin-react";
3+
import path from "path";
34

45
// https://vitejs.dev/config/
56
export default defineConfig({
67
plugins: [react()],
78
server: {
89
port: 3000,
9-
}
10+
},
11+
resolve: {
12+
alias: {
13+
"@": path.resolve(__dirname, "./src"),
14+
},
15+
},
1016
});

0 commit comments

Comments
 (0)