-
Notifications
You must be signed in to change notification settings - Fork 57
Conversation
…a.presetAlugn, change the property name of align to presetAlign to avoid potential conflict with align plugin
….presetAlign and cell.data.textAlign
Merge to the newest version
Merge from the base repository
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this @zhujinxuan
Let's remove the unnecessary changes to the package.json dev dependency and it's good
"mocha": "^3.0.1", | ||
"prettier": "^1.9.2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prettier
and others should be a dependency of eslint-config-gitbook already
We will just keep the dev dependencies as they were (except for slate, slate-hyperscript etc.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prettier is a devDependency
and peerDependency
of the eslint-config-gitbook, and then it is not installed in npm i
(not sure how yarn does). About eslint-plugin-prettier
, eslint-config-gitbook
is dependent on eslint-config-prettier
rather than eslint-plugin-prettier
, and eslint-plugin-prettier
is the peer dependency of eslint-config-gitbook
The npm has annoying problems about different types of dependency...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are two options: change the pakcage.json of the eslint-config-gitbook
to add them as dependency, or to change the package.json of slate-edit-table and slate-edit-list.
Which one do you think it would be better?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated about yarn: yarn install --peer
cannot automatically install eslint, prettier and other packages (which are peer dependencies of eslint-config-gitbook) if these packages are removed from this package.json.
0d9e1ae
to
6606037
Compare
Just curious as to the different approach here: but my forked library, slate-deep-table -- which has diverged quite a bit more as I updated it for 0.32 separately -- is now successfully doing almost all of the validation through the See it here: https://github.com/jasonphillips/slate-deep-table/blob/master/lib/makeSchema.js I don't know what the real performance difference is, but it seemed to me to be cleaner and more canonical to express most of these validations (must contain, must be within, etc) by using the schema syntax, and only get into the more fine-grained validateNode logic for checking the table's column matching, since that requires a deeper examination. At first I was running into the dreaded repeated validations issue that is still ongoing in slate, but with writing them carefully (and keeping |
@jasonphillips I would prefer the normalization by schema. I am not sure why slate-edit-table is using validateNode. This is my guess about why slate-edit-table is using validateNode:
If @Soreine appreciate it, I will submit a PR replace some |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jasonphillips BTW, just wondering how do you install the peer dependency of prettier, eslint-config-prettier during the development. I tried yarn install
and yarn install --peer
, and both are unable to get prettier in local node_modules
"mocha": "^3.0.1", | ||
"prettier": "^1.9.2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated about yarn: yarn install --peer
cannot automatically install eslint, prettier and other packages (which are peer dependencies of eslint-config-gitbook) if these packages are removed from this package.json.
Remove the prettier packages in the most recent commit |
ed9385c
to
0176c9e
Compare
Concerning the schema, we chose to keep the old way of doing because of current bugs, just as a safety measure. |
Any update on this? I'd love to use this PR in production. |
@Soreine Could you merge this PR as this PR has fixed the Thank you. |
f36ba5f
to
a279282
Compare
a279282
to
e0891bb
Compare
Recent commits in PR updates the babel config according to the recent changes in Slate |
This reverts commit 0176c9e.
Sorry, I understand now. I'm keeping the extra dev-dependencies. It was working on my end because I had some projects that was using them in my PATH. |
Sorry for the delay, thanks a lot everyone! |
@Soreine I would recommend to remove the dev-dependency and add these packages to the |
In Slate-0.32, the kind is renamed to object. This plugin renames the
kind
toobject
.Sorry for the auto merge failed; There is a small conflict in package.json by my mistake.