Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync prettier version with actionsx/prettier, fix formatting and enable quality github action #1021

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
name: Quality

# triggers on
on: [workflow_dispatch] # Disable workflow for now (manual trigger)
# on: [push, pull_request]
on: [push, pull_request]

jobs:
quality:
Expand Down
3 changes: 1 addition & 2 deletions app/controllers/partners/vaccination_centers_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ def create
@same_existing_vaccination_centers = check_if_already_exists(@vaccination_center, :address, :phone_number, :finess)
unless @same_existing_vaccination_centers && @vaccination_center.confirmation_creation.to_i.zero?
@vaccination_center.save
@partner_vaccination_center = PartnerVaccinationCenter.new(partner: current_partner,
vaccination_center: @vaccination_center)
@partner_vaccination_center = PartnerVaccinationCenter.new(partner: current_partner, vaccination_center: @vaccination_center)
@partner_vaccination_center.save
prepare_phone_number
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ export const CampaignCreatorExtraInfo = () => {
};

const dateInExtraInfoWarning = (info) => {
const dateRegex = /(lundi|mardi|mercredi|jeudi|vendredi|janvier|f[eé]vrier|mars|avril|mai|juin|juillet|ao[uû]t|septembre|octobre|novembre|d[eé]cembre|demain)/i;
const dateRegex =
/(lundi|mardi|mercredi|jeudi|vendredi|janvier|f[eé]vrier|mars|avril|mai|juin|juillet|ao[uû]t|septembre|octobre|novembre|d[eé]cembre|demain)/i;
if (info.match(dateRegex)) {
return (
<>
Expand Down
11 changes: 6 additions & 5 deletions app/javascript/components/shared/RootWrapper.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import { camelCaseDeep } from "components/shared/casing";

const queryClient = new QueryClient();

export const RootWrapper = (RootComponent) => (propsFromRails) => (
<QueryClientProvider client={queryClient}>
<RootComponent {...camelCaseDeep(propsFromRails)} />
</QueryClientProvider>
);
export const RootWrapper = (RootComponent) => (propsFromRails) =>
(
<QueryClientProvider client={queryClient}>
<RootComponent {...camelCaseDeep(propsFromRails)} />
</QueryClientProvider>
);
5 changes: 2 additions & 3 deletions app/javascript/plugins/fuzzy_search.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,8 @@ if (engine) {
matchesTitles.indexOf(domItemTitle) >= 0
) {
domItems[i].classList.remove("d-none");
domItems[i].style.order = matchesTitles.indexOf(
domItemTitle
);
domItems[i].style.order =
matchesTitles.indexOf(domItemTitle);
} else {
domItems[i].classList.add("d-none");
domItems[i].style.order = "inherit";
Expand Down
15 changes: 6 additions & 9 deletions app/javascript/plugins/leaflet_map.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,8 @@ const leafletMap = () => {
lmap.panTo([lat, lon]);
}

let leafletMarkers = leafletMapContainer.getElementsByClassName(
"leaflet-marker"
);
let leafletMarkers =
leafletMapContainer.getElementsByClassName("leaflet-marker");
if (leafletMarkers) {
let leafletMarkersCluster = L.markerClusterGroup();
for (let i = 0; i < leafletMarkers.length; ++i) {
Expand All @@ -86,9 +85,8 @@ const leafletMap = () => {
lmap.addLayer(leafletMarkersCluster);
}

let leafletGeojsons = leafletMapContainer.getElementsByClassName(
"leaflet-geojson"
);
let leafletGeojsons =
leafletMapContainer.getElementsByClassName("leaflet-geojson");
if (leafletGeojsons) {
let geojsonCodes = {};
for (let i = 0; i < leafletGeojsons.length; ++i) {
Expand Down Expand Up @@ -156,9 +154,8 @@ const leafletMap = () => {
L.control.layers({}, geojsonCodes, { collapsed: false }).addTo(lmap);
}

let leafletFlyBtns = leafletMapContainer.getElementsByClassName(
"leaflet_fly_btn"
);
let leafletFlyBtns =
leafletMapContainer.getElementsByClassName("leaflet_fly_btn");
for (let i = 0; i < leafletFlyBtns.length; ++i) {
let leafletFlyBtn = leafletFlyBtns[i];
let elemLat = leafletFlyBtn.getAttribute("data-lat");
Expand Down
3 changes: 1 addition & 2 deletions app/mailers/application_mailer.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
class ApplicationMailer < ActionMailer::Base
default :from => "Covidliste <[email protected]>",
"X-Auto-Response-Suppress" => "OOF"
default :from => "Covidliste <[email protected]>", "X-Auto-Response-Suppress" => "OOF"
layout "mailer"

def mail(headers)
Expand Down
3 changes: 1 addition & 2 deletions app/mailers/devise_mailer.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
class DeviseMailer < Devise::Mailer
default :from => "Covidliste <[email protected]>",
"X-Auto-Response-Suppress" => "OOF"
default :from => "Covidliste <[email protected]>", "X-Auto-Response-Suppress" => "OOF"
layout "mailer"
end
3 changes: 1 addition & 2 deletions app/mailers/match_mailer.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
class MatchMailer < ApplicationMailer
default :from => "Covidliste <[email protected]>",
"X-Auto-Response-Suppress" => "OOF"
default :from => "Covidliste <[email protected]>", "X-Auto-Response-Suppress" => "OOF"

def match_confirmation_instructions
@match = params[:match]
Expand Down
3 changes: 1 addition & 2 deletions app/mailers/slot_alert_mailer.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
class SlotAlertMailer < ApplicationMailer
default :from => "Covidliste <[email protected]>",
"X-Auto-Response-Suppress" => "OOF"
default :from => "Covidliste <[email protected]>", "X-Auto-Response-Suppress" => "OOF"

include ApplicationHelper
helper ApplicationHelper
Expand Down
3 changes: 1 addition & 2 deletions app/mailers/vaccination_center_mailer.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
class VaccinationCenterMailer < ApplicationMailer
default :from => "Covidliste <[email protected]>",
"X-Auto-Response-Suppress" => "OOF"
default :from => "Covidliste <[email protected]>", "X-Auto-Response-Suppress" => "OOF"

def confirmed_vaccination_center_onboarding
@tutorial_url = "https://docs.google.com/document/d/10IqYk739dJImngTIsQ7IJbf7RXJRG7drD4dZM_Z4xmI/edit?usp=sharing"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"version": "0.1.0",
"devDependencies": {
"pdfkit": "^0.12.1",
"prettier": "2.2.1",
"prettier": "^2.3.2",
"puppeteer": "^9.1.1",
"webpack-dev-server": "^3.11.2"
}
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.