Skip to content

Commit

Permalink
Fix some linting
Browse files Browse the repository at this point in the history
  • Loading branch information
johno committed Jul 17, 2020
1 parent db93304 commit 577d48f
Show file tree
Hide file tree
Showing 28 changed files with 95 additions and 95 deletions.
2 changes: 1 addition & 1 deletion docs/404.mdx
@@ -1,3 +1,3 @@
# 404

Page not found. [Return Home](/)
Page not found.[Return Home](/)
2 changes: 1 addition & 1 deletion docs/about.mdx
@@ -1,7 +1,7 @@
# About

MDX is based on the [original `.mdx` proposal][idea] by Guillermo Rauch
([@rauchg][rauchg]). Its syntax is defined by an official [specification][].
([@rauchg][rauchg]).Its syntax is defined by an official [specification][].
The source code for MDX is available on [GitHub][] and is [MIT licensed][license].

The project is governed by the [unified collective][governance].
Expand Down
10 changes: 5 additions & 5 deletions docs/advanced/components.mdx
Expand Up @@ -51,14 +51,14 @@ documents via the [MDXProvider](#mdxprovider).
### Layout props

You’ll also notice that `layoutProps` is created based on your exports
and then passed to the wrapper. This allows for the wrapper to use
and then passed to the wrapper.This allows for the wrapper to use
those props automatically for handling things like adding an author
bio to the wrapped document.

## `makeShortcode`

There is one other function added to the compiled output: `makeShortcode`.
This is added for [shortcode support](/blog/shortcodes). It’s used in order
This is added for [shortcode support](/blog/shortcodes).It’s used in order
to stub any components that aren’t directly imported so that there won’t be
any `ReferenceError`s. If they’re passed to the `MDXProvider`, the custom
JSX pragma will pull the component from context and use that in place of the
Expand Down Expand Up @@ -102,9 +102,9 @@ export default () => (
### Caveats

Because MDXProvider uses React Context directly, it is affected by
the same caveats. It is therefore important that you do not declare
your components mapping inline in the JSX. Doing so will trigger a rerender
of your entire MDX page with every render cycle. Not only is this bad for
the same caveats.It is therefore important that you do not declare
your components mapping inline in the JSX.Doing so will trigger a rerender
of your entire MDX page with every render cycle.Not only is this bad for
performance, but it can cause unwanted side affects, like breaking in-page
browser navigation.

Expand Down
2 changes: 1 addition & 1 deletion docs/advanced/transform-content.mdx
Expand Up @@ -6,7 +6,7 @@ are many utilities you can use to work with MDX.

You can utilize [to-vfile][] to read and write MDX files
and you can leverage [remark][] and [remark-mdx][]
to parse and process MDX content. The remark-mdx library is a parsing
to parse and process MDX content.The remark-mdx library is a parsing
extension to enhance the Markdown [AST][] to understand MDX
(resulting in [MDXAST][]), giving you access and insight to MDX
attributes, namely imports, exports, and jsx.
Expand Down
18 changes: 9 additions & 9 deletions docs/blog/custom-pragma.mdx
Expand Up @@ -4,7 +4,7 @@

`MDXTag`, for those that aren’t aware, is a critical piece in the way
MDX replaces HTML primitives like `<pre>` and `<h1>` with custom React
Components. [I’ve previously
Components.[I’ve previously
written](https://www.christopherbiscardi.com/post/codeblocks-mdx-and-mdx-utils)
about the way `MDXTag` works when trying to replace the `<pre>` tag
with a custom code component.
Expand Down Expand Up @@ -39,7 +39,7 @@ exports.preToCodeBlock = preProps => {
```

So `MDXTag` is a real Component in the middle of all of the other MDX
rendered elements. All of the code is included here for reference.
rendered elements.All of the code is included here for reference.

```js
import React, {Component} from 'react'
Expand Down Expand Up @@ -86,7 +86,7 @@ export default withMDXComponents(MDXTag)

`MDXTag` is used in the [mdx-hast-to-jsx
conversion](https://github.com/mdx-js/mdx/blob/e1bcf1b1a352c9728424b01c1bb5d62e450eb48d/packages/mdx/mdx-hast-to-jsx.js#L163-L165),
which is the final step in the MDX AST pipeline. Every renderable
which is the final step in the MDX AST pipeline.Every renderable
element is wrapped in an `MDXTag`, and `MDXTag` handles rendering the
element later.

Expand Down Expand Up @@ -171,12 +171,12 @@ wrapping `MDXTag`.

Now that we’ve cleaned up the intermediary representation, we need to
make sure that we have the same functionality as the old
`MDXTag`. This is done through a custom `createElement`
implementation. Typically when using React, we use
`React.createElement` to render the elements on screen. This is even
`MDXTag`.This is done through a custom `createElement`
implementation.Typically when using React, we use
`React.createElement` to render the elements on screen.This is even
true if you’re using JSX because JSX tags such as `<div>` compile to
`createElement` calls. So this time instead of using
`React.createElement` we’ll be using our own. [Check it out in the MDX
`createElement` calls.So this time instead of using
`React.createElement` we’ll be using our own.[Check it out in the MDX
repo](https://github.com/mdx-js/mdx/blob/0506708bed0ac787f605b0a97ef77d1954fa1275/packages/react/src/create-element.js)

Reproduced here is our `createElement` function and the logic for how
Expand Down Expand Up @@ -220,7 +220,7 @@ export default function (type, props) {

One really cool application of the new output format using a custom
`createElement` is that we can now write versions of it for Vue and
other frameworks. Since the pragma insertion is the responsibility of
other frameworks.Since the pragma insertion is the responsibility of
the webpack (or other bundlers) loader, swapping the pragma can be an
option in mdx-loader as long as we have a Vue `createElement` to point
to.
Expand Down
8 changes: 4 additions & 4 deletions docs/blog/shortcodes.mdx
Expand Up @@ -4,9 +4,9 @@ import {Button} from '@rebass/emotion'

# Shortcodes

An exciting new feature in MDX v1 is global shortcodes. This
An exciting new feature in MDX v1 is global shortcodes.This
allows you to expose components to all of your documents in
your app or website. This is a useful feature for common
your app or website.This is a useful feature for common
components like YouTube embeds, Twitter cards, or anything
else frequently used in your documents.

Expand All @@ -27,7 +27,7 @@ export default ({children}) => (
```

Then, any MDX document that’s wrapped in `App` has access to
`YouTube`, `Twitter`, and `TomatoBox`. Shortcodes are nothing
`YouTube`, `Twitter`, and `TomatoBox`.Shortcodes are nothing
more than components, so you can reference them anywhere in an
MDX document with JSX.

Expand All @@ -47,7 +47,7 @@ Here’s a YouTube shortcode wrapped in TomatoBox:
</TomatoBox>
```

That’s it. :tada: :rocket:
That’s it.:tada: :rocket:

<Button
as="a"
Expand Down
42 changes: 21 additions & 21 deletions docs/blog/v1.mdx
Expand Up @@ -6,11 +6,11 @@
# MDX goes stable

It’s been a year and a half since the first MDX commit and a year since MDX was first announced at
ZEIT Day. MDX is a radical paradigm shift in how to write immersive content using components. It’s
ZEIT Day.MDX is a radical paradigm shift in how to write immersive content using components.It’s
an open, [authorable format](https://johno.com/authorable-format) that makes it _fun_ to write again.

Since announcing MDX we’ve been working on numerous bug fixes, new features, better parsing, and integration
tests. Now, we think it’s ready. **We’re happy to finally release v1!**
tests.Now, we think it’s ready.**We’re happy to finally release v1!**

## 🎉 What’s new?

Expand All @@ -22,15 +22,15 @@ MDX document parsing is significantly improved.
We won’t get into the nitty gritty here, but we’ve seen how MDX is used in real-world projects, integrated
the edge cases we came across into our test suite, and now handle JSX, imports, and exports much more
intuitively.
Please open an issue if you find a case we haven’t covered! 😸
Please open an issue if you find a case we haven’t covered!😸

### remark-mdx

`remark-mdx` is the syntactic extension for MDX in remark. It provides the parsing functionality for
MDX as a _[remark](https://github.com/remarkjs/remark) plugin_. That sounds a bit meta. What it means
`remark-mdx` is the syntactic extension for MDX in remark.It provides the parsing functionality for
MDX as a _[remark](https://github.com/remarkjs/remark) plugin_.That sounds a bit meta.What it means
is that before we had the syntax parsing bits _in_ the library (unusable from the outside), and now it’s
externalized (usable from the outside). This is useful if you want to inspect or transform MDX documents.
For example, it allows tools like prettier to use the exact same parser used by MDX core. Or you could
externalized (usable from the outside).This is useful if you want to inspect or transform MDX documents.
For example, it allows tools like prettier to use the exact same parser used by MDX core.Or you could
use `remark-mdx` in combination with [remark-lint](https://github.com/remarkjs/remark-lint) to check your
MDX.

Expand Down Expand Up @@ -61,9 +61,9 @@ improving the docs and updating the build tooling.

## Breaking changes

In order to make some improvements we were forced to introduce a few breaking changes. **These were the
result of real-world production testing and feedback**. The community has evolved and we’ve come up with
newer, better ideas over the last year. We have made sure the impact is small and have written a full
In order to make some improvements we were forced to introduce a few breaking changes.**These were the
result of real-world production testing and feedback**.The community has evolved and we’ve come up with
newer, better ideas over the last year.We have made sure the impact is small and have written a full
migration guide.

- 🚨`@mdx-js/tag` is replaced by `@mdx-js/react` and an `@mdx` pragma - [migration guide](/migrating/v1#pragma)
Expand All @@ -74,14 +74,14 @@ migration guide.

#### Deprecations

We only needed to introduce one deprecation. The `mdPlugins` and `hastPlugins` options have been renamed
`remarkPlugins` and `rehypePlugins` respectively. For the time being we will issue a warning when the old options
are used. In v2, the old options will be removed.
We only needed to introduce one deprecation.The `mdPlugins` and `hastPlugins` options have been renamed
`remarkPlugins` and `rehypePlugins` respectively.For the time being we will issue a warning when the old options
are used.In v2, the old options will be removed.

## 📈 Growth

A major release is always a good time to take a step back and reflect on what’s been happening in terms of growth
and the greater community. The ecosystem surrounding MDX has already grown larger than we ever dreamed. We’ve also
and the greater community.The ecosystem surrounding MDX has already grown larger than we ever dreamed.We’ve also
seen projects/products/application we never even imagined.

### Numbers
Expand All @@ -93,7 +93,7 @@ seen projects/products/application we never even imagined.
- **Commits**: 670

The contributor growth is one of the most important aspects here as we have numerous community members that are familiar
with MDX internals. This allows us to continually improve the project and spread the workload against an ever growing
with MDX internals.This allows us to continually improve the project and spread the workload against an ever growing
team of contributors.

[See the contributor graph](https://github.com/mdx-js/mdx/graphs/contributors)
Expand Down Expand Up @@ -127,16 +127,16 @@ so in addition to bug fixes and parsing issues we might encounter.
### Vue support

Supporting Vue is an important goal for MDX and is one of the primary reasons we’ve rearchitected MDX to use
custom pragma. We’re delighted that **we now have an alpha version for Vue working**. We’d love it if anyone
custom pragma.We’re delighted that **we now have an alpha version for Vue working**.We’d love it if anyone
from the Vue community wants to give it a try and provide feedback.

[See the Vue example](https://github.com/mdx-js/mdx/tree/master/examples/vue)

### Blocks project

One of the key missing aspects of authoring MDX documents is the editing experience. Currently, there isn’t an
approachable way to write MDX unless you enjoy working in a text editor and writing raw Markdown/code. We’d
like to solve that and have begun work on an MDX “blocks editor” that’s a **content-focused WYSIWYG**. Not to mention,
One of the key missing aspects of authoring MDX documents is the editing experience.Currently, there isn’t an
approachable way to write MDX unless you enjoy working in a text editor and writing raw Markdown/code.We’d
like to solve that and have begun work on an MDX “blocks editor” that’s a **content-focused WYSIWYG**.Not to mention,
we’ll be doing all that we can to make sure the editor is as accessible as it can be from the beginning.

When we have a beta ready we will be open sourcing it and announcing, so stay tuned.
Expand All @@ -152,11 +152,11 @@ projects are used all over the web, and it would never be possible without finan
- [Gatsby](https://gatsbyjs.org) 🥇
- [Holloway](https://www.holloway.com) 🥉
- [Backers](https://opencollective.com/unified#budget) 🏆
- [You?](https://opencollective.com/unified) 👤
- [You?](https://opencollective.com/unified)👤

## 🙏 Thanks

We’d like to say thanks to all our contributors and our happy users. Special thanks to
We’d like to say thanks to all our contributors and our happy users.Special thanks to
[@wooorm](https://github.com/wooorm),
[@silvenon](https://github.com/silvenon),
[@timneutkens](https://github.com/timneutkens),
Expand Down
10 changes: 5 additions & 5 deletions docs/contributing.mdx
Expand Up @@ -4,10 +4,10 @@
> By interacting with this repository, organization, or community you agree to
> abide by its terms.
Hi! 👋
Hi!👋
We’re excited that you’re interested in contributing!
Take a moment to read the following guidelines.
And thanks for contributing to **MDX**! 👏👌✨
And thanks for contributing to **MDX**!👏👌✨

If you’re raising an issue, please understand that people involved with this
project often do so for fun, next to their day job; you are not entitled to
Expand Down Expand Up @@ -69,7 +69,7 @@ We’re always looking for more opinions on discussions in the issue tracker.

### Write code

Code contributions are very welcome. It’s often good to first create an issue
Code contributions are very welcome.It’s often good to first create an issue
to report a bug or suggest a new feature before creating a pull request to
prevent you from doing unnecessary work.

Expand All @@ -80,7 +80,7 @@ prevent you from doing unnecessary work.
3. `yarn test`

Tests for an individual package can be run as a yarn workspace:
`yarn workspace remark-mdx test`. To see what packages ar available to test
`yarn workspace remark-mdx test`.To see what packages ar available to test
you can list out all workspaces with `yarn workspaces info`.

## Running the docs site
Expand All @@ -91,7 +91,7 @@ you can list out all workspaces with `yarn workspaces info`.

## Submitting an issue

- The issue tracker is for issues. Use chat for support
- The issue tracker is for issues.Use chat for support
- Search the issue tracker (including closed issues) before opening a new
issue
- Ensure you’re using the latest version of our packages
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/babel-config.mdx
@@ -1,7 +1,7 @@
# Babel configuration

You will also need to configure [babel][] to support the language features that
MDX uses. One way you can achieve that is using the following `.babelrc`
MDX uses.One way you can achieve that is using the following `.babelrc`
at your project root.

```json
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/index.mdx
Expand Up @@ -240,7 +240,7 @@ structures.
##### Defining variables with exports

If you need to define a variable in your MDX document, you can use an export
to do so. Not only do exports emit data, they instantiate data you can reference
to do so.Not only do exports emit data, they instantiate data you can reference
in JSX blocks:

```js
Expand Down
6 changes: 3 additions & 3 deletions docs/getting-started/webpack.mdx
Expand Up @@ -13,7 +13,7 @@ npm install --save-dev @mdx-js/loader

## Configuration

The loader needs to be used in tandem with the [babel-loader][]. Most projects will typically
The loader needs to be used in tandem with the [babel-loader][].Most projects will typically
already include this if you are using JSX syntax.

For webpack projects you can define the following `webpack.config.js` extension
Expand All @@ -38,8 +38,8 @@ module.exports = {

If you only want the loader for `.mdx` files you can change the regex to `/\.mdx$/`.

The transpiled output for MDX requires [babel][] to be run. This is typically
by adding in the babel-loader to run _after_ the MDX loader. Webpack starts
The transpiled output for MDX requires [babel][] to be run.This is typically
by adding in the babel-loader to run _after_ the MDX loader.Webpack starts
from the end of the loaders array and works backward, so it is important to
follow the ordering above.

Expand Down
6 changes: 3 additions & 3 deletions docs/getting-started/x0.mdx
@@ -1,6 +1,6 @@
# x0

[x0][] is a zero-config tool with built in support for MDX. You will need
[x0][] is a zero-config tool with built in support for MDX.You will need
to install the library and set up the npm script.

## Installation
Expand All @@ -21,8 +21,8 @@ Then, in your `package.json` add the following to the `scripts`:
## Customizing the layout

[x0][] supports MDX files with either `.md` or `.mdx` file extensions out of
the box. For components requiring providers you will need to use customize
`_app.js`. Here’s an example using [Rebass][] components:
the box.For components requiring providers you will need to use customize
`_app.js`.Here’s an example using [Rebass][] components:

```jsx
import React from 'react'
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/zero.mdx
@@ -1,7 +1,7 @@
# Zero

[Zero](https://zeroserver.io) is a no-config web framework for React, MDX,
Node.js, and Vue. It has built in support for MDX. To get started, install
Node.js, and Vue.It has built in support for MDX.To get started, install
Zero (globally or locally in your project).

## Installation
Expand Down
4 changes: 2 additions & 2 deletions docs/guides/custom-loader.mdx
@@ -1,8 +1,8 @@
# Custom loader

By design, the default MDX is very minimal and likely won’t see any additional features outside of the MDX spec. However, webpack [makes it straightforward][webpack-loader] to write your own loader to add custom syntax support.
By design, the default MDX is very minimal and likely won’t see any additional features outside of the MDX spec.However, webpack [makes it straightforward][webpack-loader] to write your own loader to add custom syntax support.

Consider a scenario where you wanted to add frontmatter support to all your MDX documents. You could achieve this with a remark plugin or a custom loader. Here we’ll write a [custom loader][x0]:
Consider a scenario where you wanted to add frontmatter support to all your MDX documents.You could achieve this with a remark plugin or a custom loader.Here we’ll write a [custom loader][x0]:

```js
// lib/fm-loader.js
Expand Down
4 changes: 2 additions & 2 deletions docs/guides/live-code.mdx
Expand Up @@ -5,7 +5,7 @@ If you haven’t read the syntax highlighting guide it’s recommended start the
# Live code

An increasingly common approach for live code editors is to overload the
code block. This is often done so that the code shows up nicely when rendered
code block.This is often done so that the code shows up nicely when rendered
to GitHub and it’s a nice usage of meta strings.

## Code block meta string
Expand Down Expand Up @@ -88,7 +88,7 @@ export default props => (
## Using the MDXProvider context for rendering

With the react-live editor you can ensure that your MDX components
in context are rendered in the preview. In order to do this you
in context are rendered in the preview.In order to do this you
can use the MDX custom pragma.

To achieve this, import the pragma:
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/markdown-in-components.md
Expand Up @@ -4,7 +4,7 @@ One great feature about MDX is that you can use Markdown within your JSX compone

## Example

Lets say you wanted to create a custom `<Note />` component. You could do something like this.
Lets say you wanted to create a custom `<Note />` component.You could do something like this.

Using MDX 2:

Expand Down

0 comments on commit 577d48f

Please sign in to comment.