diff --git a/config/config.exs b/config/config.exs index 44cac4fe..82e84184 100644 --- a/config/config.exs +++ b/config/config.exs @@ -158,17 +158,14 @@ config :geolix, } ] -config :auto_linker, - opts: [ - scheme: true, - extra: true, - # TODO: Set to :no_scheme when it works properly - validate_tld: true, - class: false, - strip_prefix: false, - new_window: true, - rel: "noopener noreferrer ugc" - ] +config :mobilizon, Mobilizon.Service.Formatter, + class: false, + rel: "noopener noreferrer ugc", + new_window: true, + truncate: false, + strip_prefix: false, + extra: true, + validate_tld: :no_scheme config :tesla, adapter: Tesla.Adapter.Hackney diff --git a/js/.editorconfig b/js/.editorconfig index c24743d0..446bb3e1 100644 --- a/js/.editorconfig +++ b/js/.editorconfig @@ -4,4 +4,4 @@ indent_size = 2 end_of_line = lf trim_trailing_whitespace = true insert_final_newline = true -max_line_length = 100 +max_line_length = 80 diff --git a/js/.eslintrc.js b/js/.eslintrc.js index ac692e5e..939c4df9 100644 --- a/js/.eslintrc.js +++ b/js/.eslintrc.js @@ -38,8 +38,11 @@ module.exports = { "error", { ignoreStrings: true, + ignoreHTMLTextContents: true, + ignoreTemplateLiterals: true, + ignoreComments: true, template: 170, - code: 100, + code: 80, }, ], "prettier/prettier": "error", @@ -48,13 +51,18 @@ module.exports = { "import/prefer-default-export": "off", "import/extensions": "off", "import/no-unresolved": "off", + "no-shadow": "off", + "@typescript-eslint/no-shadow": ["error"], }, ignorePatterns: ["src/typings/*.d.ts", "vue.config.js"], overrides: [ { - files: ["**/__tests__/*.{j,t}s?(x)", "**/tests/unit/**/*.spec.{j,t}s?(x)"], + files: [ + "**/__tests__/*.{j,t}s?(x)", + "**/tests/unit/**/*.spec.{j,t}s?(x)", + ], env: { mocha: true, }, diff --git a/js/get_union_json.ts b/js/get_union_json.ts index dc3899bb..287cc998 100644 --- a/js/get_union_json.ts +++ b/js/get_union_json.ts @@ -24,7 +24,9 @@ fetch(`http://localhost:4000/api`, { .then((result) => result.json()) .then((result) => { // here we're filtering out any type information unrelated to unions or interfaces - const filteredData = result.data.__schema.types.filter((type) => type.possibleTypes !== null); + const filteredData = result.data.__schema.types.filter( + (type) => type.possibleTypes !== null + ); result.data.__schema.types = filteredData; fs.writeFile("./fragmentTypes.json", JSON.stringify(result.data), (err) => { if (err) { diff --git a/js/package.json b/js/package.json index 3fd83757..4b6af9d4 100644 --- a/js/package.json +++ b/js/package.json @@ -63,13 +63,13 @@ "@types/vuedraggable": "^2.23.0", "@typescript-eslint/eslint-plugin": "^4.0.1", "@typescript-eslint/parser": "^4.0.1", - "@vue/cli-plugin-babel": "~4.5.8", - "@vue/cli-plugin-e2e-cypress": "~4.5.8", - "@vue/cli-plugin-eslint": "~4.5.8", - "@vue/cli-plugin-pwa": "~4.5.8", - "@vue/cli-plugin-router": "~4.5.8", - "@vue/cli-plugin-typescript": "~4.5.8", - "@vue/cli-service": "~4.5.8", + "@vue/cli-plugin-babel": "~4.5.9", + "@vue/cli-plugin-e2e-cypress": "~4.5.9", + "@vue/cli-plugin-eslint": "~4.5.9", + "@vue/cli-plugin-pwa": "~4.5.9", + "@vue/cli-plugin-router": "~4.5.9", + "@vue/cli-plugin-typescript": "~4.5.9", + "@vue/cli-service": "~4.5.9", "@vue/eslint-config-airbnb": "^5.0.2", "@vue/eslint-config-prettier": "^6.0.0", "@vue/eslint-config-typescript": "^7.0.0", @@ -79,11 +79,11 @@ "eslint-plugin-import": "^2.20.2", "eslint-plugin-prettier": "^3.1.3", "eslint-plugin-vue": "^7.0.0", - "prettier": "2.1.2", - "prettier-eslint": "^11.0.0", + "prettier": "2.2.1", + "prettier-eslint": "^12.0.0", "sass": "^1.29.0", "sass-loader": "^10.0.1", - "typescript": "~4.0.2", + "typescript": "~4.1.2", "vue-cli-plugin-svg": "~0.1.3", "vue-i18n-extract": "^1.0.2", "vue-template-compiler": "^2.6.11", diff --git a/js/src/@types/dom.d.ts b/js/src/@types/dom.d.ts new file mode 100644 index 00000000..59a3a078 --- /dev/null +++ b/js/src/@types/dom.d.ts @@ -0,0 +1,18 @@ +declare global { + interface GeolocationCoordinates { + readonly accuracy: number; + readonly altitude: number | null; + readonly altitudeAccuracy: number | null; + readonly heading: number | null; + readonly latitude: number; + readonly longitude: number; + readonly speed: number | null; + } + + interface GeolocationPosition { + readonly coords: GeolocationCoordinates; + readonly timestamp: number; + } +} + +export {}; diff --git a/js/src/App.vue b/js/src/App.vue index 0817426e..a0b85b0f 100644 --- a/js/src/App.vue +++ b/js/src/App.vue @@ -32,8 +32,16 @@ - - diff --git a/js/src/components/Account/PopoverActorCard.vue b/js/src/components/Account/PopoverActorCard.vue index a61d0888..7374376c 100644 --- a/js/src/components/Account/PopoverActorCard.vue +++ b/js/src/components/Account/PopoverActorCard.vue @@ -12,8 +12,9 @@ diff --git a/js/src/components/Footer.vue b/js/src/components/Footer.vue index a8474377..657b4cae 100644 --- a/js/src/components/Footer.vue +++ b/js/src/components/Footer.vue @@ -3,13 +3,20 @@
- {{ `@${group.preferredUsername}@${group.domain}` }} + {{ + `@${group.preferredUsername}@${group.domain}` + }} {{ `@${group.preferredUsername}` }}
diff --git a/js/src/components/Group/GroupMemberCard.vue b/js/src/components/Group/GroupMemberCard.vue index f0068907..eb0bf1b4 100644 --- a/js/src/components/Group/GroupMemberCard.vue +++ b/js/src/components/Group/GroupMemberCard.vue @@ -13,7 +13,9 @@- {{ $t("Your participation still has to be approved by the organisers.") }} +
+ {{ + $t("Your participation still has to be approved by the organisers.") + }}
{{ $t("If you want, you may send a message to the event organizer here.") }}
++ {{ + $t( + "If you want, you may send a message to the event organizer here." + ) + }} +
{{ $t("Check your inbox (and your junk mail folder).") }}
++ {{ $t("Check your inbox (and your junk mail folder).") }} +
{{ $t("You may now close this window.") }}