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
Conversation
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 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
andstryker.config.json
by default duringstryker 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?
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 |
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 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.
FYI, v12.5.0 has been already published. |
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"
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 馃.