Skip to content

Commit

Permalink
[docs] Lint markdown in the CI (#3504)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari authored Jan 7, 2022
1 parent 585ad95 commit 3cb8d3b
Show file tree
Hide file tree
Showing 11 changed files with 194 additions and 63 deletions.
19 changes: 15 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,11 @@ jobs:
then
exit 1
fi
test_static:
test_lint:
<<: *defaults
steps:
- checkout
- install_js
- run:
name: '`yarn prettier` changes committed?'
command: yarn prettier check-changed
- run:
name: Eslint
command: yarn eslint:ci
Expand All @@ -140,6 +137,17 @@ jobs:
- run:
name: Lint JSON
command: yarn jsonlint
- run:
name: Lint Markdown
command: yarn markdownlint
test_static:
<<: *defaults
steps:
- checkout
- install_js
- run:
name: '`yarn prettier` changes committed?'
command: yarn prettier check-changed
- run:
name: Generate PropTypes
command: yarn proptypes
Expand Down Expand Up @@ -226,6 +234,9 @@ workflows:
- test_unit:
requires:
- checkout
- test_lint:
requires:
- checkout
- test_static:
requires:
- checkout
Expand Down
26 changes: 26 additions & 0 deletions .markdownlint.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
// MD013/line-length. Already handled by Prettier.
"MD013": false,
// MD033/no-inline-html. We use it from time to time, it's fine.
"MD033": false,
// MD034/no-bare-urls. Not a concern for us, our Markdown interpreter supports it.
"MD034": false,
// MD014/commands-show-output. It's OK.
"MD014": false,
"MD025": {
// Heading level
"level": 1,
// RegExp for matching title in front matter
"front_matter_title": ""
},
// MD024/no-duplicate-heading/no-duplicate-header
"MD024": {
"siblings_only": true
},
// MD036/no-emphasis-as-heading/no-emphasis-as-header. It's OK.
"MD036": false,
// MD029/ol-prefix. Buggy
"MD029": false,
// MD004/ul-style. Buggy
"MD004": false
}
4 changes: 4 additions & 0 deletions .markdownlintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
*-zh.md
*-pt.md
build
81 changes: 40 additions & 41 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,25 +75,25 @@ A big thanks to the 8 contributors who made this release possible. Here are some
- [DataGrid] Refactor keyboard/click event management (#3275) @alexfauquette
- [DataGrid] Fire change event when the state changes, instead of when the prop changes (#3388) @flaviendelangle
- [DataGrid] Unsubscribe event listeners registered in uncommitted renders (#3310) @m4theushw
- [DataGrid] Rework state update methods and deprecate `useGridApi` and `useGridState` (#3325) @flaviendelangle
- [l10n] Improve German (deDE) locale (#3430) @sebastianfrey
- [l10n] Improve Hebrew (heIL) locale (#3445) @ColdAtNight
- [l10n] Improve Dutch (nlNL) locale (#3429) @jaapjr

### Core

- [core] Rework state update methods and deprecate `useGridApi` and `useGridState` (#3325) @flaviendelangle
- [core] Add sections to some of the feature hooks (#3391) @flaviendelangle
- [core] Generate exports snapshot for both `x-data-grid` and `x-data-grid-pro` packages (#3427) @flaviendelangle
- [core] Remove 'x-data-grid' folder from DataGridPro bundle (#3394) @m4theushw
- [core] Add link to OpenCollective (#3392) @oliviertassinari

### Docs

- [docs] Improve pagination documentation page (#3424) @flaviendelangle
- [docs] Include @mui/x-data-grid as dependency in the CodeSandbox (#3396) @m4theushw
- [docs] Stop using TypeDoc to generate the API documentation (#3320) @flaviendelangle
- [docs] Remove column pinning from "Upcoming features" (#3443) @alexfauquette

### Core

- [core] Add sections to some of the feature hooks (#3391) @flaviendelangle
- [core] Generate exports snapshot for both `x-data-grid` and `x-data-grid-pro` packages (#3427) @flaviendelangle
- [core] Remove 'x-data-grid' folder from DataGridPro bundle (#3394) @m4theushw
- [core] Add link to OpenCollective (#3392) @oliviertassinari

## 5.2.0

_Dec 9, 2021_
Expand Down Expand Up @@ -153,6 +153,18 @@ A big thanks to the 5 contributors who made this release possible. Here are some
- [DataGrid] Fix `DatePicker` bug by limiting years to 4 digits (#3222) @alexfauquette
- [DataGrid] Fix column menu position when closing (#3289) @m4theushw
- [DataGrid] Fix to not crash when a sort item uses a non-existing column (#3224) @flaviendelangle
- [DataGrid] Type the `api` param in callback interfaces (#3315) @flaviendelangle

### Docs

- [docs] Always use auto-generated `apiRef` documentation (#3266) @flaviendelangle
- [docs] Avoid 301 links (#3329) @oliviertassinari
- [docs] Disable the ad when not MIT (#3334) @oliviertassinari
- [docs] Fix 404 link to Zendesk @oliviertassinari
- [docs] Fix dead link on the overview page (#3326) @flaviendelangle
- [docs] Fix double MUI in the title (#3332) @oliviertassinari
- [docs] Fix duplicate "the" (#3365) @noam-honig
- [docs] Update branch to deploy docs (#3321) @m4theushw

### Core

Expand All @@ -163,22 +175,10 @@ A big thanks to the 5 contributors who made this release possible. Here are some
- [core] Improve tests for Tree Data (#3366) @flaviendelangle
- [core] Never import directly from the `__modules__` folder in the `x-data-grid-generator` package (#3379) @flaviendelangle
- [core] Transition to a new StackOverflow tag (#3308) @oliviertassinari
- [core] Type the `api` param in callback interfaces (#3315) @flaviendelangle
- [core] Update monorepo (#3370) @flaviendelangle
- [core] Use pre-processors for sorting and filtering (#3318) @flaviendelangle
- [test] Replace `useFakeTimers` (#3323) @m4theushw

### Docs

- [docs] Always use auto-generated `apiRef` documentation (#3266) @flaviendelangle
- [docs] Avoid 301 links (#3329) @oliviertassinari
- [docs] Disable the ad when not MIT (#3334) @oliviertassinari
- [docs] Fix 404 link to Zendesk @oliviertassinari
- [docs] Fix dead link on the overview page (#3326) @flaviendelangle
- [docs] Fix double MUI in the title (#3332) @oliviertassinari
- [docs] Fix duplicate "the" (#3365) @noam-honig
- [docs] Update branch to deploy docs (#3321) @m4theushw

## 5.1.0

_Dec 2, 2021_
Expand Down Expand Up @@ -310,12 +310,14 @@ A big thanks to the 3 contributors who made this release possible. Here are some

### `@mui/x-data-grid@v5.0.1` / `@mui/x-data-grid-pro@v5.0.1`

#### Changes

- [DataGrid] New API to validate the editing values (#3006) @m4theushw
- [DataGrid] Use color-scheme to set dark mode on native components (#3146) @alexfauquette
- [DataGrid] Fix the `@mui/x-data-grid` type entrypoint (#3196) @flaviendelangle

### Docs

- [docs] Move sentence about disabling multi rows selection (#3167) @alexfauquette

### Core

- [core] Drop `useGridContainerProps` (#3007) @flaviendelangle
Expand All @@ -324,10 +326,6 @@ A big thanks to the 3 contributors who made this release possible. Here are some
- [core] Remove the `index.ts` of the export hooks (#3165) @flaviendelangle
- [core] Set the correct release date for v5.0.0 in the CHANGELOG.md (#3192) @flaviendelangle

### Docs

- [docs] Move sentence about disabling multi rows selection (#3167) @alexfauquette

## 5.0.0

_Nov 23, 2021_
Expand Down Expand Up @@ -1428,6 +1426,7 @@ Big thanks to the 8 contributors who made this release possible. Here are some h
- The `onEditCellChange` prop was renamed to `onEditCellPropsChange`.
- The `onEditCellChangeCommitted` prop was renamed to `onCellEditCommit`.
- The `onEditRowModelChange` prop was removed. Use the new `onEditRowsModelChange` prop.

```diff
-onEditRowModelChange?: (params: GridEditRowModelParams)
+onEditRowsModelChange?: (editRowsModel: GridEditRowsModel)
Expand Down Expand Up @@ -2666,7 +2665,7 @@ Big thanks to the 4 contributors who made this release possible. Here are some h

## [4.0.0-alpha.19](https://github.com/mui-org/material-ui-x/compare/v4.0.0-alpha.18...v4.0.0-alpha.19)

###### _Feb 5, 2021_
_Feb 5, 2021_

Big thanks to the 5 contributors who made this release possible. Here are some highlights ✨:

Expand Down Expand Up @@ -2709,7 +2708,7 @@ Big thanks to the 5 contributors who made this release possible. Here are some h

## [4.0.0-alpha.18](https://github.com/mui-org/material-ui-x/compare/v4.0.0-alpha.17...v4.0.0-alpha.18)

###### _Jan 26, 2021_
_Jan 26, 2021_

Big thanks to the 5 contributors who made this release possible. Here are some highlights ✨:

Expand Down Expand Up @@ -2796,7 +2795,7 @@ Big thanks to the 5 contributors who made this release possible. Here are some h

## [4.0.0-alpha.17](https://github.com/mui-org/material-ui-x/compare/v4.0.0-alpha.15...v4.0.0-alpha.17)

###### _Jan 14, 2021_
_Jan 14, 2021_

Big thanks to the 4 contributors who made this release possible. Here are some highlights ✨:

Expand Down Expand Up @@ -2826,7 +2825,7 @@ Big thanks to the 4 contributors who made this release possible. Here are some h

## [4.0.0-alpha.15](https://github.com/mui-org/material-ui-x/compare/v4.0.0-alpha.14...v4.0.0-alpha.15)

###### _Jan 7, 2021_
_Jan 7, 2021_

Big thanks to the 2 contributors who made this release possible. Here are some highlights ✨:

Expand All @@ -2849,7 +2848,7 @@ Big thanks to the 2 contributors who made this release possible. Here are some h

## [4.0.0-alpha.14](https://github.com/mui-org/material-ui-x/compare/v4.0.0-alpha.13...v4.0.0-alpha.14)

###### _Dec 31, 2020_
_Dec 31, 2020_

Big thanks to the 5 contributors who made this release possible. Here are some highlights ✨:

Expand Down Expand Up @@ -2883,7 +2882,7 @@ Big thanks to the 5 contributors who made this release possible. Here are some h

## [4.0.0-alpha.13](https://github.com/mui-org/material-ui-x/compare/v4.0.0-alpha.12...v4.0.0-alpha.13)

###### _Dec 16, 2020_
_Dec 16, 2020_

Big thanks to the 4 contributors who made this release possible. Here are some highlights ✨:

Expand Down Expand Up @@ -2912,7 +2911,7 @@ Big thanks to the 4 contributors who made this release possible. Here are some h

## [4.0.0-alpha.12](https://github.com/mui-org/material-ui-x/compare/v4.0.0-alpha.11...v4.0.0-alpha.12)

###### _Dec 9, 2020_
_Dec 9, 2020_

Big thanks to the 6 contributors who made this release possible. Here are some highlights ✨:

Expand Down Expand Up @@ -2949,7 +2948,7 @@ Big thanks to the 6 contributors who made this release possible. Here are some h

## [4.0.0-alpha.11](https://github.com/mui-org/material-ui-x/compare/v4.0.0-alpha.10...v4.0.0-alpha.11)

###### _Dec 2, 2020_
_Dec 2, 2020_

Big thanks to the 8 contributors who made this release possible. Here are some highlights ✨:

Expand Down Expand Up @@ -3007,7 +3006,7 @@ Big thanks to the 8 contributors who made this release possible. Here are some h

## [4.0.0-alpha.10](https://github.com/mui-org/material-ui-x/compare/v4.0.0-alpha.9...v4.0.0-alpha.10)

###### _Nov 20, 2020_
_Nov 20, 2020_

### @material-ui/x-grid@v4.0.0-alpha.10 / @material-ui/data-grid@v4.0.0-alpha.10

Expand All @@ -3029,7 +3028,7 @@ Big thanks to the 8 contributors who made this release possible. Here are some h

## [4.0.0-alpha.9](https://github.com/mui-org/material-ui-x/compare/v4.0.0-alpha.8...v4.0.0-alpha.9)

###### _Nov 9, 2020_
_Nov 9, 2020_

### @material-ui/x-grid@v4.0.0-alpha.9 / @material-ui/data-grid@v4.0.0-alpha.9

Expand Down Expand Up @@ -3067,7 +3066,7 @@ Big thanks to the 8 contributors who made this release possible. Here are some h

## [4.0.0-alpha.8](https://github.com/mui-org/material-ui-x/compare/v4.0.0-alpha.7...v4.0.0-alpha.8)

###### _Oct 23, 2020_
_Oct 23, 2020_

### @material-ui/x-grid@v4.0.0-alpha.8 / @material-ui/data-grid@v4.0.0-alpha.8

Expand All @@ -3084,7 +3083,7 @@ Big thanks to the 8 contributors who made this release possible. Here are some h

## [4.0.0-alpha.7](https://github.com/mui-org/material-ui-x/compare/v4.0.0-alpha.6...v4.0.0-alpha.7)

###### _Oct 19, 2020_
_Oct 19, 2020_

### @material-ui/x-grid@v4.0.0-alpha.7 / @material-ui/data-grid@v4.0.0-alpha.7

Expand Down Expand Up @@ -3113,7 +3112,7 @@ Big thanks to the 8 contributors who made this release possible. Here are some h

## [4.0.0-alpha.6](https://github.com/mui-org/material-ui-x/compare/v4.0.0-alpha.2...v4.0.0-alpha.6)

###### _Sep 25, 2020_
_Sep 25, 2020_

### @material-ui/x-grid@v4.0.0-alpha.6 / @material-ui/data-grid@v4.0.0-alpha.6

Expand All @@ -3130,13 +3129,13 @@ Big thanks to the 8 contributors who made this release possible. Here are some h

## [4.0.0-alpha.2](https://github.com/mui-org/material-ui-x/compare/v4.0.0-alpha.1...v4.0.0-alpha.2)

###### _Sep 18, 2020_
_Sep 18, 2020_

- [DataGrid] Fix wrongly exported types (#298) @dtassone

## [4.0.0-alpha.1](https://github.com/mui-org/material-ui-x/compare/v0.1.67...v4.0.0-alpha.1)

###### _Sep 17, 2020_
_Sep 17, 2020_

This is the first public alpha release of the component after 6 months of development since the initial commit (March 15th 2020).
`@material-ui/data-grid` is licensed under MIT while `@material-ui/x-grid` is licensed under a commercial license.
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<!-- markdownlint-disable-next-line -->
<p align="center">
<a href="https://mui.com/" rel="noopener" target="_blank"><img width="150" src="https://mui.com/static/logo.svg" alt="MUI logo"></a>
</p>
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/api-docs/data-grid/grid-csv-export-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ import { GridCsvExportOptions } from '@mui/x-data-grid';
| <span class="prop-name optional">delimiter<sup><abbr title="optional">?</abbr></sup></span> | <span class="prop-type">string</span> | <span class="prop-default">','</span> | The character used to separate fields. |
| <span class="prop-name optional">fields<sup><abbr title="optional">?</abbr></sup></span> | <span class="prop-type">string[]</span> | | The columns exported.<br />This should only be used if you want to restrict the columns exports. |
| <span class="prop-name optional">fileName<sup><abbr title="optional">?</abbr></sup></span> | <span class="prop-type">string</span> | <span class="prop-default">`document.title`</span> | The string used as the file name. |
| <span class="prop-name optional">includeHeaders<sup><abbr title="optional">?</abbr></sup></span> | <span class="prop-type">boolean</span> | <span class="prop-default">true</span> | If `true, the first row of the CSV will include the headers of the grid. |
| <span class="prop-name optional">includeHeaders<sup><abbr title="optional">?</abbr></sup></span> | <span class="prop-type">boolean</span> | <span class="prop-default">true</span> | If `true`, the first row of the CSV will include the headers of the grid. |
| <span class="prop-name optional">utf8WithBom<sup><abbr title="optional">?</abbr></sup></span> | <span class="prop-type">boolean</span> | <span class="prop-default">false</span> | If `true`, the UTF-8 Byte Order Mark (BOM) prefixes the exported file.<br />This can allow Excel to automatically detect file encoding as UTF-8. |
2 changes: 2 additions & 0 deletions docs/src/pages/components/data-grid/editing/editing.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ If a cell is editable and has focus, any of the following interactions will star
- A keydown of any printable key, for instance `a`, `E`, `0`, or `$`
- A double click on the cell
- A call to `apiRef.current.setCellMode(id, field, 'edit')`.

```tsx
/**
* Set the cellMode of a cell.
Expand Down Expand Up @@ -170,6 +171,7 @@ If a cell is editable and has focus, any of the following interactions will star
- A <kbd class="key">Enter</kbd> keydown
- A double click on the cell
- A call to `apiRef.current.setRowMode(id, 'edit')`.

```tsx
/**
* Sets the mode of a row.
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"deduplicate": "node scripts/deduplicate.js",
"l10n": "babel-node -x .ts ./scripts/l10n.ts",
"stylelint": "stylelint '**/*.js' '**/*.ts' '**/*.tsx'",
"markdownlint": "markdownlint '**/*.md' --config .markdownlint.jsonc",
"prettier": "node ./scripts/prettier.js --branch master",
"prettier:all": "node ./scripts/prettier.js write",
"proptypes": "cross-env BABEL_ENV=development babel-node -i \"/node_modules/(?!@material-ui)/\" -x .ts,.tsx,.js ./docs/scripts/generateProptypes.ts",
Expand Down Expand Up @@ -123,6 +124,7 @@
"karma-sourcemap-loader": "^0.3.8",
"karma-webpack": "^5.0.0",
"lerna": "^4.0.0",
"markdownlint-cli": "^0.30.0",
"mocha": "^9.1.3",
"nyc": "^15.1.0",
"playwright": "^1.17.1",
Expand Down
9 changes: 0 additions & 9 deletions packages/grid/_modules_/grid/lib/lodash/readme.md

This file was deleted.

2 changes: 1 addition & 1 deletion packages/grid/_modules_/grid/models/gridExport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export interface GridCsvExportOptions extends GridExportOptions {
*/
utf8WithBom?: boolean;
/**
* If `true, the first row of the CSV will include the headers of the grid.
* If `true`, the first row of the CSV will include the headers of the grid.
* @default true
*/
includeHeaders?: boolean;
Expand Down
Loading

0 comments on commit 3cb8d3b

Please sign in to comment.