Skip to content

Commit 4b4e86a

Browse files
authored
Run prettier over repo md/json/yml files (#336)
* Format readme and changelog files with prettier * Run prettier as part of linting
1 parent d2f5f3e commit 4b4e86a

File tree

15 files changed

+310
-315
lines changed

15 files changed

+310
-315
lines changed

.prettierignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
node_modules
2-
*.md
2+
packages/eslint-plugin/docs/rules/**/*.md
33
package.json

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[comment]: # (NOTE: This file is generated and should not be modify directly. Update `templates/ROOT_README.hbs.md` instead)
1+
[comment]: # 'NOTE: This file is generated and should not be modify directly. Update `templates/ROOT_README.hbs.md` instead'
22

33
# Web Configs
44

@@ -12,20 +12,20 @@ This repo is managed as a monorepo that is composed of many npm packages, where
1212

1313
### Package Index
1414

15-
| Name | NPM | Size |
16-
| ------- | --- | --- |
17-
| [babel-preset](packages/babel-preset) | [![npm version](https://badge.fury.io/js/%40shopify%2Fbabel-preset.svg)](https://badge.fury.io/js/%40shopify%2Fbabel-preset) | [![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/@shopify/babel-preset.svg)](https://img.shields.io/bundlephobia/minzip/@shopify/babel-preset.svg) |
15+
| Name | NPM | Size |
16+
| --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
17+
| [babel-preset](packages/babel-preset) | [![npm version](https://badge.fury.io/js/%40shopify%2Fbabel-preset.svg)](https://badge.fury.io/js/%40shopify%2Fbabel-preset) | [![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/@shopify/babel-preset.svg)](https://img.shields.io/bundlephobia/minzip/@shopify/babel-preset.svg) |
1818
| [browserslist-config](packages/browserslist-config) | [![npm version](https://badge.fury.io/js/%40shopify%2Fbrowserslist-config.svg)](https://badge.fury.io/js/%40shopify%2Fbrowserslist-config) | [![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/@shopify/browserslist-config.svg)](https://img.shields.io/bundlephobia/minzip/@shopify/browserslist-config.svg) |
19-
| [eslint-plugin](packages/eslint-plugin) | [![npm version](https://badge.fury.io/js/%40shopify%2Feslint-plugin.svg)](https://badge.fury.io/js/%40shopify%2Feslint-plugin) | [![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/@shopify/eslint-plugin.svg)](https://img.shields.io/bundlephobia/minzip/@shopify/eslint-plugin.svg) |
20-
| [images](packages/images) | [![npm version](https://badge.fury.io/js/%40shopify%2Fimages.svg)](https://badge.fury.io/js/%40shopify%2Fimages) | [![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/@shopify/images.svg)](https://img.shields.io/bundlephobia/minzip/@shopify/images.svg) |
21-
| [postcss-plugin](packages/postcss-plugin) | [![npm version](https://badge.fury.io/js/%40shopify%2Fpostcss-plugin.svg)](https://badge.fury.io/js/%40shopify%2Fpostcss-plugin) | [![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/@shopify/postcss-plugin.svg)](https://img.shields.io/bundlephobia/minzip/@shopify/postcss-plugin.svg) |
22-
| [prettier-config](packages/prettier-config) | [![npm version](https://badge.fury.io/js/%40shopify%2Fprettier-config.svg)](https://badge.fury.io/js/%40shopify%2Fprettier-config) | [![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/@shopify/prettier-config.svg)](https://img.shields.io/bundlephobia/minzip/@shopify/prettier-config.svg) |
23-
| [stylelint-plugin](packages/stylelint-plugin) | [![npm version](https://badge.fury.io/js/%40shopify%2Fstylelint-plugin.svg)](https://badge.fury.io/js/%40shopify%2Fstylelint-plugin) | [![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/@shopify/stylelint-plugin.svg)](https://img.shields.io/bundlephobia/minzip/@shopify/stylelint-plugin.svg) |
24-
| [typescript-configs](packages/typescript-configs) | [![npm version](https://badge.fury.io/js/%40shopify%2Ftypescript-configs.svg)](https://badge.fury.io/js/%40shopify%2Ftypescript-configs) | [![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/@shopify/typescript-configs.svg)](https://img.shields.io/bundlephobia/minzip/@shopify/typescript-configs.svg) |
19+
| [eslint-plugin](packages/eslint-plugin) | [![npm version](https://badge.fury.io/js/%40shopify%2Feslint-plugin.svg)](https://badge.fury.io/js/%40shopify%2Feslint-plugin) | [![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/@shopify/eslint-plugin.svg)](https://img.shields.io/bundlephobia/minzip/@shopify/eslint-plugin.svg) |
20+
| [images](packages/images) | [![npm version](https://badge.fury.io/js/%40shopify%2Fimages.svg)](https://badge.fury.io/js/%40shopify%2Fimages) | [![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/@shopify/images.svg)](https://img.shields.io/bundlephobia/minzip/@shopify/images.svg) |
21+
| [postcss-plugin](packages/postcss-plugin) | [![npm version](https://badge.fury.io/js/%40shopify%2Fpostcss-plugin.svg)](https://badge.fury.io/js/%40shopify%2Fpostcss-plugin) | [![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/@shopify/postcss-plugin.svg)](https://img.shields.io/bundlephobia/minzip/@shopify/postcss-plugin.svg) |
22+
| [prettier-config](packages/prettier-config) | [![npm version](https://badge.fury.io/js/%40shopify%2Fprettier-config.svg)](https://badge.fury.io/js/%40shopify%2Fprettier-config) | [![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/@shopify/prettier-config.svg)](https://img.shields.io/bundlephobia/minzip/@shopify/prettier-config.svg) |
23+
| [stylelint-plugin](packages/stylelint-plugin) | [![npm version](https://badge.fury.io/js/%40shopify%2Fstylelint-plugin.svg)](https://badge.fury.io/js/%40shopify%2Fstylelint-plugin) | [![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/@shopify/stylelint-plugin.svg)](https://img.shields.io/bundlephobia/minzip/@shopify/stylelint-plugin.svg) |
24+
| [typescript-configs](packages/typescript-configs) | [![npm version](https://badge.fury.io/js/%40shopify%2Ftypescript-configs.svg)](https://badge.fury.io/js/%40shopify%2Ftypescript-configs) | [![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/@shopify/typescript-configs.svg)](https://img.shields.io/bundlephobia/minzip/@shopify/typescript-configs.svg) |
2525

2626
## Contribution
2727

28-
This repository has a CLA-Bot running which will ask contributors to sign a Contributor License Agreement (CLA).
28+
This repository has a CLA-Bot running which will ask contributors to sign a Contributor License Agreement (CLA).
2929

3030
Shopify has also adopted a Code of Conduct that we expect contributors to adhere to. Please read the [full text](./CODE_OF_CONDUCT.md) so that you can understand what actions will and will not be tolerated.
3131

@@ -65,11 +65,11 @@ More usage instructions on the `tophat` command can be [found here](https://gith
6565

6666
#### Documentation
6767

68-
If your change affects the public API of any packages within this repository (i.e. adding or changing arguments to a function, adding a new function, changing the return value, etc), please ensure the documentation is updated, and a changelog is added to reflect this. Documentation is in the `README.md` files of each package. If further documentation is needed please communicate via a GitHub issue.
68+
If your change affects the public API of any packages within this repository (i.e. adding or changing arguments to a function, adding a new function, changing the return value, etc), please ensure the documentation is updated, and a changelog is added to reflect this. Documentation is in the `README.md` files of each package. If further documentation is needed please communicate via a GitHub issue.
6969

7070
#### Testing
7171

72-
The packages in this repository are used in mission-critical production scenarios. As such, we do not merge any untested code.
72+
The packages in this repository are used in mission-critical production scenarios. As such, we do not merge any untested code.
7373

7474
To run the full test suite, simply run `dev test` or `yarn test`.
7575

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"scripts": {
1010
"test": "jest",
11-
"lint": "eslint '**/*.{js,jsx,ts,tsx}'",
11+
"lint": "eslint '**/*.{js,jsx,ts,tsx}' && prettier './**/*.{md,json,yml}' --check",
1212
"generate": "plop",
1313
"generate:package": "plop package && yarn plop docs",
1414
"release": "changeset publish",

packages/babel-preset/CHANGELOG.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434

3535
- Updated `@babel/runtime`, `@babel/preset-env`, and `@babel/core`. [[#273](https://github.com/Shopify/web-configs/pull/273)]
3636

37-
3837
## 24.1.0 - 2021-07-07
3938

4039
### Added
@@ -264,7 +263,6 @@ module.exports = {
264263
- `babel-plugin-transform-object-rest-spread` 6.23.0 => 6.26.0
265264
- `babel-preset-env` 1.5.2 => 1.7.0.
266265

267-
268266
### Chore
269267

270268
- Switch from Circle CI to Travis.
@@ -319,7 +317,6 @@ module.exports = {
319317
- `shopify/react` now includes plugins in development that add additional information for debugging purposes, and plugins in production that offer some performance optimizations.
320318
- `shopify/web` now accepts an additional option, `browsers` (an array of [`browserslist`](https://github.com/ai/browserslist) strings) which specifies what browsers to transpile for (defaults to the browsers supported by Shopify’s admin).
321319

322-
323320
### Changed
324321

325322
- `shopify/web` and `shopify/node` presets now use [`babel-preset-env`](https://github.com/babel/babel-preset-env) to transpile only the features needed for the target environment.

packages/babel-preset/README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,7 @@ The `@shopify/babel-preset` preset is designed to be a common import that can be
3939
```json
4040
{
4141
"babel": {
42-
"presets": [
43-
["@shopify/babel-preset", {"typescript": true}]
44-
]
42+
"presets": [["@shopify/babel-preset", {"typescript": true}]]
4543
}
4644
}
4745
```
@@ -117,4 +115,3 @@ When spreading props, use inline object with spread elements directly instead of
117115
This option when `true` will enable the `@babel/plugin-transform-react-constant-elements` plugin in production mode.
118116

119117
[Documentation](https://babeljs.io/docs/en/babel-plugin-transform-react-constant-elements)
120-

0 commit comments

Comments
 (0)