-
Notifications
You must be signed in to change notification settings - Fork 21
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
Add lowercase directives #283
Add lowercase directives #283
Conversation
I absolutely think is the way to do (
Quick Fixes, no, sadly not. But we can test what location of where the fix will take place. See this assert for example:
It's ensuring the ranges in the document, the error type and what the new value will be when the user quick fixes it. This has been a very suitable test so far. I see you are already doing this!
This is very odd! I am glad the Debug Tests worked from VS Code. I would recommend ensuring you used Let me know what else you need from me for this PR. |
@worksofliam, I've just started work on these changes but wanted to clarify one of yours points.
|
@richardm90 add for now. This keyword was added back in 2019 to json schema. https://json-schema.org/draft/2019-09/json-schema-validation#rfc.section.9.3 |
It looks as though the new JSON schema version isn't fully supported in VS Code yet but I've added the property. |
I tried
|
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.
@richardm90 A great PR! Thanks so much for your work here.
I am going to approve and merge today. One question I have for you: can I expect another PR from you after this that completely removes UppercaseDirectives
from the codebase (but perhaps left in rpglint.json
schema)?
@richardm90 Second ask: please update the docs with a PR over there when you can! |
@worksofliam Ah OK. I wasn't clear on deprecated stuff. I thought there would be a period of time before the feature was removed from the codebase. I'm happy to strip it out of the codebase though and presumably remove if from the docs as well? |
@richardm90 leave it in the docs for a while but leave a note that it's deprecated! |
Changes
There is a linter rule for uppercase directives but not for lowercase directives, I like my directives to be in lowercase, so I've added a new LowercaseDirectives rule.
Whilst making this change I also corrected a couple of issues.
Questions/Points
DirectivesCase: ['upper', lower']
? This would deprecate the existingUppercaseDirectives
rule.npm run test
to run the test suite but this failed with a module not found error. I'm pretty sure this is because the typescript needs to be compiled before the tests are run but I couldn't work out how this be done so used the 'Debug Tests' from the VS Code debugger instead.Checklist
console.log
s I added