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: support check evaluate functions as an id string #2162

Merged
merged 1 commit into from
Apr 15, 2020
Merged

Conversation

straker
Copy link
Contributor

@straker straker commented Apr 13, 2020

Creating the stub for the map that will allow checks to use a string id to access shared evaluate and after functions. Once checks have been converted to es modules we can add them all to the map and have the feature working.

Closes issue:

Reviewer checks

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

  • Follows the commit message policy, appropriate for next version
  • Code is reviewed for security

@straker straker requested a review from a team as a code owner April 13, 2020 15:51
@WilcoFiers WilcoFiers changed the title feat(metadata-function-map): add metadata function map to support check evaulate functions as an id string chore(metadata-function-map): add metadata function map to support check evaluate functions as an id string Apr 14, 2020
@WilcoFiers WilcoFiers changed the title chore(metadata-function-map): add metadata function map to support check evaluate functions as an id string feat: support check evaluate functions as an id string Apr 14, 2020
// TODO: es-modules-rules
// import all check evaluate and after functions, and all rule matches functions

const metadataFunctionMap = new Map();
Copy link
Member

Choose a reason for hiding this comment

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

I thought we were going to have a map for checks and a map for rules? How will we differenciate between the different types of functions here?

For example:

map.set('some-fn', (some, args) => { /* ... */ })

Is the above for a check eval, a check after or a rule matches?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The id for each function will be unique and include the type in the name. E.g. aria-allowed-attr-matches, aria-allowed-attr-evaluate, aria-allowed-attr-after

@straker straker merged commit ec9b931 into develop Apr 15, 2020
@straker straker deleted the metadataMap branch April 15, 2020 21:36
stephenmathieson added a commit that referenced this pull request Apr 16, 2020
Had several conflicts, may be a bad merge.... 🤷

* core-utils-modules:
  refactor: update filenames of check evaluate and rule matches (#2160)
  feat(metadata-function-map): add metadata function map to support check evaulate functions as an id string (#2162)
  put back check
  skip rather than comment
  comment for now
  moar tests
  refactor(core/reporters): Convert to ES modules (#2154)
  fix(duplicate-id): list the duplicate id in message (#2163)
  chore: convert commons to ES Modules (#2155)
  refactor(Audit): Convert to ES5 class (#2157)
  refactor(core/utils): Convert to ES modules
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.

3 participants