-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
fix(cli): add compilerOptions.lib
examples to config-file.v1.json
#28226
fix(cli): add compilerOptions.lib
examples to config-file.v1.json
#28226
Conversation
"type": "string", | ||
"examples": [ |
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.
Shouldn't this be oneOf
with a string or an enum? Seems like adding a custom library will cause a diagnostic.
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.
Side note: we should add an automated test to make sure this is up to date, like in
Line 705 in a9f404e
fn all_lint_rules_are_listed_in_schema_file() { |
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.
I think it would be good if it could be autocompletion for now as in unstable features.
deno/cli/schemas/config-file.v1.json
Lines 561 to 587 in 2212d7d
"unstable": { | |
"type": "array", | |
"description": "List of unstable features to enable.", | |
"items": { | |
"type": "string", | |
"examples": [ | |
"broadcast-channel", | |
"bare-node-builtins", | |
"byonm", | |
"cron", | |
"detect-cjs", | |
"ffi", | |
"fs", | |
"fmt-component", | |
"fmt-sql", | |
"http", | |
"kv", | |
"net", | |
"node-globals", | |
"sloppy-imports", | |
"temporal", | |
"unsafe-proto", | |
"webgpu", | |
"worker-options" | |
] | |
} | |
}, |
We could cover everything as an enum like lint rules, but I think it would be noisy if autocompletion is applied to deno.shared_globals
, es2015.collection
, and other types that most users don't use.
Lines 11 to 125 in 2212d7d
"lib.deno_webgpu.d.ts", | |
"lib.deno.ns.d.ts", | |
"lib.deno.unstable.d.ts", | |
"lib.deno.window.d.ts", | |
"lib.deno.worker.d.ts", | |
"lib.deno.shared_globals.d.ts", | |
"lib.deno.ns.d.ts", | |
"lib.deno.unstable.d.ts", | |
"lib.deno_console.d.ts", | |
"lib.deno_url.d.ts", | |
"lib.deno_web.d.ts", | |
"lib.deno_fetch.d.ts", | |
"lib.deno_websocket.d.ts", | |
"lib.deno_webstorage.d.ts", | |
"lib.deno_canvas.d.ts", | |
"lib.deno_crypto.d.ts", | |
"lib.deno_cache.d.ts", | |
"lib.deno_net.d.ts", | |
"lib.deno_broadcast_channel.d.ts", | |
"lib.decorators.d.ts", | |
"lib.decorators.legacy.d.ts", | |
"lib.dom.asynciterable.d.ts", | |
"lib.dom.d.ts", | |
"lib.dom.extras.d.ts", | |
"lib.dom.iterable.d.ts", | |
"lib.es2015.collection.d.ts", | |
"lib.es2015.core.d.ts", | |
"lib.es2015.d.ts", | |
"lib.es2015.generator.d.ts", | |
"lib.es2015.iterable.d.ts", | |
"lib.es2015.promise.d.ts", | |
"lib.es2015.proxy.d.ts", | |
"lib.es2015.reflect.d.ts", | |
"lib.es2015.symbol.d.ts", | |
"lib.es2015.symbol.wellknown.d.ts", | |
"lib.es2016.array.include.d.ts", | |
"lib.es2016.d.ts", | |
"lib.es2016.full.d.ts", | |
"lib.es2016.intl.d.ts", | |
"lib.es2017.arraybuffer.d.ts", | |
"lib.es2017.d.ts", | |
"lib.es2017.date.d.ts", | |
"lib.es2017.full.d.ts", | |
"lib.es2017.intl.d.ts", | |
"lib.es2017.object.d.ts", | |
"lib.es2017.sharedmemory.d.ts", | |
"lib.es2017.string.d.ts", | |
"lib.es2017.typedarrays.d.ts", | |
"lib.es2018.asyncgenerator.d.ts", | |
"lib.es2018.asynciterable.d.ts", | |
"lib.es2018.d.ts", | |
"lib.es2018.full.d.ts", | |
"lib.es2018.intl.d.ts", | |
"lib.es2018.promise.d.ts", | |
"lib.es2018.regexp.d.ts", | |
"lib.es2019.array.d.ts", | |
"lib.es2019.d.ts", | |
"lib.es2019.full.d.ts", | |
"lib.es2019.intl.d.ts", | |
"lib.es2019.object.d.ts", | |
"lib.es2019.string.d.ts", | |
"lib.es2019.symbol.d.ts", | |
"lib.es2020.bigint.d.ts", | |
"lib.es2020.d.ts", | |
"lib.es2020.date.d.ts", | |
"lib.es2020.full.d.ts", | |
"lib.es2020.intl.d.ts", | |
"lib.es2020.number.d.ts", | |
"lib.es2020.promise.d.ts", | |
"lib.es2020.sharedmemory.d.ts", | |
"lib.es2020.string.d.ts", | |
"lib.es2020.symbol.wellknown.d.ts", | |
"lib.es2021.d.ts", | |
"lib.es2021.full.d.ts", | |
"lib.es2021.intl.d.ts", | |
"lib.es2021.promise.d.ts", | |
"lib.es2021.string.d.ts", | |
"lib.es2021.weakref.d.ts", | |
"lib.es2022.array.d.ts", | |
"lib.es2022.d.ts", | |
"lib.es2022.error.d.ts", | |
"lib.es2022.full.d.ts", | |
"lib.es2022.intl.d.ts", | |
"lib.es2022.object.d.ts", | |
"lib.es2022.regexp.d.ts", | |
"lib.es2022.string.d.ts", | |
"lib.es2023.array.d.ts", | |
"lib.es2023.collection.d.ts", | |
"lib.es2023.d.ts", | |
"lib.es2023.full.d.ts", | |
"lib.es2023.intl.d.ts", | |
"lib.es2024.arraybuffer.d.ts", | |
"lib.es2024.collection.d.ts", | |
"lib.es2024.d.ts", | |
"lib.es2024.full.d.ts", | |
"lib.es2024.object.d.ts", | |
"lib.es2024.promise.d.ts", | |
"lib.es2024.regexp.d.ts", | |
"lib.es2024.sharedmemory.d.ts", | |
"lib.es2024.string.d.ts", | |
"lib.es5.d.ts", | |
"lib.es6.d.ts", | |
"lib.esnext.array.d.ts", | |
"lib.esnext.collection.d.ts", | |
"lib.esnext.d.ts", | |
"lib.esnext.decorators.d.ts", | |
"lib.esnext.disposable.d.ts", | |
"lib.esnext.full.d.ts", | |
"lib.esnext.intl.d.ts", | |
"lib.esnext.iterator.d.ts", | |
"lib.scripthost.d.ts", | |
"lib.webworker.asynciterable.d.ts", | |
"lib.webworker.d.ts", | |
"lib.webworker.importscripts.d.ts", | |
"lib.webworker.iterable.d.ts", |
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.
btw, I think it would be better to change to enum and add tests for unstable features, so I'll work on another PR.
cli/schemas/lint-rules.v1.json
Outdated
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.
Why change these files? What's the reason?
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.
Only config-file.v1.json had the latest version of JSON Schema, the other files were 2 versions old. I simply updated them.
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.
If it is better to separate them as different PR, I will do so 🙇
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.
I reverted these files and created #28252
compilerOptions.lib
examples to schemacompilerOptions.lib
examples to config-file.v1.json
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.
Sweet, thanks!
closes #28222