trevorblades / gatsby-remark-rewrite-relative-links Goto Github PK
View Code? Open in Web Editor NEW๐ Fixes relative links between markdown pages in Gatsby
Home Page: https://gatsbyjs.org/packages/gatsby-remark-rewrite-relative-links/
๐ Fixes relative links between markdown pages in Gatsby
Home Page: https://gatsbyjs.org/packages/gatsby-remark-rewrite-relative-links/
$ npm install
$ npm test
> [email protected] pretest /Users/me/gh/gatsby-remark-rewrite-relative-links
> eslint src/*
> [email protected] test /Users/me/gh/gatsby-remark-rewrite-relative-links
> jest
FAIL src/test.ts
โ Test suite failed to run
TypeScript diagnostics (customize using `[jest-config].globals.ts-jest.diagnostics` option):
src/test.ts:8:26 - error TS2345: Argument of type '{ markdownAST: Parent; markdownNode: { fields: { slug: string; }; }; pathPrefix: string
; }' is not assignable to parameter of type '{ markdownAST: any; markdownNode: any; pathPrefix: any; getNode: any; }'.
Property 'getNode' is missing in type '{ markdownAST: Parent; markdownNode: { fields: { slug: string; }; }; pathPrefix: string; }' but r
equired in type '{ markdownAST: any; markdownNode: any; pathPrefix: any; getNode: any; }'.
8 const mdast = plugin({
~
9 markdownAST: root([mdLink]),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
15 pathPrefix: ''
~~~~~~~~~~~~~~~~~~~~
16 });
~~~~~
src/test.ts:32:26 - error TS2345: Argument of type '{ markdownAST: Parent; markdownNode: { fields: { slug: string; }; }; pathPrefix: strin
g; }' is not assignable to parameter of type '{ markdownAST: any; markdownNode: any; pathPrefix: any; getNode: any; }'.
Property 'getNode' is missing in type '{ markdownAST: Parent; markdownNode: { fields: { slug: string; }; }; pathPrefix: string; }' but r
equired in type '{ markdownAST: any; markdownNode: any; pathPrefix: any; getNode: any; }'.
32 const mdast = plugin({
~
33 markdownAST: root([sibling, uncle]),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
39 pathPrefix: ''
~~~~~~~~~~~~~~~~~~~~
40 });
~~~~~
src/test.ts:59:26 - error TS2345: Argument of type '{ markdownAST: Parent; markdownNode: { fields: { slug: string; }; }; pathPrefix: string; }' is not assignable to parameter of type '{ markdownAST: any; markdownNode: any; pathPrefix: any; getNode: any; }'.
Property 'getNode' is missing in type '{ markdownAST: Parent; markdownNode: { fields: { slug: string; }; }; pathPrefix: string; }' but required in type '{ markdownAST: any; markdownNode: any; pathPrefix: any; getNode: any; }'.
59 const mdast = plugin({
~
60 markdownAST: root([mdLink]),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
66 pathPrefix: '/my-prefix'
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
67 });
~~~~~
src/test.ts:82:26 - error TS2345: Argument of type '{ markdownAST: Parent; markdownNode: { fields: { slug: string; }; }; pathPrefix: string; }' is not assignable to parameter of type '{ markdownAST: any; markdownNode: any; pathPrefix: any; getNode: any; }'.
Property 'getNode' is missing in type '{ markdownAST: Parent; markdownNode: { fields: { slug: string; }; }; pathPrefix: string; }' but required in type '{ markdownAST: any; markdownNode: any; pathPrefix: any; getNode: any; }'.
82 const mdast = plugin({
~
83 markdownAST: root([mdLink]),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
89 pathPrefix: ''
~~~~~~~~~~~~~~~~~~~~
90 });
~~~~~
Test Suites: 1 failed, 1 total
Tests: 0 total
Snapshots: 0 total
Time: 2.041s
Ran all test suites.
npm ERR! Test failed. See above for more details.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.