19

Why do I need so many config files?

Comments
  • 11
    Because you want so many programs.
  • 3
    Each of these files serves a specific purpose. If you want fewer files, you'd have to start removing stuff from your project.
  • 5
    Node + typescript + Babel + Jest.

    You could throw away Babel, and learn how to write clean code rather than linting it 🤷‍♂️

    But that's not going to make much of a difference here.
  • 2
    Standards. The thing JS developers avoid like pest cause ... "that's not how I like it"
  • 0
    Surely you jest?
  • 0
    @C0D4 I need Babel to run TypeScript code with Jest. That's the only reason.
  • 1
    @IntrusionCM they're getting there. Everso slowly, but they are.
  • 0
    @IntrusionCM Yeah, most Node projects are just big clusterfucks. This one was organized much better but still...
  • 2
    The JS ecosystem struggles with standards because the number and nature of workflows on a particular repo varies widely. More recently they started to solidify, and therefore the length of configs has been decreasing rapidly. Now you only need really long configs and weird hacks if you're doing a monorepo or some other perfectly sensible but completely nonstandard structure.
  • 6
    TSLint is deprecated: https://github.com/palantir/tslint/...

    Use ESLint with typescript-eslint instead. Still requires one config file though, unless you want to define the config in package.json using the eslintConfig key.
  • 1
    I feel like the structure would be better if all build chains related stuff was defined within package.json, from where paths would be specified to building scripts and configs.

    That would keep the root cleaner.

    I mean, with Rust even your readme isn't assumed to be readme.md, the path is specified in cargo.toml.

    So to me it would make more sense if npm was the central entry point, and package.json would either contain linting/transpiling options, or point to the directory where those configs can be found.
  • 2
    This hell, is same as dependencies hell inside package.json, the amount of stuff I need to use for React native project are just too much unless I'm willing to build everything by hand for a couple of months project ...
  • 2
    @bittersweet but there are alternativets to npm.

    Merging it all into one file would upset those that want something else.

    And keeping separate files means less dependency on one base in case it gets superseded by something newer (and hopefully better, not just newer)
  • 0
    Just a concatenation of bad decisions.
  • 1
    Because fuck you that’s why
  • 1
    rome tools is aiming to solve this by bundling all of those tools together. Hopefully we get a release soon.
  • 0
    @cherryblossom Thanks a lot. Didn't realize that
  • 0
    @Voxera I think all js package managers use package.json, don't they? It would be rather stupid to break that standard since it's very flexible and problem oriented.
  • 0
    Cause you use JS
  • 0
    Because ts is solving a problem I don't have.
Add Comment