Skip to content
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

🚀 Feature: Remove the long-deprecated --opts option #5243

Open
3 tasks done
JoshuaKGoldberg opened this issue Oct 30, 2024 · 0 comments
Open
3 tasks done

🚀 Feature: Remove the long-deprecated --opts option #5243

JoshuaKGoldberg opened this issue Oct 30, 2024 · 0 comments
Labels
status: in triage a maintainer should (re-)triage (review) this issue type: feature enhancement proposal
Milestone

Comments

@JoshuaKGoldberg
Copy link
Member

Feature Request Checklist

Overview

As of #4175, mocha.opts is deprecated and non-functional. I've yet to see anybody use it in real projects. But the code still exists:

mocha/lib/cli/run.js

Lines 341 to 346 in e3da641

if (argv.opts) {
throw createUnsupportedError(
`--opts: configuring Mocha via 'mocha.opts' is DEPRECATED and no longer supported.
Please use a configuration file instead.`
);
}

This is dead weight on the project. IMO there's no real need to keep it around given how it's been deprecated with a loud warning & migration path (using a config instead) for 5 years.

Suggested Solution

I propose we remove it in a future major version, such as Mocha 12.

Alternatives

We could leave it in, but all it does now is throw createUnsupportedError.

Additional Info

Similar sibling issue: #5242

@JoshuaKGoldberg JoshuaKGoldberg added status: in triage a maintainer should (re-)triage (review) this issue type: feature enhancement proposal labels Oct 30, 2024
@JoshuaKGoldberg JoshuaKGoldberg added this to the v12.0.0 milestone Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: in triage a maintainer should (re-)triage (review) this issue type: feature enhancement proposal
Projects
None yet
Development

No branches or pull requests

1 participant