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

feat(rule,check): add new apis to run a rule synchronously #1467

Merged
merged 7 commits into from
May 10, 2019
Merged

Conversation

straker
Copy link
Contributor

@straker straker commented Apr 1, 2019

Note: the files were mostly copied from the asynchronous versions and modified to be run in a synchronous way. A few tests were deleted that no longer applied to a synchronous version.

Linked issue: #1550

Reviewer checks

Required fields, to be filled out by PR reviewer(s)

  • Follows the commit message policy, appropriate for next version
  • Has documentation updated, a DU ticket, or requires no documentation change
  • Includes new tests, or was unnecessary
  • Code is reviewed for security by: @WilcoFiers

@straker straker requested a review from a team as a code owner April 1, 2019 22:16
@straker straker changed the title feat: add new apis to support running a rule in non-browser environment feat: add new apis to run a rule synchronously Apr 4, 2019
@straker straker changed the title feat: add new apis to run a rule synchronously feat(rule,check): add new apis to run a rule synchronously Apr 5, 2019
jeeyyy
jeeyyy previously requested changes Apr 9, 2019
Copy link
Contributor

@jeeyyy jeeyyy left a comment

Choose a reason for hiding this comment

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

Have not looked at tests yet. But left some quick inline comments. Will have a thorough look after the changes are made.

lib/core/base/check.js Outdated Show resolved Hide resolved
lib/core/base/check.js Outdated Show resolved Hide resolved
lib/core/base/check.js Outdated Show resolved Hide resolved
lib/core/base/check.js Outdated Show resolved Hide resolved
lib/core/base/rule.js Outdated Show resolved Hide resolved
lib/core/base/rule.js Show resolved Hide resolved
lib/core/base/rule.js Show resolved Hide resolved
Copy link
Contributor

@WilcoFiers WilcoFiers left a comment

Choose a reason for hiding this comment

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

Couple of small points.

lib/core/base/rule.js Outdated Show resolved Hide resolved
test/core/base/rule.js Outdated Show resolved Hide resolved
test/core/base/check.js Show resolved Hide resolved
@paulirish
Copy link
Contributor

Prepare for running in non-browser environments by allowing a rule to run synchronously.

Just curious, but why not run the rules with their async hops in these environments?

Also, non-browser environments that have DOM nodes?? :) Is this specifically about JSDOM compat?

@stephenmathieson
Copy link
Member

@paulirish there's a new product we're hacking on that has these requirements. Stay tuned :)

@straker straker merged commit 84094a1 into develop May 10, 2019
@straker straker deleted the linting branch May 10, 2019 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants