Skip to content

Commit

Permalink
Align dev prettier version with actionsx/prettier, fix formatting and…
Browse files Browse the repository at this point in the history
… enable quality github action
  • Loading branch information
carsso committed Dec 9, 2021
1 parent e47966f commit d5a311a
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 26 deletions.
5 changes: 2 additions & 3 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 All @@ -11,7 +10,7 @@ jobs:
- name: Checkout repository # copies repo in runner
uses: actions/checkout@v2 # short for https://github.com/actions/checkout
- name: Linting with Standard
uses: andrewmcodes/standardrb-action@v0.0.2
uses: amoeba/standardrb-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Formatting with Prettier
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
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.

0 comments on commit d5a311a

Please sign in to comment.