Skip to content
Merged
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
2 changes: 1 addition & 1 deletion CHARTER.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,5 @@ The website is compiled by running `make`, which executes the following steps:
post (so that each post gets a static URL) (see `gatsby-node.mjs`).

Frontend filtering is done via JavaScript. Filters are defined in
`src/filter-jobs.js` and the accompanying frontend lives in
`src/filter-jobs.mjs` and the accompanying frontend lives in
`src/components/JobsFilter.jsx`.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"scripts": {
"build": "gatsby build",
"develop": "gatsby develop",
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"",
"format": "prettier --write \"**/*.{js,mjs,jsx,ts,tsx,json,md}\"",
"start": "npm run develop",
"serve": "gatsby serve",
"clean": "gatsby clean",
Expand Down
2 changes: 1 addition & 1 deletion src/components/Job.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from "react";
import { Link } from "gatsby";

import Badge from "./Badge";
import jobToMarkdown from "../jobToMarkdown.js";
import jobToMarkdown from "../jobToMarkdown.mjs";


const Job = ({ job }) => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/JobsFilter.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Jobs from "./Jobs";
import HowToPost from "./HowToPost";

import jobData from '../jobs.mjs';
import filterJobs from '../filter-jobs.js';
import filterJobs from '../filter-jobs.mjs';


const defaultFormValues = {
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions src/jobToMarkdown.js → src/jobToMarkdown.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { marked } from 'marked';
import DOMPurify from 'dompurify';

const DOMPurify = (typeof window !== 'undefined') ? require('dompurify') : undefined;
const sanitize = (DOMPurify && DOMPurify.sanitize) ? DOMPurify.sanitize : (x, y) => x;
const sanitize = (typeof window !== 'undefined' && DOMPurify && DOMPurify.sanitize) ? DOMPurify.sanitize : (x, y) => x;

export const jobToMarkdown = (job) => {
if (!job) return job;
Expand Down
2 changes: 1 addition & 1 deletion src/pages/job.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Page from '../components/Page';
import Job from '../components/Job';

// pageContext comes from createPage in
// gatsby-node.esm.js
// gatsby-node.mjs
const job = ({ pageContext }) => {
const { job } = pageContext;
return (
Expand Down