Skip to content

Commit

Permalink
Prettify files (#5170)
Browse files Browse the repository at this point in the history
* lint against mdx

* run prettier against repository
  • Loading branch information
chenxsan authored Jul 10, 2021
1 parent d6deffa commit 1016e80
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 12 deletions.
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
dist
examples
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"prepare": "husky install"
},
"lint-staged": {
"*.{js,jsx,md}": [
"*.{js,jsx,md,mdx}": [
"npm run lint-js"
],
"*.md": [
Expand Down
5 changes: 4 additions & 1 deletion src/components/StackBlitzPreview/StackBlitzPreview.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ StackBlitzPreview.propTypes = {
};

export default function StackBlitzPreview(props = {}) {
const { example = '', description = 'Check out this guide live on StackBlitz.' } = props;
const {
example = '',
description = 'Check out this guide live on StackBlitz.',
} = props;

const url = `https://stackblitz.com/github/webpack/webpack.js.org/tree/master/examples/${example}`;

Expand Down
1 change: 0 additions & 1 deletion src/content/contribute/writers-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ related:
- title: Title of Related Article
url: [url of related article]
---

```

Let's break these down:
Expand Down
13 changes: 8 additions & 5 deletions src/content/contribute/writing-a-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,14 @@ Plugins are instantiated objects with an `apply` method on their prototype. This
```javascript
class HelloWorldPlugin {
apply(compiler) {
compiler.hooks.done.tap('Hello World Plugin', (
stats /* stats is passed as an argument when done hook is tapped. */
) => {
console.log('Hello World!');
});
compiler.hooks.done.tap(
'Hello World Plugin',
(
stats /* stats is passed as an argument when done hook is tapped. */
) => {
console.log('Hello World!');
}
);
}
}

Expand Down
4 changes: 1 addition & 3 deletions src/content/guides/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ webpack is used to compile JavaScript modules. Once [installed](/guides/installa

W> The minimum supported Node.js version to run webpack 5 is 10.13.0 (LTS)

<StackBlitzPreview
example="getting-started?terminal="
/>
<StackBlitzPreview example="getting-started?terminal=" />

## Basic Setup

Expand Down
2 changes: 1 addition & 1 deletion src/content/guides/typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Let's set up a configuration to support JSX and compile TypeScript down to ES5..
"target": "es5",
"jsx": "react",
"allowJs": true,
"moduleResolution": "node",
"moduleResolution": "node"
}
}
```
Expand Down

1 comment on commit 1016e80

@vercel
Copy link

@vercel vercel bot commented on 1016e80 Jul 10, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.