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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add suffix 'config' to config filename #4308

Merged
merged 7 commits into from Oct 1, 2023
Merged

feat: Add suffix 'config' to config filename #4308

merged 7 commits into from Oct 1, 2023

Conversation

regseb
Copy link
Contributor

@regseb regseb commented Jun 16, 2023

This PR adds the stryker.config.{json,js,mjs,cjs} and .stryker.config.{json,js,mjs,cjs} in the default config file names.


For configuration files, the extension .config.js is often used. The extension .conf.js is less common. Here are examples of different projects that use .config.js: eslint.config.js, prettier.config.{js,cjs} (via Cosmiconfig), jest.config.{js,ts,mjs,cjs,json}, nyc.config.js, webpack.config.js, vue.config.js, next.config.{js,mjs}, docusaurus.config.js, stylelint.config.{cjs,js}, tailwind.config.js (via Lilconfig), typedoc.config.{js,cjs}.

".config.js" ".conf.js"
GitHub Code: 2.6M Code: 446k
npm 98 packages found 5 packages found
Google Search About 4,670,000 results About 232,000 results
Google Trends Average: 32 Average: 7

I propose this pull request because when creating a new project, I named my configuration files *.config.js (eslint.config.js, stylelint.config.js...). But when running Stryker, it couldn't find its configuration file, even though the .stryker.config.js file was present in the root of my project 馃.

Copy link
Member

@nicojs nicojs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that .config.js is the better suffix. The .conf.js suffix is one of the last remnants of our karma past (we used to support only karma, and karma uses karma.conf.js).

  • Should we also generate stryker.config.mjs and stryker.config.json by default during stryker init?
  • Could you change 1 or more e2e tests to use stryker.config.js?
  • Do you also want to create the PR to include stryker.config.[mjs,cjs,js,json] to https://github.com/vscode-icons/vscode-icons?

@regseb
Copy link
Contributor Author

regseb commented Jun 18, 2023

I've pushed a new commit https://github.com/regseb/stryker-js/commit/1819a2e8f758de5688f548e80ea4a8f3640ea58f, but it doesn't display in this pull request.

I don't know why it doesn't add in this pull request?


I create pull request in vscode-icons/vscode-icons#3309

Copy link
Member

@nicojs nicojs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it looks great so far.

However, I wonder if I would want to merge this before vscode-icons/vscode-icons#3309 is resolved. I would hate for users to have to look at the default JSON icon, when they have the fancy Stryker icon now.

@robertohuertasm
Copy link

However, I wonder if I would want to merge this before vscode-icons/vscode-icons#3309 is resolved. I would hate for users to have to look at the default JSON icon, when they have the fancy Stryker icon now.

FYI, v12.5.0 has been already published.

@regseb regseb requested a review from nicojs September 21, 2023 12:03
@nicojs nicojs enabled auto-merge (squash) October 1, 2023 11:10
@nicojs nicojs merged commit fc8596e into stryker-mutator:master Oct 1, 2023
7 checks passed
@regseb regseb deleted the config branch October 2, 2023 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants