diff --git a/js/.editorconfig b/js/.editorconfig index c24743d00..446bb3e15 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 d29e98c47..939c4df9d 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", @@ -56,7 +59,10 @@ module.exports = { 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 dc3899bb8..287cc9982 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/src/App.vue b/js/src/App.vue index 0817426e7..a0b85b0f8 100644 --- a/js/src/App.vue +++ b/js/src/App.vue @@ -32,8 +32,16 @@ diff --git a/js/src/components/Map.vue b/js/src/components/Map.vue index 00ebaa3a3..0d52fd943 100644 --- a/js/src/components/Map.vue +++ b/js/src/components/Map.vue @@ -8,7 +8,11 @@ @click="clickMap" @update:zoom="updateZoom" > - + + - {{ line }}
+ {{ line }}
@@ -51,7 +57,10 @@ export default class Map extends Vue { @Prop({ type: String, required: true }) coords!: string; - @Prop({ type: Object, required: false }) marker!: { text: string | string[]; icon: string }; + @Prop({ type: Object, required: false }) marker!: { + text: string | string[]; + icon: string; + }; @Prop({ type: Object, required: false }) options!: Record; @@ -125,7 +134,8 @@ export default class Map extends Vue { get attribution(): string { return ( - this.config.maps.tiles.attribution || (this.$t("© The OpenStreetMap Contributors") as string) + this.config.maps.tiles.attribution || + (this.$t("© The OpenStreetMap Contributors") as string) ); } } diff --git a/js/src/components/Map/Vue2LeafletLocateControl.vue b/js/src/components/Map/Vue2LeafletLocateControl.vue index df2de381e..c7afaad7e 100644 --- a/js/src/components/Map/Vue2LeafletLocateControl.vue +++ b/js/src/components/Map/Vue2LeafletLocateControl.vue @@ -23,7 +23,10 @@ import { Component, Prop, Vue } from "vue-property-decorator"; }, }) export default class Vue2LeafletLocateControl extends Vue { - @Prop({ type: Object, default: () => ({}) }) options!: Record; + @Prop({ type: Object, default: () => ({}) }) options!: Record< + string, + unknown + >; @Prop({ type: Boolean, default: true }) visible = true; diff --git a/js/src/components/NavBar.vue b/js/src/components/NavBar.vue index 6846f78eb..53fdfcfc4 100644 --- a/js/src/components/NavBar.vue +++ b/js/src/components/NavBar.vue @@ -1,7 +1,15 @@ @@ -187,7 +195,9 @@ export default class CreateGroup extends mixins(IdentityEditionMixin) { } private handleError(err: any) { - this.errors.push(...err.graphQLErrors.map(({ message }: { message: string }) => message)); + this.errors.push( + ...err.graphQLErrors.map(({ message }: { message: string }) => message) + ); } } diff --git a/js/src/views/Group/Group.vue b/js/src/views/Group/Group.vue index 858ef5827..616a494dd 100644 --- a/js/src/views/Group/Group.vue +++ b/js/src/views/Group/Group.vue @@ -4,7 +4,9 @@