Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit e72d328

Browse files
committed
chore: 🤖 linting fixes
1 parent 323aa79 commit e72d328

File tree

3 files changed

+9
-13
lines changed

3 files changed

+9
-13
lines changed

gatsby-config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ module.exports = {
7373
resolve: 'gatsby-source-filesystem',
7474
options: {
7575
name: 'markdown-docs',
76-
path: './node_modules/node-i18n/content/v12.x/en-US/doc/api'
76+
path: './node_modules/node-i18n/content/v12.x/en-US/doc/api',
7777
},
7878
},
7979
{

gatsby-node-docs.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,11 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
2222
return;
2323
}
2424

25-
result.data.allMarkdownRemark.edges.forEach(({ node }) => {
25+
result.data.allMarkdownRemark.edges.forEach(() => {
2626
createPage({
2727
// path: node.frontmatter.slug,
2828
path: 'test',
2929
component: docsTemplate,
30-
context: {
31-
excerpt,
32-
},
3330
});
3431
});
35-
};
32+
};

src/pages/docs-demo.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,26 @@
11
import { graphql } from 'gatsby';
22
import React from 'react';
3-
import dompurify from 'dompurify';
43
import Layout from '../components/Layout';
54

6-
const sanitizer = dompurify.sanitize;
75
const title = 'Download Node.js';
86
const description = 'Come get me!';
97

108
interface Props {
119
data: {
1210
doc: {
13-
edges: string[] | {};
11+
edges: string[] | Record<string, unknown>;
1412
};
1513
};
1614
}
1715

1816
const DocsLayout = ({ data }: Props): React.ReactNode => (
19-
<Layout title={title} description={description} style={{width: '100%'}}>
17+
<Layout title={title} description={description}>
2018
<main>
2119
{console.log(data)}
2220
<p
21+
style={{ width: '100%' }}
2322
dangerouslySetInnerHTML={{
24-
__html: sanitizer(data.doc.edges[102].node.html),
23+
__html:data.doc.edges[102].node.html,
2524
}}
2625
/>
2726
</main>
@@ -35,7 +34,7 @@ export const query = graphql`
3534
edges {
3635
node {
3736
fileAbsolutePath
38-
frontmatter {
37+
frontmatter {
3938
title
4039
}
4140
html
@@ -55,4 +54,4 @@ export const query = graphql`
5554
}
5655
}
5756
}
58-
`;
57+
`;

0 commit comments

Comments
 (0)