Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
davibarbosa2 committed Aug 9, 2024
1 parent 52bc411 commit d2b5416
Show file tree
Hide file tree
Showing 10 changed files with 245 additions and 265 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ jobs:
- name: Lint
run: yarn lint

- name: Build
run: yarn build

- name: Test
run: yarn test

- name: Build
run: yarn build

# Add a deployment step here if needed
# - name: Deploy
# if: github.ref == 'refs/heads/main'
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

.eslintcache
node_modules
dist
dist-ssr
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@
"tailwind-merge": "^2.4.0",
"tailwindcss-animate": "^1.0.7",
"vee-validate": "^4.13.2",
"vite-plugin-eslint": "^1.8.1",
"vue": "^3.4.31",
"vue-router": "4",
"zod": "^3.23.8"
},
"devDependencies": {
"@faker-js/faker": "^8.4.1",
"@nabla/vite-plugin-eslint": "^2.0.4",
"@pinia/testing": "^0.1.5",
"@testing-library/jest-dom": "^6.4.8",
"@testing-library/user-event": "^14.5.2",
Expand Down
1 change: 1 addition & 0 deletions src/Pages/SearchView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@
import { Columns2, LoaderCircle } from "lucide-vue-next";
import { h, ref, watch } from "vue";
import { useRouter } from "vue-router";
import { vAutoAnimate } from "@formkit/auto-animate/vue";
const router = useRouter();
const searchStore = useSearchStore();
Expand Down
4 changes: 2 additions & 2 deletions src/components/tests/HotelsFilter.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, it, expect } from "vitest";
import { getByTestId, render, RenderOptions } from "@testing-library/vue";
import { render, RenderOptions } from "@testing-library/vue";
import userEvent from "@testing-library/user-event";
import HotelsFilter from "../HotelsFilter.vue";
import "@testing-library/jest-dom";
Expand Down Expand Up @@ -29,7 +29,7 @@ describe("HotelsFilter", () => {
});

it("emite eventos corretos ao clicar nas opções de filtro", async () => {
const { user, emitted, getByTestId, debug } = setupComponent(HotelsFilter);
const { user, emitted, getByTestId } = setupComponent(HotelsFilter);
await user.click(getByTestId("popover-trigger-button"));
const priceOrder = getByTestId("price-order-desc");
const ratingOrder = getByTestId("rating-order-asc");
Expand Down
1 change: 0 additions & 1 deletion src/components/tests/LocationSelector.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import userEvent from "@testing-library/user-event";
import LocationSelector from "../LocationSelector.vue";
import { beforeEach } from "node:test";
import "@testing-library/jest-dom";
import { json } from "stream/consumers";

global.fetch = vi.fn();

Expand Down
4 changes: 1 addition & 3 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import "./assets/index.css";
import App from "./App.vue";
import router from "./router/index";
import { createPinia } from "pinia";
import { autoAnimatePlugin } from "@formkit/auto-animate/vue";
import { makeServer } from "./server";
import { makeServer } from "./server.ts";

if (process.env.NODE_ENV === "development") {
makeServer();
Expand All @@ -15,6 +14,5 @@ const app = createApp(App);

app.use(pinia);
app.use(router);
app.use(autoAnimatePlugin);

app.mount("#app");
4 changes: 3 additions & 1 deletion src/server.js → src/server.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { createServer, Factory, Model, Response } from "miragejs";
// eslint-disable-next-line
//@ts-nocheck
import { createServer, Model, Response } from "miragejs";
import { generateHotels } from "./lib/utils";

const hotels = generateHotels(200);
Expand Down
4 changes: 2 additions & 2 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ import vue from "@vitejs/plugin-vue";
import tailwind from "tailwindcss";
import autoprefixer from "autoprefixer";
import Inspector from "vite-plugin-vue-inspector";
import eslint from "vite-plugin-eslint";
import eslintPlugin from "@nabla/vite-plugin-eslint";

export default defineConfig({
css: {
postcss: {
plugins: [tailwind(), autoprefixer()],
},
},
plugins: [vue(), Inspector(), eslint()],
plugins: [vue(), Inspector(), eslintPlugin()],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
Expand Down
Loading

0 comments on commit d2b5416

Please sign in to comment.