-
Notifications
You must be signed in to change notification settings - Fork 26
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
Get rid of most config/
files
#144
Comments
čau Pavle :)
files that are under
Hmm I think I don't understand your use-case (btw I'm heavy CLI user 😎). Everything works as expected. If you wanna execute jest or prettier from command line you can use npm scripts, which allow you to modify those, as you need by providing extra arguments, for example:
What kind of tooling/editors are you referring to? |
čau Martine :-)
I'm bash user 99.99%, my first command is
I'm using vscode on linux and it's extensions (tooling) + well known packages. BTW This starter is one of most well done on the planet 🌍 — I'm really glad Díky za perfektní práci! :-) |
I'm still leaving this open as some tools (really, VSCode extensions 😈) cannot know location of configs implicitly |
yeah prettier plugin is having hard time for instance (which is very unfortunate). that's why I'm explicitly setting that in .vscode 🤷♂️ |
prettierrc has been moved to root. #162 can we close this ? :) |
|
hmm, I'm skeptical about those. I don't wanna necessarily change stuff because of some editor plugin doesn't support something. Also my plan is to support monorepo library starter which is gonna use current codebase (I'm already using it here https://github.com/Hotell/ts-setup ). With said, that the question is, do those aforementioned plugins support monorepo etc? I personally don't use them, nor planing to do so. Last thing. rollup config uses programatic logic, to prepare the build. I don't wanna expose js module with logic, to root file (IMHO in root should contain only static configurations) hmm 🤔 |
About jest. Jest expect default config in two specific places.
When jest is invoked without argument and none of both is matched, jest can still run with preconfigured defaults. In simple project this may work, but it does not work in this case. const defaultConfig = require('./config/jest.config.js');
module.exports = {
...defaultConfig,
rootDir: '.',
} But you must agree that this is ugly option. (But may works for monorepo)
This way it may looks really nice but it still require one file in the root TL;DR;It is not about tools that not supports configuration at arbitrary path It is all about that I just wish |
Ahoj Martine!
It will be great if most of tools can work just as expected by running them.
What I can see in
package.json
scripts
— there are mostly explicit calls with loading args from./config/…
It isn't good for almost everyone who use command line ;-)
I expect that root folder will be bloated with hidden dot files — like:
.gitignore
.editorconfig
.npmignore
,.npmrc
.prettierrc.js
,.prettierignore
.travis.yml
.yarnrc
?but, seriously, really… I thing it is worse to keep expected config files outside than add them to their default path. Tools will be happy with everything in implicit path and tooling will behave more correctly with editors.
So, please, consider move everything which must be specified explicitly in
package.json
to the root,if possible, remove
config
dir entirely — files inside IMHO can be moved on better path with much better semantic meaningThe text was updated successfully, but these errors were encountered: