You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Change "readable" to "readonly" and "writeable" to "writable" in new globals configuration #11359
#11338 merged a change that allowed globals to be specified as "writeable" or "readable". I believe "readable" doesn't accurately convey the setting. All variables present in the environment are readable, including writable variables
Also, "writeable" is misspelled. It should be spelled "writable".
Your take on the correct solution to problem.
Change "readable" to "readonly".
Change "writeable" to "writable".
Are you willing to submit a pull request to implement this change?
I think the intention for "writeable" was to match the scope analysis property name, even though it is misspelled. (See this discussion for more info.)
Yes, the spelling of "writeable" is intentional (see #11338 (comment)). "Writeable" is a valid alternate spelling of the word "writable", although it is less common.
@not-an-aardvark I don't think we really had consensus around "readable"-- it was offered as an option for consistency with writeable, but it wasn't ever really discussed one way or the other. Unfortunately, I didn't think to raise the question when reviewing the PR.
I do like "readonly" (with no punctuation) better than "readable".
+1 to "readonly", as "readable" by itself doesn't mean "also, not writeable".
Strictly speaking "writ(e)able" by itself doesn't mean "also readable", and so you could use "readwrite", but I think in context it is probably clear that writ(e)able variables are always readable.
At this point it doesn't seem ideal to bikeshed over names, given that the feature has already shipped and our options are limited by compatibility requirements.
Personally, I think "readable" and "writeable" are sufficiently clear to imply the correct meaning. I have no objection to adding aliases like "readonly", "readwrite", and "writable", although I'm also not convinced that they're really needed, and they might just lead to more confusion if a user sees "readwrite" and "writable" in a config and assumes they mean something different.
The potential for typos will be smaller if we disallow unexpected strings in this position in the next major release.
My apologies, I actually didn't realize this feature had shipped when I opened this issue.
I understand the intention behind "writeable", but I also think that's significant cognitive overhead for end users (especially when I see red squigglies everywhere I type "writeable"), and I did think we had decided on "readonly" previously. I'm sorry I haven't been paying close enough attention to PRs as they come through, otherwise I wouldn't have mentioned all of this earlier. I'll do better in the future.
What I'd like to suggest is that we:
Add "readonly" as an alias for "readable"
Add "writable" as an alias for "writeable"
Change the docs to use "readonly" and "writable" while mentioning that "readable" and "writeable" are deprecated.
I'd slightly prefer adding "readonly" and "writable" as aliases rather than officially deprecating the existing versions (since we already have the scope analysis property called "writeable"), but I'm fine with that plan.
Activity
platinumazure commentedon Feb 6, 2019
I think the intention for "writeable" was to match the scope analysis property name, even though it is misspelled. (See this discussion for more info.)
I'm okay with switching to "readonly".
not-an-aardvark commentedon Feb 6, 2019
Yes, the spelling of "writeable" is intentional (see #11338 (comment)). "Writeable" is a valid alternate spelling of the word "writable", although it is less common.
"Readable" was also discussed in #9940 (comment).
platinumazure commentedon Feb 6, 2019
@not-an-aardvark I don't think we really had consensus around "readable"-- it was offered as an option for consistency with writeable, but it wasn't ever really discussed one way or the other. Unfortunately, I didn't think to raise the question when reviewing the PR.
I do like "readonly" (with no punctuation) better than "readable".
edg2s commentedon Feb 6, 2019
+1 to "readonly", as "readable" by itself doesn't mean "also, not writeable".
Strictly speaking "writ(e)able" by itself doesn't mean "also readable", and so you could use "readwrite", but I think in context it is probably clear that writ(e)able variables are always readable.
not-an-aardvark commentedon Feb 6, 2019
At this point it doesn't seem ideal to bikeshed over names, given that the feature has already shipped and our options are limited by compatibility requirements.
Personally, I think "readable" and "writeable" are sufficiently clear to imply the correct meaning. I have no objection to adding aliases like "readonly", "readwrite", and "writable", although I'm also not convinced that they're really needed, and they might just lead to more confusion if a user sees "readwrite" and "writable" in a config and assumes they mean something different.
The potential for typos will be smaller if we disallow unexpected strings in this position in the next major release.
not-an-aardvark commentedon Feb 6, 2019
Relabeling as "enhancement" because the current behavior is working as intended.
nzakas commentedon Feb 8, 2019
My apologies, I actually didn't realize this feature had shipped when I opened this issue.
I understand the intention behind "writeable", but I also think that's significant cognitive overhead for end users (especially when I see red squigglies everywhere I type "writeable"), and I did think we had decided on "readonly" previously. I'm sorry I haven't been paying close enough attention to PRs as they come through, otherwise I wouldn't have mentioned all of this earlier. I'll do better in the future.
What I'd like to suggest is that we:
not-an-aardvark commentedon Feb 9, 2019
I'd slightly prefer adding "readonly" and "writable" as aliases rather than officially deprecating the existing versions (since we already have the scope analysis property called "writeable"), but I'm fine with that plan.
nzakas commentedon Feb 12, 2019
Okay, looks like we have a general agreement about moving forward. I'll throw together a PR when I'm able.
Update: Use 'readonly' and 'writable' for globals (fixes #11359)
Update eslint to the latest version 🚀 (#10)
Update eslint to the latest version 🚀 (#3949)