diff --git a/.eslintrc.js b/.eslintrc.js index 5bcc1be3..57c51881 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -9,9 +9,6 @@ module.exports = { "plugin:nuxt/recommended", "google" ], - plugins: [ - "jsdoc" - ], parserOptions: { parser: "@babel/eslint-parser", requireConfigFile: false @@ -108,52 +105,6 @@ module.exports = { } }], "vue/multi-word-component-names": "off", - "valid-jsdoc": 0, - "jsdoc/check-access": 1, - "jsdoc/check-alignment": 1, - "jsdoc/check-indentation": 1, - "jsdoc/check-line-alignment": 1, - "jsdoc/check-param-names": 1, - "jsdoc/check-property-names": 1, - "jsdoc/check-syntax": 1, - "jsdoc/check-tag-names": 1, - "jsdoc/check-types": 1, - "jsdoc/check-values": 1, - "jsdoc/empty-tags": 1, - "jsdoc/implements-on-classes": 1, - "jsdoc/match-description": 1, - "jsdoc/multiline-blocks": 1, - "jsdoc/newline-after-description": 0, - "jsdoc/no-bad-blocks": 1, - "jsdoc/no-defaults": 1, - "jsdoc/no-missing-syntax": 0, - "jsdoc/no-multi-asterisks": 1, - "jsdoc/no-restricted-syntax": 0, - "jsdoc/no-types": 0, - "jsdoc/no-undefined-types": 1, - "jsdoc/require-asterisk-prefix": 1, - "jsdoc/require-description": 0, - "jsdoc/require-description-complete-sentence": 0, - "jsdoc/require-example": 0, - "jsdoc/require-file-overview": 0, - "jsdoc/require-hyphen-before-param-description": 1, - "jsdoc/require-jsdoc": 1, - "jsdoc/require-param": 1, - "jsdoc/require-param-description": 0, - "jsdoc/require-param-name": 1, - "jsdoc/require-param-type": 1, - "jsdoc/require-property": 1, - "jsdoc/require-property-description": 1, - "jsdoc/require-property-name": 1, - "jsdoc/require-property-type": 1, - "jsdoc/require-returns": 1, - "jsdoc/require-returns-check": 1, - "jsdoc/require-returns-description": 0, - "jsdoc/require-returns-type": 1, - "jsdoc/require-throws": 1, - "jsdoc/require-yields": 1, - "jsdoc/require-yields-check": 1, - "jsdoc/tag-lines": 0, - "jsdoc/valid-types": 1 + "valid-jsdoc": 0 } }; diff --git a/data/pages/kdv-hesaplayici/kdv-hesaplayici.calculator.test.js b/__test__/domains/kdv-hesaplayici/calculator.test.js similarity index 61% rename from data/pages/kdv-hesaplayici/kdv-hesaplayici.calculator.test.js rename to __test__/domains/kdv-hesaplayici/calculator.test.js index c11e2e8c..af538d7d 100644 --- a/data/pages/kdv-hesaplayici/kdv-hesaplayici.calculator.test.js +++ b/__test__/domains/kdv-hesaplayici/calculator.test.js @@ -1,4 +1,5 @@ -import Calculator, { Mode } from "@/data/pages/kdv-hesaplayici/kdv-hesaplayici.calculator.js"; +import { describe, expect, it } from "vitest"; +import Calculator, { Mode } from "@/domain/kdv-hesaplayici/calculator.js"; describe("kdv-hesaplayici/Calculator", () => { it(`should correctly calculate value added tax if params are: price-rate: [100-%15, 250-%18, 448-%25] / mode: ${Mode.TaxFreePriceToTaxAddedPrice}`, () => { @@ -8,17 +9,26 @@ describe("kdv-hesaplayici/Calculator", () => { { price: 100, rate: 15, - expected: { taxFree: 100, taxAdded: 115 } + expected: { + taxFree: 100, + taxAdded: 115 + } }, { price: 250, rate: 18, - expected: { taxFree: 250, taxAdded: 295 } + expected: { + taxFree: 250, + taxAdded: 295 + } }, { price: 448, rate: 25, - expected: { taxFree: 448, taxAdded: 560 } + expected: { + taxFree: 448, + taxAdded: 560 + } } ] }); @@ -31,25 +41,41 @@ describe("kdv-hesaplayici/Calculator", () => { { price: 100, rate: 15, - expected: { taxFree: 87, taxAdded: 100 } + expected: { + taxFree: 87, + taxAdded: 100 + } }, { price: 250, rate: 18, - expected: { taxFree: 211.9, taxAdded: 250 } + expected: { + taxFree: 211.9, + taxAdded: 250 + } }, { price: 448, rate: 25, - expected: { taxFree: 358.4, taxAdded: 448 } + expected: { + taxFree: 358.4, + taxAdded: 448 + } } ] }); }); }); -function calculate({ inputs, mode }) { - for (const { price, rate, expected } of inputs) { +function calculate({ + inputs, + mode +}) { + for (const { + price, + rate, + expected + } of inputs) { const calculator = new Calculator({ price, rate, diff --git a/data/pages/kdv-hesaplayici/kdv-hesaplayici.utils.test.js b/__test__/domains/kdv-hesaplayici/utils.test.js similarity index 93% rename from data/pages/kdv-hesaplayici/kdv-hesaplayici.utils.test.js rename to __test__/domains/kdv-hesaplayici/utils.test.js index 8570a3d0..0715ac93 100644 --- a/data/pages/kdv-hesaplayici/kdv-hesaplayici.utils.test.js +++ b/__test__/domains/kdv-hesaplayici/utils.test.js @@ -1,5 +1,6 @@ -import { handleQuery, shouldShowResults } from "@/data/pages/kdv-hesaplayici/kdv-hesaplayici.utils.js"; -import { Mode } from "@/data/pages/kdv-hesaplayici/kdv-hesaplayici.calculator.js"; +import { describe, expect, it } from "vitest"; +import { handleQuery, shouldShowResults } from "@/domain/kdv-hesaplayici/utils.js"; +import { Mode } from "@/domain/kdv-hesaplayici/calculator.js"; describe("kdv-hesaplayici/utils", () => { const modeOptions = [ diff --git a/data/pages/konsol-vergisi-hesaplayici/konsol-vergisi-hesaplayici.calculator.test.js b/__test__/domains/konsol-vergisi-hesaplayici/calculator.test.js similarity index 57% rename from data/pages/konsol-vergisi-hesaplayici/konsol-vergisi-hesaplayici.calculator.test.js rename to __test__/domains/konsol-vergisi-hesaplayici/calculator.test.js index 6fe0042e..129a95f4 100644 --- a/data/pages/konsol-vergisi-hesaplayici/konsol-vergisi-hesaplayici.calculator.test.js +++ b/__test__/domains/konsol-vergisi-hesaplayici/calculator.test.js @@ -1,4 +1,5 @@ -import Calculator from "@/data/pages/konsol-vergisi-hesaplayici/konsol-vergisi-hesaplayici.calculator.js"; +import { describe, expect, it } from "vitest"; +import Calculator from "@/domain/konsol-vergisi-hesaplayici/calculator.js"; describe("konsol-vergisi-hesaplayici/Calculator", () => { it(`should correctly calculate console tax if params are: price: [300, 400, 500] / calculateFromTaxAddedPrice: ${false}`, () => { @@ -7,15 +8,24 @@ describe("konsol-vergisi-hesaplayici/Calculator", () => { prices: [ { price: 300, - expected: { taxFree: 300, taxAdded: 518.4 } + expected: { + taxFree: 300, + taxAdded: 518.4 + } }, { price: 400, - expected: { taxFree: 400, taxAdded: 691.2 } + expected: { + taxFree: 400, + taxAdded: 691.2 + } }, { price: 500, - expected: { taxFree: 500, taxAdded: 864 } + expected: { + taxFree: 500, + taxAdded: 864 + } } ] }); @@ -27,23 +37,38 @@ describe("konsol-vergisi-hesaplayici/Calculator", () => { prices: [ { price: 300, - expected: { taxFree: 173.6, taxAdded: 300 } + expected: { + taxFree: 173.6, + taxAdded: 300 + } }, { price: 400, - expected: { taxFree: 231.4, taxAdded: 400 } + expected: { + taxFree: 231.4, + taxAdded: 400 + } }, { price: 500, - expected: { taxFree: 289.3, taxAdded: 500 } + expected: { + taxFree: 289.3, + taxAdded: 500 + } } ] }); }); }); -function calculate({ prices, calculateFromTaxAddedPrice }) { - for (const { price, expected } of prices) { +function calculate({ + prices, + calculateFromTaxAddedPrice +}) { + for (const { + price, + expected + } of prices) { const calculator = new Calculator({ price }, { diff --git a/data/pages/konsol-vergisi-hesaplayici/konsol-vergisi-hesaplayici.utils.test.js b/__test__/domains/konsol-vergisi-hesaplayici/utils.test.js similarity index 95% rename from data/pages/konsol-vergisi-hesaplayici/konsol-vergisi-hesaplayici.utils.test.js rename to __test__/domains/konsol-vergisi-hesaplayici/utils.test.js index 4dec27e4..f3487374 100644 --- a/data/pages/konsol-vergisi-hesaplayici/konsol-vergisi-hesaplayici.utils.test.js +++ b/__test__/domains/konsol-vergisi-hesaplayici/utils.test.js @@ -1,7 +1,5 @@ -import { - handleQuery, - shouldShowResults -} from "@/data/pages/konsol-vergisi-hesaplayici/konsol-vergisi-hesaplayici.utils.js"; +import { describe, expect, it } from "vitest"; +import { handleQuery, shouldShowResults } from "@/domain/konsol-vergisi-hesaplayici/utils.js"; describe("konsol-vergisi-hesaplayici/utils", () => { describe("shouldShowResults", () => { diff --git a/data/pages/telefon-vergisi-hesaplayici/telefon-vergisi-hesaplayici.calculator.test.js b/__test__/domains/telefon-vergisi-hesaplayici/calculator.test.js similarity index 65% rename from data/pages/telefon-vergisi-hesaplayici/telefon-vergisi-hesaplayici.calculator.test.js rename to __test__/domains/telefon-vergisi-hesaplayici/calculator.test.js index bda462f2..ca5eabcb 100644 --- a/data/pages/telefon-vergisi-hesaplayici/telefon-vergisi-hesaplayici.calculator.test.js +++ b/__test__/domains/telefon-vergisi-hesaplayici/calculator.test.js @@ -1,4 +1,8 @@ -import Calculator, { getSpecialConsumptionTaxRateByPrice, Registration } from "@/data/pages/telefon-vergisi-hesaplayici/telefon-vergisi-hesaplayici.calculator.js"; +import { describe, expect, it } from "vitest"; +import Calculator, { + getSpecialConsumptionTaxRateByPrice, + Registration +} from "@/domain/telefon-vergisi-hesaplayici/calculator.js"; describe("telefon-vergisi-hesaplayici/Calculator", () => { describe("getSpecialConsumptionTaxRateByPrice", () => { @@ -31,15 +35,24 @@ describe("telefon-vergisi-hesaplayici/Calculator", () => { prices: [ { price: 500, - expected: { taxFree: 500, taxAdded: 848.4 } + expected: { + taxFree: 500, + taxAdded: 848.4 + } }, { price: 1500, - expected: { taxFree: 1500, taxAdded: 3054.2 } + expected: { + taxFree: 1500, + taxAdded: 3054.2 + } }, { price: 5000, - expected: { taxFree: 5000, taxAdded: 10180.8 } + expected: { + taxFree: 5000, + taxAdded: 10180.8 + } } ] }); @@ -52,15 +65,24 @@ describe("telefon-vergisi-hesaplayici/Calculator", () => { prices: [ { price: 500, - expected: { taxFree: 294.7, taxAdded: 500 } + expected: { + taxFree: 294.7, + taxAdded: 500 + } }, { price: 1500, - expected: { taxFree: 789.3, taxAdded: 1500 } + expected: { + taxFree: 789.3, + taxAdded: 1500 + } }, { price: 5000, - expected: { taxFree: 2455.6, taxAdded: 5000 } + expected: { + taxFree: 2455.6, + taxAdded: 5000 + } } ] }); @@ -75,15 +97,24 @@ describe("telefon-vergisi-hesaplayici/Calculator", () => { prices: [ { price: 500, - expected: { taxFree: 500, taxAdded: 32212 } + expected: { + taxFree: 500, + taxAdded: 32212 + } }, { price: 1500, - expected: { taxFree: 1500, taxAdded: 33212 } + expected: { + taxFree: 1500, + taxAdded: 33212 + } }, { price: 5000, - expected: { taxFree: 5000, taxAdded: 36712 } + expected: { + taxFree: 5000, + taxAdded: 36712 + } } ] }); @@ -96,15 +127,24 @@ describe("telefon-vergisi-hesaplayici/Calculator", () => { prices: [ { price: 500, - expected: { taxFree: -31212, taxAdded: 500 } + expected: { + taxFree: -31212, + taxAdded: 500 + } }, { price: 1500, - expected: { taxFree: -30212, taxAdded: 1500 } + expected: { + taxFree: -30212, + taxAdded: 1500 + } }, { price: 5000, - expected: { taxFree: -26712, taxAdded: 5000 } + expected: { + taxFree: -26712, + taxAdded: 5000 + } } ] }); @@ -113,8 +153,15 @@ describe("telefon-vergisi-hesaplayici/Calculator", () => { }); }); -function calculate({ prices, registration, calculateFromTaxAddedPrice }) { - for (const { price, expected } of prices) { +function calculate({ + prices, + registration, + calculateFromTaxAddedPrice +}) { + for (const { + price, + expected + } of prices) { const calculator = new Calculator({ price, registration, diff --git a/data/pages/telefon-vergisi-hesaplayici/telefon-vergisi-hesaplayici.utils.test.js b/__test__/domains/telefon-vergisi-hesaplayici/utils.test.js similarity index 96% rename from data/pages/telefon-vergisi-hesaplayici/telefon-vergisi-hesaplayici.utils.test.js rename to __test__/domains/telefon-vergisi-hesaplayici/utils.test.js index 51f944ff..687e5862 100644 --- a/data/pages/telefon-vergisi-hesaplayici/telefon-vergisi-hesaplayici.utils.test.js +++ b/__test__/domains/telefon-vergisi-hesaplayici/utils.test.js @@ -1,4 +1,5 @@ -import { handleQuery, shouldShowResults } from "@/data/pages/telefon-vergisi-hesaplayici/telefon-vergisi-hesaplayici.utils.js"; +import { describe, expect, it } from "vitest"; +import { handleQuery, shouldShowResults } from "@/domain/telefon-vergisi-hesaplayici/utils.js"; describe("telefon-vergisi-hesaplayici/utils", () => { describe("shouldShowResults", () => { diff --git a/store/exchange-rates.test.js b/__test__/store/exchange-rates.test.js similarity index 96% rename from store/exchange-rates.test.js rename to __test__/store/exchange-rates.test.js index 87107770..334e8943 100644 --- a/store/exchange-rates.test.js +++ b/__test__/store/exchange-rates.test.js @@ -1,3 +1,4 @@ +import { beforeEach, describe, expect, it, vi } from "vitest"; import store from "@/store/exchange-rates.js"; describe("store/exchange-rates", () => { @@ -39,7 +40,7 @@ describe("store/exchange-rates", () => { let context = {}; beforeEach(() => { - global.fetch = jest.fn(() => + global.fetch = vi.fn(() => Promise.resolve({ json: () => Promise.resolve({ rates: { @@ -51,7 +52,7 @@ describe("store/exchange-rates", () => { context = { state, - commit: jest.fn() + commit: vi.fn() }; }); diff --git a/utils/calculate-minimum-wage-count.test.js b/__test__/utils/calculate-minimum-wage-count.test.js similarity index 88% rename from utils/calculate-minimum-wage-count.test.js rename to __test__/utils/calculate-minimum-wage-count.test.js index 6eaf3105..150d9b2e 100644 --- a/utils/calculate-minimum-wage-count.test.js +++ b/__test__/utils/calculate-minimum-wage-count.test.js @@ -1,7 +1,5 @@ -import { - calculateMinimumWageDayCount, - calculateMinimumWageMonthCount -} from "@/utils/calculate-minimum-wage-count.js"; +import { describe, expect, it } from "vitest"; +import { calculateMinimumWageDayCount, calculateMinimumWageMonthCount } from "@/utils/calculate-minimum-wage-count.js"; describe("utils/calculate-minimum-wage-count", () => { const minimumWage = 5_000; diff --git a/utils/calculate-tax.test.js b/__test__/utils/calculate-tax.test.js similarity index 95% rename from utils/calculate-tax.test.js rename to __test__/utils/calculate-tax.test.js index c1000df6..fb42d967 100644 --- a/utils/calculate-tax.test.js +++ b/__test__/utils/calculate-tax.test.js @@ -1,3 +1,4 @@ +import { describe, expect, it } from "vitest"; import { calculateTaxFromTaxAddedPrice, calculateTaxFromTaxFreePrice, diff --git a/utils/create-share-url-of-calculator.test.js b/__test__/utils/create-share-url-of-calculator.test.js similarity index 88% rename from utils/create-share-url-of-calculator.test.js rename to __test__/utils/create-share-url-of-calculator.test.js index 1a177e46..4eacbd24 100644 --- a/utils/create-share-url-of-calculator.test.js +++ b/__test__/utils/create-share-url-of-calculator.test.js @@ -1,11 +1,8 @@ +import { describe, expect, it, vi } from "vitest"; import { createShareUrlOfCalculator } from "@/utils/create-share-url-of-calculator.js"; describe("utils/create-share-url-of-calculator", () => { - global.process = { - env: { - APP_URL: "https://vergihesaplayici.com" - } - }; + vi.stubEnv("APP_URL", "https://vergihesaplayici.com"); const calculatorPath = "/calculator"; const params = { diff --git a/utils/create-social-media-share-url.test.js b/__test__/utils/create-social-media-share-url.test.js similarity index 88% rename from utils/create-social-media-share-url.test.js rename to __test__/utils/create-social-media-share-url.test.js index cbb28ac6..69930de4 100644 --- a/utils/create-social-media-share-url.test.js +++ b/__test__/utils/create-social-media-share-url.test.js @@ -1,9 +1,10 @@ +import { describe, expect, it } from "vitest"; import { createFacebookShareUrl, createRedditShareUrl, createTelegramShareUrl, - createXShareUrl, - createWhatsAppShareUrl + createWhatsAppShareUrl, + createXShareUrl } from "@/utils/create-social-media-share-url.js"; describe("utils/create-social-media-share-url", () => { @@ -12,7 +13,7 @@ describe("utils/create-social-media-share-url", () => { describe("createFacebookShareUrl", () => { it("should return a valid Facebook share URL", () => { - const result = createFacebookShareUrl(url, title); + const result = createFacebookShareUrl(url); expect(result).toBe(`https://www.facebook.com/sharer/sharer.php?u=${url}`); }); }); @@ -26,7 +27,7 @@ describe("utils/create-social-media-share-url", () => { describe("createWhatsAppShareUrl", () => { it("should return a valid WhatsApp share URL", () => { - const result = createWhatsAppShareUrl(url, title); + const result = createWhatsAppShareUrl(url); expect(result).toBe(`https://wa.me/?text=${url}`); }); }); diff --git a/utils/custom-icon.test.js b/__test__/utils/custom-icon.test.js similarity index 90% rename from utils/custom-icon.test.js rename to __test__/utils/custom-icon.test.js index 243227cc..96f6224f 100644 --- a/utils/custom-icon.test.js +++ b/__test__/utils/custom-icon.test.js @@ -1,3 +1,4 @@ +import { describe, expect, it } from "vitest"; import { isCustomIcon } from "@/utils/custom-icon.js"; describe("utils/custom-icon", () => { diff --git a/utils/fetch-exchange-rate.test.js b/__test__/utils/fetch-exchange-rate.test.js similarity index 85% rename from utils/fetch-exchange-rate.test.js rename to __test__/utils/fetch-exchange-rate.test.js index 2d4154dd..37bac04a 100644 --- a/utils/fetch-exchange-rate.test.js +++ b/__test__/utils/fetch-exchange-rate.test.js @@ -1,8 +1,9 @@ +import { beforeEach, describe, expect, it, vi } from "vitest"; import { fetchExchangeRate } from "@/utils/fetch-exchange-rate.js"; describe("utils/load-exchange-rate", () => { beforeEach(() => { - global.fetch = jest.fn(() => + global.fetch = vi.fn(() => Promise.resolve({ json: () => Promise.resolve({ rates: { diff --git a/utils/find-calculator-preset-by-slug.test.js b/__test__/utils/find-calculator-preset-by-slug.test.js similarity index 93% rename from utils/find-calculator-preset-by-slug.test.js rename to __test__/utils/find-calculator-preset-by-slug.test.js index 95394b74..1e82818e 100644 --- a/utils/find-calculator-preset-by-slug.test.js +++ b/__test__/utils/find-calculator-preset-by-slug.test.js @@ -1,3 +1,4 @@ +import { describe, expect, it } from "vitest"; import { findCalculatorPresetBySlug } from "@/utils/find-calculator-preset-by-slug.js"; describe("utils/find-calculator-preset-by-slug", () => { diff --git a/utils/formatter.test.js b/__test__/utils/formatter.test.js similarity index 93% rename from utils/formatter.test.js rename to __test__/utils/formatter.test.js index af230786..d4825183 100644 --- a/utils/formatter.test.js +++ b/__test__/utils/formatter.test.js @@ -1,4 +1,5 @@ -import { dateFormat, moneyFormat, normalizePrice, numberFormat } from "@/utils/formatter.js"; +import { describe, expect, it } from "vitest"; +import { moneyFormat, normalizePrice, numberFormat } from "@/utils/formatter.js"; describe("utils/formatter", () => { describe("normalizePrice", () => { diff --git a/utils/get-domain-from-url.test.js b/__test__/utils/get-domain-from-url.test.js similarity index 90% rename from utils/get-domain-from-url.test.js rename to __test__/utils/get-domain-from-url.test.js index 9c384cbd..1a25bf9b 100644 --- a/utils/get-domain-from-url.test.js +++ b/__test__/utils/get-domain-from-url.test.js @@ -1,3 +1,4 @@ +import { describe, expect, it } from "vitest"; import { getDomainFromUrl } from "@/utils/get-domain-from-url.js"; describe("utils/get-domain-from-url", () => { diff --git a/utils/get-full-url.test.js b/__test__/utils/get-full-url.test.js similarity index 72% rename from utils/get-full-url.test.js rename to __test__/utils/get-full-url.test.js index c6a33e9a..1f9f4d4a 100644 --- a/utils/get-full-url.test.js +++ b/__test__/utils/get-full-url.test.js @@ -1,11 +1,8 @@ +import { describe, expect, it, vi } from "vitest"; import { getFullUrl } from "@/utils/get-full-url.js"; describe("utils/get-full-url", () => { - global.process = { - env: { - APP_URL: "https://vergihesaplayici.com" - } - }; + vi.stubEnv("APP_URL", "https://vergihesaplayici.com"); it("should return the full URL", () => { const path = "/calculator"; diff --git a/utils/is-currency-available.test.js b/__test__/utils/is-currency-available.test.js similarity index 91% rename from utils/is-currency-available.test.js rename to __test__/utils/is-currency-available.test.js index 56e88907..719d35f7 100644 --- a/utils/is-currency-available.test.js +++ b/__test__/utils/is-currency-available.test.js @@ -1,3 +1,4 @@ +import { describe, expect, it } from "vitest"; import { isCurrencyAvailable } from "@/utils/is-currency-available.js"; describe("utils/is-currency-available", () => { diff --git a/utils/normalize-calculator-results.test.js b/__test__/utils/normalize-calculator-results.test.js similarity index 96% rename from utils/normalize-calculator-results.test.js rename to __test__/utils/normalize-calculator-results.test.js index 437b3037..5aa1c8ed 100644 --- a/utils/normalize-calculator-results.test.js +++ b/__test__/utils/normalize-calculator-results.test.js @@ -1,3 +1,4 @@ +import { describe, expect, it } from "vitest"; import { normalizeCalculatorResults } from "@/utils/normalize-calculator-results.js"; describe("utils/normalize-calculator-results", () => { diff --git a/utils/object-to-query-string.test.js b/__test__/utils/object-to-query-string.test.js similarity index 93% rename from utils/object-to-query-string.test.js rename to __test__/utils/object-to-query-string.test.js index 8859bbe9..a9f082d7 100644 --- a/utils/object-to-query-string.test.js +++ b/__test__/utils/object-to-query-string.test.js @@ -1,3 +1,4 @@ +import { describe, expect, it } from "vitest"; import { objectToQueryString } from "@/utils/object-to-query-string.js"; describe("utils/object-to-query-string", () => { diff --git a/babel.config.js b/babel.config.js deleted file mode 100644 index 96abce23..00000000 --- a/babel.config.js +++ /dev/null @@ -1,16 +0,0 @@ -module.exports = { - env: { - test: { - presets: [ - [ - "@babel/preset-env", - { - targets: { - node: "current" - } - } - ] - ] - } - } -}; diff --git a/calculators/konsol-vergisi-hesaplayici/utils.js b/calculators/konsol-vergisi-hesaplayici/utils.js deleted file mode 100644 index 9fe2e8e8..00000000 --- a/calculators/konsol-vergisi-hesaplayici/utils.js +++ /dev/null @@ -1,32 +0,0 @@ -import brands from "@/calculators/konsol-vergisi-hesaplayici/data/brands.js"; -import presets from "@/calculators/konsol-vergisi-hesaplayici/data/presets.js"; -import presetOptions from "@/calculators/konsol-vergisi-hesaplayici/data/preset-options.js"; - -const findBrandById = brandId => { - return brands.find(brand => brand.id === brandId); -}; - -const findPresetsByBrandId = brandId => { - return presets.filter(preset => preset.brandId === brandId); -}; - -const findPresetOptionsByPresetId = presetId => { - return presetOptions.filter(presetOption => presetOption.presetId === presetId); -}; - -const buildCalculations = () => { - return brands.map(brand => ({ - brand, - presets: findPresetsByBrandId(brand.id).map(preset => ({ - ...preset, - options: findPresetOptionsByPresetId(preset.id) - })) - })); -}; - -export { - findBrandById, - findPresetsByBrandId, - findPresetOptionsByPresetId, - buildCalculations -}; diff --git a/calculators/telefon-vergisi-hesaplayici/utils.js b/calculators/telefon-vergisi-hesaplayici/utils.js deleted file mode 100644 index d508c200..00000000 --- a/calculators/telefon-vergisi-hesaplayici/utils.js +++ /dev/null @@ -1,32 +0,0 @@ -import brands from "@/calculators/telefon-vergisi-hesaplayici/data/brands.js"; -import presets from "@/calculators/telefon-vergisi-hesaplayici/data/presets.js"; -import presetOptions from "@/calculators/telefon-vergisi-hesaplayici/data/preset-options.js"; - -const findBrandById = brandId => { - return brands.find(brand => brand.id === brandId); -}; - -const findPresetsByBrandId = brandId => { - return presets.filter(preset => preset.brandId === brandId); -}; - -const findPresetOptionsByPresetId = presetId => { - return presetOptions.filter(presetOption => presetOption.presetId === presetId); -}; - -const buildCalculations = () => { - return brands.map(brand => ({ - brand, - presets: findPresetsByBrandId(brand.id).map(preset => ({ - ...preset, - options: findPresetOptionsByPresetId(preset.id) - })) - })); -}; - -export { - findBrandById, - findPresetsByBrandId, - findPresetOptionsByPresetId, - buildCalculations -}; diff --git a/components/App/AppBreadcrumbs.vue b/components/App/AppBreadcrumbs.vue index 9dac8978..867e94df 100644 --- a/components/App/AppBreadcrumbs.vue +++ b/components/App/AppBreadcrumbs.vue @@ -95,10 +95,10 @@ export default { $vh-breadcrumbs-item-padding-y: .5rem; $vh-breadcrumbs-item-padding-x: .375rem; -// "AppBreadcrumbs" will always be in "MainContainer" and "MainContainer" has different padding-x for different resolutions. +// "AppBreadcrumbs" will always be in "main-container" and "main-container" has different padding-x for different resolutions. // I want "AppBreadcrumbs" to be full width, and I do this using negative margin-x. -// I update the negative margin-x to be the same as the padding-x of the "MainContainer". -// And I also include the padding-x of ".v-breadcrumbs__item" in this calculation as I want the content of "AppBreadcrumbs" to align with "MainContainer". +// I update the negative margin-x to be the same as the padding-x of the "main-container". +// And I also include the padding-x of ".v-breadcrumbs__item" in this calculation as I want the content of "AppBreadcrumbs" to align with "main-container". .vh-breadcrumbs { --vh-breadcrumbs-negative-margin-y: 0px; // Removing "px" causes "calc(0 * -1)" calculation error --vh-breadcrumbs-negative-margin-x: #{$spacer * 5}; diff --git a/components/App/AppDrawer.vue b/components/App/AppDrawer.vue index 31c7bf9e..868ceca4 100644 --- a/components/App/AppDrawer.vue +++ b/components/App/AppDrawer.vue @@ -8,7 +8,7 @@ - + - + diff --git a/components/App/AppLogo.vue b/components/App/AppLogo.vue index 2a1ce6fe..21d62c59 100644 --- a/components/App/AppLogo.vue +++ b/components/App/AppLogo.vue @@ -4,13 +4,15 @@ v-ripple="" class="vh-app-logo d-flex align-center justify-center px-4 rounded-pill" aria-label="Ana sayfaya git" - :to="AnaSayfa.url" + :to="anaSayfaPage.url" v-html="logo" /> diff --git a/components/ArticleCardItem.vue b/components/ArticleCardItem.vue deleted file mode 100644 index 563ddd1c..00000000 --- a/components/ArticleCardItem.vue +++ /dev/null @@ -1,41 +0,0 @@ - - - - - diff --git a/components/Calculation/CalculationPresetCardItem.vue b/components/Calculation/CalculationPresetCardItem.vue index 52b2909a..8f1cea30 100644 --- a/components/Calculation/CalculationPresetCardItem.vue +++ b/components/Calculation/CalculationPresetCardItem.vue @@ -1,6 +1,6 @@ - + diff --git a/components/article-card-item.vue b/components/article-card-item.vue new file mode 100644 index 00000000..f8d700d5 --- /dev/null +++ b/components/article-card-item.vue @@ -0,0 +1,33 @@ + + + + + diff --git a/components/ArticleDisclaimerAlert.vue b/components/article-disclaimer-alert.vue similarity index 100% rename from components/ArticleDisclaimerAlert.vue rename to components/article-disclaimer-alert.vue diff --git a/components/ArticleGrid.vue b/components/article-grid.vue similarity index 87% rename from components/ArticleGrid.vue rename to components/article-grid.vue index aa0270e5..9d908bc6 100644 --- a/components/ArticleGrid.vue +++ b/components/article-grid.vue @@ -6,7 +6,7 @@ cols="12" sm="6" md="4"> - + diff --git a/components/CalculatorCardItem.vue b/components/calculator-card-item.vue similarity index 100% rename from components/CalculatorCardItem.vue rename to components/calculator-card-item.vue diff --git a/components/CalculatorGrid.vue b/components/calculator-grid.vue similarity index 70% rename from components/CalculatorGrid.vue rename to components/calculator-grid.vue index f5d9a6a8..3f58452b 100644 --- a/components/CalculatorGrid.vue +++ b/components/calculator-grid.vue @@ -5,14 +5,14 @@ :key="_calculator.title" cols="12" sm="6"> - + diff --git a/pages/index.vue b/pages/index.vue index 5bae5552..00c56a30 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -1,10 +1,10 @@