Skip to content

Commit

Permalink
[docs] Improve markdownlint (mui#6518)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari authored Oct 15, 2022
1 parent fe56c20 commit f16e2db
Show file tree
Hide file tree
Showing 6 changed files with 90 additions and 112 deletions.
3 changes: 3 additions & 0 deletions .markdownlint-cli2.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const baseline = require('@mui/monorepo/.markdownlint-cli2.cjs');

module.exports = baseline;
26 changes: 0 additions & 26 deletions .markdownlint.jsonc

This file was deleted.

4 changes: 0 additions & 4 deletions .markdownlintignore

This file was deleted.

18 changes: 9 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ We'd like to offer a big thanks to the 8 contributors who made this release poss
- [`MultiInputDateRangeField` / `SingleInputDateRangeField`](https://next.mui.com/x/react-date-pickers/date-range-field/) to edit date range
- [`MultiInputTimeRangeField`](https://next.mui.com/x/react-date-pickers/time-range-field/) to edit time range with two inputs
- [`MultiInputDateTimeRangeField`](https://next.mui.com/x/react-date-pickers/date-time-range-field/) to edit date and time range with two inputs

⚠️ These components are unstable.
They might receive breaking changes on their props to have the best components possible by the time of the stable release.

Expand Down Expand Up @@ -71,7 +71,7 @@ We'd like to offer a big thanks to the 8 contributors who made this release poss
The `DialogProps` prop has been replaced by a `dialog` component props slot on responsive and mobile pickers:

```diff
// Same on MobileDatePicker, DateTimePicker, MobileDateTimePicker,
// Same on MobileDatePicker, DateTimePicker, MobileDateTimePicker,
// TimePicker, MobileTimePicker, DateRangePicker and MobileDateRangePicker.
<DatePicker
- DialogProps={{ backgroundColor: 'red' }}
Expand All @@ -82,7 +82,7 @@ We'd like to offer a big thanks to the 8 contributors who made this release poss
The `PaperProps` prop has been replaced by a `desktopPaper` component props slot on all responsive and desktop pickers:

```diff
// Same on DesktopDatePicker, DateTimePicker, DesktopDateTimePicker,
// Same on DesktopDatePicker, DateTimePicker, DesktopDateTimePicker,
// TimePicker, DesktopTimePicker, DateRangePicker and DesktopDateRangePicker.
<DatePicker
- PaperProps={{ backgroundColor: 'red' }}
Expand All @@ -93,7 +93,7 @@ We'd like to offer a big thanks to the 8 contributors who made this release poss
The `PopperProps` prop has been replaced by a `popper` component props slot on all responsive and desktop pickers:

```diff
// Same on DesktopDatePicker, DateTimePicker, DesktopDateTimePicker,
// Same on DesktopDatePicker, DateTimePicker, DesktopDateTimePicker,
// TimePicker, DesktopTimePicker, DateRangePicker and DesktopDateRangePicker.
<DatePicker
- PopperProps={{ onClick: handleClick }}
Expand All @@ -104,7 +104,7 @@ We'd like to offer a big thanks to the 8 contributors who made this release poss
The `TransitionComponent` prop has been replaced by a `DesktopTransition` component slot on all responsive and desktop pickers:

```diff
// Same on DesktopDatePicker, DateTimePicker, DesktopDateTimePicker,
// Same on DesktopDatePicker, DateTimePicker, DesktopDateTimePicker,
// TimePicker, DesktopTimePicker, DateRangePicker and DesktopDateRangePicker.
<DatePicker
- TransitionComponent={Fade}
Expand All @@ -115,14 +115,14 @@ We'd like to offer a big thanks to the 8 contributors who made this release poss
The `TrapFocusProps` prop has been replaced by a `desktopTrapFocus` component props slot on all responsive and desktop pickers:

```diff
// Same on DesktopDatePicker, DateTimePicker, DesktopDateTimePicker,
// Same on DesktopDatePicker, DateTimePicker, DesktopDateTimePicker,
// TimePicker, DesktopTimePicker, DateRangePicker and DesktopDateRangePicker.
<DatePicker
- TrapFocusProps={{ isEnabled: () => false }}
+ componentsProps={{ desktopTrapFocus: { isEnabled: () => false }}}
/>
```

- The view components allowing to pick a date or parts of a date without an input have been renamed to better fit their usage:

```diff
Expand Down Expand Up @@ -506,9 +506,9 @@ You can find more information about the new api, including how to set those tran
- The deprecated `locale` prop of the `LocalizationProvider` component have been renamed `adapterLocale`:

```diff
<LocalizationProvider
<LocalizationProvider
dateAdapter={AdapterDayjs}
- locale="fr"
- locale="fr"
+ adapterLocale="fr"
>
{children}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"jsonlint": "node ./scripts/jsonlint.js",
"eslint": "eslint . --cache --report-unused-disable-directives --ext .js,.ts,.tsx --max-warnings 0",
"eslint:ci": "eslint . --report-unused-disable-directives --ext .js,.ts,.tsx --max-warnings 0",
"markdownlint": "markdownlint '**/*.md' --config .markdownlint.jsonc",
"markdownlint": "markdownlint-cli2 \"**/*.md\"",
"prettier": "node ./scripts/prettier.js --branch next",
"prettier:all": "node ./scripts/prettier.js write",
"proptypes": "cross-env BABEL_ENV=development babel-node -i \"/node_modules/(?!@mui)/\" -x .ts,.tsx,.js ./docs/scripts/generateProptypes.ts",
Expand Down Expand Up @@ -145,7 +145,7 @@
"karma-sourcemap-loader": "^0.3.8",
"karma-webpack": "^5.0.0",
"lerna": "^5.6.2",
"markdownlint-cli": "^0.31.1",
"markdownlint-cli2": "^0.5.1",
"mocha": "^10.0.0",
"nyc": "^15.1.0",
"playwright": "^1.21.1",
Expand Down
Loading

0 comments on commit f16e2db

Please sign in to comment.