Skip to content

Provide CLI to modernize an existing Node.js project #28

@matthewadams

Description

@matthewadams

It'd be cool to have a modern-node CLI to "modernize" (get it?) an existing Node.js project, where it only tackles configuration of formatting, linting, optionally Jest testing, and precommit hooks with lint-staged & husky, so that I could cd into whatever Node.js project I've got, Nuxt or not, and run npx modernize --auto or something (modernoze?) and it would add everything needed to setup formatting, linting, Jest testing (optionally), and precommit linting of staged files with lint-staged & husky.

The tool could autodetect the package manager in use and roll with that by default, and detect whether eslint is being used, because that happened for me as a result of npx nuxi init when I, for better or worse, selected to include module @nuxt/eslint. That yielded a package.json that looked like this:

{
  "name": "nuxt-app",
  "private": true,
  "type": "module",
  "scripts": {
    "build": "nuxt build",
    "dev": "nuxt dev",
    "generate": "nuxt generate",
    "preview": "nuxt preview",
    "postinstall": "nuxt prepare"
  },
  "dependencies": {
    "@nuxt/eslint": "^1.6.0",
    "eslint": "^9.31.0",
    "nuxt": "^4.0.1",
    "vue": "^3.5.17",
    "vue-router": "^4.5.1"
  }
}

Metathinking about it, this project could be the standard of Node.js project set up.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions