-
Notifications
You must be signed in to change notification settings - Fork 146
Add discouraged
to schema (and with
statement demo feature)
#2388
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
2404295
Add `discouraged` to schema
ddbeck 99cd502
Add discouraged `with` statement feature
ddbeck 855b48e
Remove unused variable
ddbeck 308a3ef
Add data guidelines for discouraged
ddbeck 036e19e
Add discouraged usage guidelines
ddbeck 78311b6
Apply prettier fixes
ddbeck 3a5896b
Relate `discouraged` to `status.baseline` more explicitly
ddbeck eb62063
Find out why CI is passing
ddbeck fc94af6
Remove `non-standard` from spec language bullet
ddbeck a9a00dc
Merge branch 'main' into discouraged-data
ddbeck d1dbb46
Refresh schema
ddbeck 54fdc49
Merge branch 'main' into discouraged-data
ddbeck File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add discouraged
with
statement feature
- Loading branch information
commit 99cd5025d2bff980475c4efa3e476c44f64da23a
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: with | ||
description: The `with` JavaScript statement adds a given object to the chain of scopes used to evaluate names. | ||
spec: https://tc39.es/ecma262/multipage/ecmascript-language-statements-and-declarations.html#sec-with-statement | ||
group: javascript | ||
discouraged: | ||
# One thing that is potentially missing here is a "reason" like this: | ||
|
||
# reason: browser-warning | ||
# reason: spec-caution | ||
# reason: pending-removal | ||
|
||
# This would allow us to signal to tools how "fatal" the discouragement is | ||
# (e.g., pending-removal should trigger noisy errors for developers but spec | ||
# caution would not). I'm not sure the full range of these yet; I think it | ||
# might be easier to choose the set of reasons after we've enumerated a bunch | ||
# of discouraged features. | ||
according_to: | ||
- https://tc39.es/ecma262/multipage/ecmascript-language-statements-and-declarations.html#sec-with-statement | ||
alternatives: | ||
- destructuring | ||
compat_features: | ||
- javascript.statements.with | ||
- javascript.builtins.Symbol.unscopables | ||
- javascript.builtins.Array.@@unscopables |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Generated from: with.yml | ||
# Do not edit this file by hand. Edit the source file instead! | ||
|
||
status: | ||
baseline: false | ||
support: | ||
chrome: "38" | ||
chrome_android: "38" | ||
edge: "12" | ||
firefox: "48" | ||
firefox_android: "48" | ||
safari: "10" | ||
safari_ios: "10" | ||
Comment on lines
+5
to
+13
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Given the current Baseline definition, this is correct. That said, I expect consumers (like MDN and caniuse) to choose to suppress the Baseline information when there's a discouragement. |
||
compat_features: | ||
# baseline: high | ||
# baseline_low_date: 2016-08-02 | ||
# baseline_high_date: 2019-02-02 | ||
# support: | ||
# chrome: "38" | ||
# chrome_android: "38" | ||
# edge: "12" | ||
# firefox: "48" | ||
# firefox_android: "48" | ||
# safari: "9" | ||
# safari_ios: "9" | ||
- javascript.builtins.Symbol.unscopables | ||
|
||
# baseline: high | ||
# baseline_low_date: 2016-09-20 | ||
# baseline_high_date: 2019-03-20 | ||
# support: | ||
# chrome: "38" | ||
# chrome_android: "38" | ||
# edge: "12" | ||
# firefox: "48" | ||
# firefox_android: "48" | ||
# safari: "10" | ||
# safari_ios: "10" | ||
- javascript.builtins.Array.@@unscopables | ||
|
||
# baseline: false | ||
# support: | ||
# chrome: "1" | ||
# chrome_android: "18" | ||
# edge: "12" | ||
# firefox: "1" | ||
# firefox_android: "4" | ||
# safari: "1" | ||
# safari_ios: "1" | ||
- javascript.statements.with |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.