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

basic linting behind --lint-spec #199

Merged
merged 15 commits into from
May 16, 2020
Merged

basic linting behind --lint-spec #199

merged 15 commits into from
May 16, 2020

Conversation

bakkot
Copy link
Contributor

@bakkot bakkot commented May 9, 2020

This implements several of the ideas in #173, and hopefully provides a scaffolding which allows contributing more lint rules relatively easily.

Depends on tc39/ecmarkdown#69 being released; marked as a draft until then. Edit: done, ecmarkdown 5.0.1 is released and used in this PR.

package.json Outdated Show resolved Hide resolved
src/lint/lint.ts Outdated Show resolved Hide resolved
src/lint/lint.ts Outdated Show resolved Hide resolved
src/lint/lint.ts Outdated Show resolved Hide resolved
Statement[${M}a]: \`;\`
</emu-grammar>
`,
"Parameter 'a' is unused."
Copy link
Member

Choose a reason for hiding this comment

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

Are these messages being passed through from Grammarkdown's built-in linting? I don't like how its capitalisation and quoting are inconsistent with ours. And I prefer that ours does not change because it's better.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Alas, they are.

Copy link
Member

Choose a reason for hiding this comment

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

Should we prefix grammarkdown messages or somehow indicate they came from grammarkdown?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ehhh, that doesn't seem like a distinction users are likely to care about.

test/lint.js Outdated Show resolved Hide resolved
test/lint.js Outdated Show resolved Hide resolved
test/lint.js Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
@bakkot bakkot marked this pull request as ready for review May 15, 2020 22:45
@bakkot bakkot merged commit bf29f13 into tc39:master May 16, 2020
@bakkot bakkot deleted the lint-grammar branch May 16, 2020 03:15
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