tc39 / proposal-import-attributes

Proposal for syntax to import ES modules with assertions
https://tc39.es/proposal-import-attributes/
Apache License 2.0
569 stars 32 forks source link

Fix most linting errors #138

Closed bakkot closed 1 year ago

bakkot commented 1 year ago

This fixes a majority of the errors you get when running npm run build -- --lint-spec. There's two left:

You can't enforce linting without fixing both of these, alas, and the first is not fixable without an update to ecmarkup - which I can do if we're decided on what is needed here.

nicolo-ribaudo commented 1 year ago

Thank you! For the second point, would this be valid or do I need to explicitly write a loop?

  1. If _referrer.[[LoadedModules]] contains a Record _record whose [[Specifier]] is _moduleRequest.[[Specifier]] and AttributesEqual(_record.[[Attributes]], _moduleRequest_.[[Attributes]]) is true, then
bakkot commented 1 year ago

Ecmarkup doesn't recognize "whose", but it does recognize "such that", so contains a Record _record_ such that _record_.[[Specifier]] should work.

nicolo-ribaudo commented 1 year ago

Thank you! Down to a single error now; I'll follow up on the first point once #133 is merged.