Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CodeMirror to Additional CSS / Custom HTML block #60155

Open
wants to merge 23 commits into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 21 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,31 @@ const restrictedImports = [
message:
"edit-widgets is a WordPress top level package that shouldn't be imported into other packages",
},
{
name: 'codemirror',
message:
'Please use dynamic import (`import()`) instead since it is a large dependency.',
},
{
name: '@codemirror/commands',
message:
'Please use dynamic import (`import()`) instead since it is a large dependency.',
},
{
name: '@codemirror/lang-css',
message:
'Please use dynamic import (`import()`) instead since it is a large dependency.',
},
{
name: '@codemirror/lang-html',
message:
'Please use dynamic import (`import()`) instead since it is a large dependency.',
},
{
name: '@codemirror/view',
message:
'Please use dynamic import (`import()`) instead since it is a large dependency.',
},
Comment on lines +79 to +103
Copy link
Member

Choose a reason for hiding this comment

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

This is a bit repetitive. Does it make sense to use the patterns option to combine them into a single restricted import?

];

module.exports = {
Expand Down
Loading
Loading