stylelint / stylelint-demo

The online demo on the Stylelint website
https://stylelint.io/demo/
MIT License
15 stars 8 forks source link

Migrate `react-simple-code-editor` to `@monaco-editor/react` #307

Closed ybiquitous closed 2 years ago

ybiquitous commented 2 years ago

Which issue, if any, is this issue related to?

None.

Is there anything in the PR that needs further explanation?

This pull request migrates react-simple-code-editor to @monaco-editor/react.

Monaco Editor powers VS Code and is one of the most popular editors. Prism.js is no longer necessary.

Also, this change supports displaying endLine and endColumn.

Demo

https://user-images.githubusercontent.com/473530/165935385-b7621b0c-fb60-4969-8758-5efcea824c1d.mov

ybiquitous commented 2 years ago

@monaco-editor/react supports React 18, so there are no problems like #304.

$ npm v @monaco-editor/react peerDependencies
{
  'monaco-editor': '>= 0.25.0 < 1',
  react: '^16.8.0 || ^17.0.0 || ^18.0.0',
  'react-dom': '^16.8.0 || ^17.0.0 || ^18.0.0'
}