-
Notifications
You must be signed in to change notification settings - Fork 101
Decide on rules for naming Actions #26
Comments
The current lint script gives an error with variable and function names not in camelCase:
If new actions with names on the line of "URL From Text" will be added to Shortcuts, the proposed change won't work without modifying the linter. It has also to be noted that in standard JS, locally upper-cased strings aren't always respected for acronyms. As an example: we have |
@joshfarrant, since #47 has been merged, now all the action function names can be replaced with the proposed ones. In that pull request I added PascalCased variable name validation in |
@xAlien95 I spotted that in your PR and was wondering if it would do the trick. I'm happy with that then, I'll go through and make the adjustments now. |
The naming of |
The original shown name is "Run JavaScript on Web Page" if I recall correctly, so |
Cool, I’ll adjust those too then. |
CONTRIBUTING.md currently states
This works fine for the majority of actions, however it's not perfect when naming actions with upper case words in the name, eg
SSH
andURL
.We might want to consider tweaking the rule to allow for action names to keep upper-case strings as upper-case. The table below shows some examples of this.
getContentsOfURL
getContentsOfUrl
getCurrentIPAddress
getCurrentIPAddress
runScriptOverSSH
runScriptOverSSH
URL
url
@xAlien95 has pointed out:
Does anyone foresee any issues with one solution over the other? If not, I'll probably go with the proposed change.
The text was updated successfully, but these errors were encountered: