freeCodeCamp/freeCodeCamp
Show warning to users when they try to source the wrong files
クローズ
#49,492 opened on 2023/02/24
help wanted
Repository metrics
- Stars
- (444,744 個のスター)
- PR merge metrics
- (平均マージ 6d 11h) (30d で 253 merged PRs)
説明
Is your feature request related to a problem? Please describe.
When a user tries to source style.css (rather than styles.css) this fails silently. Similarly, sourcing anything other than script.js will result in a rather cryptic error: Uncaught SyntaxError: Unexpected token '<'.
This is needlessly frustrating.
Describe the solution you'd like
The console should show a helpful warning. For example
You have tried to source style.css, but that does not exist. The only files that can be sourced are styles.css and script.js.
Describe alternatives you've considered
Nothing comes to mind.
Additional context
No response