Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.
TypeScript analyticsanalytics-dashboardclickhouseelixirgoogle-analyticsmarketingopen-source-analyticsphoenixplausible-analyticspostgresqlprivacyprivacy-friendlyself-hostedsimple-analyticsstatisticstailwindcssweb-analyticswebsite-analyticswebsite-statswebsite-tracking
Typos (#6724)
Adamd99cb012ab44
diff --git a/.codespellignore b/.codespellignoredeleted file mode 100644index 3a9f207dc1..0000000000--- a/.codespellignore+++ /dev/null@@ -1,10 +0,0 @@-caf-Linz-linz-Taht-taht-referer-referers-statics-firs-ISTdiff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.ymldeleted file mode 100644index 4529001f26..0000000000--- a/.github/workflows/codespell.yml+++ /dev/null@@ -1,18 +0,0 @@-name: Check spelling--on:- pull_request:- push:- branches: [ master ]- merge_group:--jobs:- codespell:- runs-on: ubuntu-latest- steps:- - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1- - uses: codespell-project/actions-codespell@8f01853be192eb0f849a5c7d721450e7a467c579 # v2.2- with:- check_filenames: true- ignore_words_file: .codespellignore- path: lib test extradiff --git a/.github/workflows/tracker-script-npm-release.yml b/.github/workflows/tracker-script-npm-release.ymlindex 82d089bee4..915c47b507 100644--- a/.github/workflows/tracker-script-npm-release.yml+++ b/.github/workflows/tracker-script-npm-release.yml@@ -7,7 +7,7 @@ on:jobs:tracker-release-npm:- # needs to be Github hosted runner, see+ # needs to be GitHub hosted runner, see# https://docs.npmjs.com/trusted-publishers#limitations-and-future-improvementsruns-on: ubuntu-latestpermissions:diff --git a/.github/workflows/typos.yml b/.github/workflows/typos.ymlnew file mode 100644index 0000000000..0f412829ae--- /dev/null+++ b/.github/workflows/typos.yml@@ -0,0 +1,14 @@+name: Check spelling++on:+ pull_request:+ push:+ branches: [ master ]+ merge_group:++jobs:+ typos:+ runs-on: ubuntu-latest+ steps:+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1+ - uses: crate-ci/typos@7f9d0819ca1c008ade73f4b41fa9d258d48f605b # v1.51.1diff --git a/.typos.toml b/.typos.tomlnew file mode 100644index 0000000000..09cfa691a6--- /dev/null+++ b/.typos.toml@@ -0,0 +1,45 @@+[files]+extend-exclude = [+ ".git/",+ "**/*.json",+ "**/*.yml",+ "**/*.csv",+ "**/*.xml",+ "**/*.html",+ "tracker/eslint.config.mjs",+ # Already-shipped migrations+ "priv/repo/migrations/20200227092821_add_fingerprint_sesssions.exs",+ "priv/repo/migrations/20231219083050_track_accept_traffic_until_notifcations.exs",+ "priv/repo/migrations/20250429093725_backfill_enterise_plans_feautres_sites_api.exs",+ # Refers to the migration above by name+ "test/plausible/release_test.exs"+]+ignore-hidden = false++[default]+extend-ignore-re = [+ "\\bUku Taht\\b",+ "Urfahr -> Linz",+ "GOOGLE_CLIENT_SECRET=.+",+ "\\bfo\\.wikipedia\\.org\\b",+ 'RecoveryCode.disambiguate\(".+"\) == ".+"',+ "ot-",+ ".+UE.*",+ "IST",+ "nd",+ "abck",+ "OT",+ "Pn",+ "ot",+ "taht",+ "Taht",+ "linz",+ "Linz"+]++[default.extend-words]+"referers" = "referers"++[default.extend-identifiers]+# Typos+"GitHub" = "GitHub"diff --git a/assets/css/flatpickr-colors.css b/assets/css/flatpickr-colors.cssindex 6083d90e60..be6cfc0652 100644--- a/assets/css/flatpickr-colors.css+++ b/assets/css/flatpickr-colors.css@@ -18,7 +18,7 @@@apply w-full min-w-0 max-w-none;}-/* Hader */+/* Header */.flatpickr-months {@apply relative items-center py-1;}diff --git a/assets/js/dashboard/components/table-legacy.tsx b/assets/js/dashboard/components/table-legacy.tsxindex c4c2712ea9..4cb7794716 100644--- a/assets/js/dashboard/components/table-legacy.tsx+++ b/assets/js/dashboard/components/table-legacy.tsx@@ -4,7 +4,7 @@ import { SortDirection } from '../../types/query-api'import { SortButton } from './sort-button'import { Tooltip } from '../util/tooltip'-export type ColumnConfiguraton<T extends Record<string, unknown>> = {+export type ColumnConfiguration<T extends Record<string, unknown>> = {/** Unique column ID, used for sorting purposes and to get the value of the cell using rowItem[key] */key: keyof T/** Column title */@@ -82,7 +82,7 @@ export const ItemRow = <T extends Record<string, string | number | ReactNode>>({rowIndex: numberpageIndex?: numberitem: T- columns: ColumnConfiguraton<T>[]+ columns: ColumnConfiguration<T>[]tappedRowName?: string | nullonRowTap?: (rowName: string | null) => void}) => {@@ -133,12 +133,12 @@ export const Table = <T extends Record<string, string | number | ReactNode>>({data,columns}: {- columns: ColumnConfiguraton<T>[]+ columns: ColumnConfiguration<T>[]data: T[] | { pages: T[][] }}) => {const [tappedRowName, setTappedRowName] = React.useState<string | null>(null)- const renderColumnLabel = (column: ColumnConfiguraton<T>) => {+ const renderColumnLabel = (column: ColumnConfiguration<T>) => {if (column.metricWarning) {return (<Tooltipdiff --git a/assets/js/dashboard/stats/locations/countries.ts b/assets/js/dashboard/stats/locations/countries.tsindex 37757b8ca3..130663c3d6 100644--- a/assets/js/dashboard/stats/locations/countries.ts+++ b/assets/js/dashboard/stats/locations/countries.ts@@ -7,7 +7,7 @@ export type WorldJsonCountryData = { properties: { a3: string } }export function parseWorldTopoJsonToGeoJsonFeatures(): Array<WorldJsonCountryData> {const collection = topojson.feature(- // @ts-expect-error strings in worldJson not recongizable as the enum values declared in library+ // @ts-expect-error strings in worldJson not recognizable as the enum values declared in libraryworldJson,worldJson.objects.countries)diff --git a/assets/js/dashboard/util/url-search-params-v2.ts b/assets/js/dashboard/util/url-search-params-v2.tsindex 3c8e03aae7..b290bf8aab 100644--- a/assets/js/dashboard/util/url-search-params-v2.ts+++ b/assets/js/dashboard/util/url-search-params-v2.ts@@ -48,7 +48,7 @@ function parseSearchFragment(searchStringFragment: string): null | unknown {return null}// tricky: the search string fragment is already decoded due to URLSearchParams intermediate (see tests),- // and these symbols are unparseable+ // and these symbols are unparsableconst fragmentWithReEncodedSymbols = searchStringFragment/* @ts-expect-error API supposedly not present in compilation target */.replaceAll('=', encodeURIComponent('='))diff --git a/assets/js/liveview/live_socket.js b/assets/js/liveview/live_socket.jsindex ba097a872c..2b9a393da7 100644--- a/assets/js/liveview/live_socket.js+++ b/assets/js/liveview/live_socket.js@@ -1,6 +1,6 @@/**The modules below this comment block are resolved from '../deps' folder,- which does not exist when running the lint command in Github CI+ which does not exist when running the lint command in GitHub CI*//* eslint-disable import/no-unresolved */diff --git a/config/config.exs b/config/config.exsindex 00ede68296..6a049100b1 100644--- a/config/config.exs+++ b/config/config.exs@@ -71,7 +71,7 @@ config :plausible, Plausible.Repo,connect_timeout: 300_000,handshake_timeout: 300_000,queue_target: 500,- queue_inerval: 1100+ queue_interval: 1100config :plausible, Plausible.Cache, enabled: truediff --git a/extra/lib/plausible/stats/exploration.ex b/extra/lib/plausible/stats/exploration.exindex 8b9d6be511..0c20aa968c 100644--- a/extra/lib/plausible/stats/exploration.ex+++ b/extra/lib/plausible/stats/exploration.ex@@ -58,7 +58,7 @@ defmodule Plausible.Stats.Exploration dodirection = Keyword.fetch!(opts, :direction)search_term = Keyword.fetch!(opts, :search_term)max_candidates = min(Keyword.fetch!(opts, :max_candidates), @max_candidates)- include_wilcard? = Keyword.fetch!(opts, :include_wildcard?)+ include_wildcard? = Keyword.fetch!(opts, :include_wildcard?)goals =site@@ -67,7 +67,7 @@ defmodule Plausible.Stats.Exploration doquery|> Base.base_event_query()- |> next_steps_query(journey, search_term, direction, max_candidates, include_wilcard?, goals)+ |> next_steps_query(journey, search_term, direction, max_candidates, include_wildcard?, goals)# We pass the query struct to record query metadata for# the CH debug console.|> ClickhouseRepo.all(query: query)diff --git a/lib/plausible/ingestion/persistor/remote.ex b/lib/plausible/ingestion/persistor/remote.exindex 7f83a71f73..1993f4a9dd 100644--- a/lib/plausible/ingestion/persistor/remote.ex+++ b/lib/plausible/ingestion/persistor/remote.ex@@ -92,7 +92,7 @@ defmodule Plausible.Ingestion.Persistor.Remote dotrueend- defp handle_transient_error(_reqeust, _response), do: false+ defp handle_transient_error(_request, _response), do: falsedefp persistor_span_attributes(headers) dosite_id = find_header(headers, "x-site-id")diff --git a/lib/plausible/purge.ex b/lib/plausible/purge.exindex 4d80235547..1c5f14d4ae 100644--- a/lib/plausible/purge.ex+++ b/lib/plausible/purge.ex@@ -8,7 +8,7 @@ defmodule Plausible.Purge doAll import tables have MergeTree's deduplication mechanism _disabled_ by setting`replicated_deduplication_window` from default 100 to 0. When enabled, every insertinto a given table is compared against hashes of 100 previous inserts (as complete- parts, not concrete rows) and ignored when match is found. The prupose of that+ parts, not concrete rows) and ignored when match is found. The purpose of thatmechanism is making inserts of exact same batches idempotent when retrying themshortly after - for instance due to timeout, when the client can't easily tell ifprevious insert succeeded or not. Deduplication, however, only considers inserts,diff --git a/lib/plausible/stats/imported/base.ex b/lib/plausible/stats/imported/base.exindex ec0eda67a6..c7091ce154 100644--- a/lib/plausible/stats/imported/base.ex+++ b/lib/plausible/stats/imported/base.ex@@ -47,7 +47,7 @@ defmodule Plausible.Stats.Imported.Base do"time:hour" => "imported_visitors"}- @queriable_time_dimensions ["time:month", "time:week", "time:day", "time:hour"]+ @queryable_time_dimensions ["time:month", "time:week", "time:day", "time:hour"]@imported_custom_props Imported.imported_custom_props()@@ -101,10 +101,10 @@ defmodule Plausible.Stats.Imported.Base dodo_decide_custom_prop_table(query, dimension)end- @queriable_custom_prop_dimensions ["event:goal", "event:name"] ++ @queriable_time_dimensions+ @queryable_custom_prop_dimensions ["event:goal", "event:name"] ++ @queryable_time_dimensionsdefp do_decide_custom_prop_table(%{dimensions: dimensions} = query) doif dimensions == [] or- (length(dimensions) == 1 and hd(dimensions) in @queriable_custom_prop_dimensions) do+ (length(dimensions) == 1 and hd(dimensions) in @queryable_custom_prop_dimensions) docustom_prop_filters =dimensions_used_in_filters(query.filters)|> Enum.filter(&(&1 in @imported_custom_props))@@ -192,7 +192,7 @@ defmodule Plausible.Stats.Imported.Base dotable_candidates =dimensions_used_in_filters(query.filters)|> Enum.concat(query.dimensions)- |> Enum.reject(&(&1 in @queriable_time_dimensions or &1 == "event:goal"))+ |> Enum.reject(&(&1 in @queryable_time_dimensions or &1 == "event:goal"))|> Enum.flat_map(fn"visit:screen" -> ["visit:device"]dimension -> [dimension]diff --git a/lib/plausible_web/controllers/auth_controller.ex b/lib/plausible_web/controllers/auth_controller.exindex 71c3b088bf..6e613c7f57 100644--- a/lib/plausible_web/controllers/auth_controller.ex+++ b/lib/plausible_web/controllers/auth_controller.ex@@ -55,7 +55,7 @@ defmodule PlausibleWeb.AuthController do])- # Plug purging 2FA user session cookie outsite 2FA flow+ # Plug purging 2FA user session cookie outside 2FA flowdefp clear_2fa_user(conn, _opts) doTwoFactor.Session.clear_2fa_user(conn)enddiff --git a/lib/plausible_web/controllers/site_controller.ex b/lib/plausible_web/controllers/site_controller.exindex 97d3586285..8c1e6bf365 100644--- a/lib/plausible_web/controllers/site_controller.ex+++ b/lib/plausible_web/controllers/site_controller.ex@@ -347,7 +347,7 @@ defmodule PlausibleWeb.SiteController do})|> Repo.insert()- :ok = tolerate_unique_contraint_violation(result, "weekly_reports_site_id_index")+ :ok = tolerate_unique_constraint_violation(result, "weekly_reports_site_id_index")conn|> put_flash(:success, "You will receive an email report every Monday going forward")@@ -401,7 +401,7 @@ defmodule PlausibleWeb.SiteController do})|> Repo.insert()- :ok = tolerate_unique_contraint_violation(result, "monthly_reports_site_id_index")+ :ok = tolerate_unique_constraint_violation(result, "monthly_reports_site_id_index")conn|> put_flash(:success, "You will receive an email report every month going forward")@@ -623,7 +623,7 @@ defmodule PlausibleWeb.SiteController do)end- defp tolerate_unique_contraint_violation(result, name) do+ defp tolerate_unique_constraint_violation(result, name) docase result do{:ok, _} ->:okdiff --git a/lib/plausible_web/live/sites.ex b/lib/plausible_web/live/sites.exindex 233b41d110..f8a0e97af3 100644--- a/lib/plausible_web/live/sites.ex+++ b/lib/plausible_web/live/sites.ex@@ -493,7 +493,7 @@ defmodule PlausibleWeb.Live.Sites do<div:if={@consolidated_sparkline == :loading}class="flex flex-col gap-y-2 h-[290px] sm:h-[236px] text-center animate-pulse"- data-test-id="consolidated-viw-stats-loading"+ data-test-id="consolidated-view-stats-loading"><div class="flex-2 dark:bg-gray-750 bg-gray-100 rounded-md"></div><div class="flex-1 flex flex-col gap-y-2">diff --git a/lib/plausible_web/templates/billing/change_plan_preview.html.heex b/lib/plausible_web/templates/billing/change_plan_preview.html.heexindex 6fd3bba2d0..09e5abe946 100644--- a/lib/plausible_web/templates/billing/change_plan_preview.html.heex+++ b/lib/plausible_web/templates/billing/change_plan_preview.html.heex@@ -84,7 +84,7 @@Back</a></span>- <span class="flex space-betwee rounded-md shadow-xs">+ <span class="flex space-between rounded-md shadow-xs"><.button_linkhref={~p"/billing/change-plan/#{@preview_info["plan_id"]}"}method="post"diff --git a/test/plausible/ingestion/event_test.exs b/test/plausible/ingestion/event_test.exsindex 93a70d8fc4..228eadcb62 100644--- a/test/plausible/ingestion/event_test.exs+++ b/test/plausible/ingestion/event_test.exs@@ -349,7 +349,7 @@ defmodule Plausible.Ingestion.EventTest doassert {:ok, %{buffered: [_], dropped: []}} = Event.build_and_buffer(request)end- test "drops events for site with accept_trafic_until in the past" do+ test "drops events for site with accept_traffic_until in the past" doyesterday = Date.add(Date.utc_today(), -1)owner = new_user(team: [accept_traffic_until: yesterday])diff --git a/test/plausible/shields/country_test.exs b/test/plausible/shields/country_test.exsindex 406341799d..a397dc610f 100644--- a/test/plausible/shields/country_test.exs+++ b/test/plausible/shields/country_test.exs@@ -95,7 +95,7 @@ defmodule Plausible.Shields.CountryTest doenddescribe "remove_country_rule/2" do- test "is idempontent", %{site: site} do+ test "is idempotent", %{site: site} do{:ok, rule} = add_country_rule(site, %{"country_code" => "EE"})assert remove_country_rule(site, rule.id) == :okrefute Repo.get(Plausible.Shield.CountryRule, rule.id)diff --git a/test/plausible/shields/hostname_test.exs b/test/plausible/shields/hostname_test.exsindex bbcc0c9137..33b9550355 100644--- a/test/plausible/shields/hostname_test.exs+++ b/test/plausible/shields/hostname_test.exs@@ -124,7 +124,7 @@ defmodule Plausible.Shields.HostnameTest doenddescribe "remove_hostname_rule/2" do- test "is idempontent", %{site: site} do+ test "is idempotent", %{site: site} do{:ok, rule} = add_hostname_rule(site, %{"hostname" => "test"})assert remove_hostname_rule(site, rule.id) == :okrefute Repo.get(Plausible.Shield.HostnameRule, rule.id)diff --git a/test/plausible/shields/ip_test.exs b/test/plausible/shields/ip_test.exsindex af27a14133..ebb79a981c 100644--- a/test/plausible/shields/ip_test.exs+++ b/test/plausible/shields/ip_test.exs@@ -97,7 +97,7 @@ defmodule Plausible.Shields.IPTest doenddescribe "remove_ip_rule/2" do- test "is idempontent", %{site: site} do+ test "is idempotent", %{site: site} do{:ok, rule} = add_ip_rule(site, %{"inet" => "127.0.0.1"})assert remove_ip_rule(site, rule.id) == :okrefute Repo.get(Plausible.Shield.IPRule, rule.id)diff --git a/test/plausible/shields/page_test.exs b/test/plausible/shields/page_test.exsindex 4c4ef6abfa..e35667faa8 100644--- a/test/plausible/shields/page_test.exs+++ b/test/plausible/shields/page_test.exs@@ -122,7 +122,7 @@ defmodule Plausible.Shields.PageTest doenddescribe "remove_page_rule/2" do- test "is idempontent", %{site: site} do+ test "is idempotent", %{site: site} do{:ok, rule} = add_page_rule(site, %{"page_path" => "/test"})assert remove_page_rule(site, rule.id) == :okrefute Repo.get(Plausible.Shield.PageRule, rule.id)diff --git a/test/plausible/stats/sampling_cache_test.exs b/test/plausible/stats/sampling_cache_test.exsindex d02b473441..a661810f83 100644--- a/test/plausible/stats/sampling_cache_test.exs+++ b/test/plausible/stats/sampling_cache_test.exs@@ -191,7 +191,7 @@ defmodule Plausible.Stats.SamplingCacheTest do) == div(@threshold, 2)end- test "conslidated_get returns nil", %{test: test} do+ test "consolidated_get returns nil", %{test: test} dostart_test_cache(test)assert is_nil(diff --git a/test/plausible_web/controllers/api/external_sites_controller_sites_crud_api_test.exs b/test/plausible_web/controllers/api/external_sites_controller_sites_crud_api_test.exsindex c45522c59d..585215754c 100644--- a/test/plausible_web/controllers/api/external_sites_controller_sites_crud_api_test.exs+++ b/test/plausible_web/controllers/api/external_sites_controller_sites_crud_api_test.exs@@ -566,7 +566,7 @@ defmodule PlausibleWeb.Api.ExternalSitesControllerSitesCrudApiTest doother_team_site = new_site()add_member(other_team_site.team, user: user, role: :viewer)- # `team_id` paramaeter is ignored+ # `team_id` parameter is ignoredconn = get(conn, "/api/v1/sites?team_id=" <> other_team_site.team.identifier)assert_matches %{diff --git a/test/plausible_web/live/reset_password_form_test.exs b/test/plausible_web/live/reset_password_form_test.exsindex ab53e92d04..d1300f791b 100644--- a/test/plausible_web/live/reset_password_form_test.exs+++ b/test/plausible_web/live/reset_password_form_test.exs@@ -16,7 +16,7 @@ defmodule PlausibleWeb.Live.ResetPasswordFormTest dolv = get_liveview(conn, "/password/reset?token=#{token}")- type_into_passowrd(lv, "very-secret-and-very-long-123")+ type_into_password(lv, "very-secret-and-very-long-123")html = lv |> element("form") |> render_submit()csrf_input = find(html, ~s|input[name="_csrf_token"]|)@@ -36,7 +36,7 @@ defmodule PlausibleWeb.Live.ResetPasswordFormTest dolv = get_liveview(conn, "/password/reset?token=#{token}")- type_into_passowrd(lv, "very-secret-and-very-long-123")+ type_into_password(lv, "very-secret-and-very-long-123")lv |> element("form") |> render_submit()updated_user = Repo.reload!(user)@@ -51,7 +51,7 @@ defmodule PlausibleWeb.Live.ResetPasswordFormTest dolv = get_liveview(conn, "/password/reset?token=#{token}")- type_into_passowrd(lv, "too-short")+ type_into_password(lv, "too-short")html = lv |> element("form") |> render_submit()assert html =~ "Password is too weak"@@ -78,7 +78,7 @@ defmodule PlausibleWeb.Live.ResetPasswordFormTest dolv = get_liveview(conn, "/password/reset?token=#{token}")- type_into_passowrd(lv, "very-secret-and-very-long-123")+ type_into_password(lv, "very-secret-and-very-long-123")lv |> element("form") |> render_submit()assert [] = Repo.preload(user, :sessions).sessions@@ -94,7 +94,7 @@ defmodule PlausibleWeb.Live.ResetPasswordFormTest dolvend- defp type_into_passowrd(lv, text) do+ defp type_into_password(lv, text) dolv|> element("form")|> render_change(%{"user[password]" => text})diff --git a/test/plausible_web/live/sso_management_test.exs b/test/plausible_web/live/sso_management_test.exsindex e092e67c04..98fed8881d 100644--- a/test/plausible_web/live/sso_management_test.exs+++ b/test/plausible_web/live/sso_management_test.exs@@ -1,4 +1,4 @@-defmodule PlausibleWeb.Live.SSOMangementTest do+defmodule PlausibleWeb.Live.SSOManagementTest douse PlausibleWeb.ConnCase, async: falseuse Oban.Testing, repo: Plausible.Repodiff --git a/test/plausible_web/live/team_management_test.exs b/test/plausible_web/live/team_management_test.exsindex 902c8871f2..d676c41292 100644--- a/test/plausible_web/live/team_management_test.exs+++ b/test/plausible_web/live/team_management_test.exs@@ -1,4 +1,4 @@-defmodule PlausibleWeb.Live.TeamMangementTest do+defmodule PlausibleWeb.Live.TeamManagementTest douse PlausibleWeb.ConnCase, async: falseuse Bamboo.Test, shared: truediff --git a/test/support/assert_matches.ex b/test/support/assert_matches.exindex 5500e95027..5ff88e5560 100644--- a/test/support/assert_matches.ex+++ b/test/support/assert_matches.ex@@ -32,7 +32,7 @@ defmodule Plausible.AssertMatches do* a special case of `any(:string, ~r/regex pattern/)` checking that value isa string and matches a pattern* shorthand version of the above, `~r/regex pattern/`- * any artibrary one argument function returning a boolean, like `&is_float/1`+ * any arbitrary one argument function returning a boolean, like `&is_float/1`or `&(&1 < 40 or &1 > 300)`* exactly(expression) where expression is compared using equality, so that canenforce full equality inside a pattern, like: `exactly(%{foo: 2})` which willdiff --git a/test/workers/lock_sites_test.exs b/test/workers/lock_sites_test.exsindex b2da536b08..f7121c9a32 100644--- a/test/workers/lock_sites_test.exs+++ b/test/workers/lock_sites_test.exs@@ -63,7 +63,7 @@ defmodule Plausible.Workers.LockSitesTest doassert Repo.reload!(site.team).lockedend- test "does not lock active subsriber's sites" do+ test "does not lock active subscriber's sites" douser = new_user() |> subscribe_to_growth_plan(status: Subscription.Status.active())site = new_site(owner: user)