eslintrc-generator

    1.1.1 • Public • Published
    Project logo

    eslintrc-generator

    A simple CLI tool to create .eslintrc.json file perfectly compatible with your project and code formatter Prettier
    Answer some simple questions and get your RC file as well as all the packages installed
    NPM Package · Report Bug · Request Feature

    npm Status GitHub issues GitHub forks GitHub stars GitHub pull requests GitHub License



    Project Demo Gif


    Eslintrc-Generator is a simple but time-saving command-line tool that will help you setup your eslint, project, and code formatter with all the configuration you want. You just have to answer some really simple questions and this tool will do all the heavy lifting for you creating the file according to config and installing all the packages

    💡 Features

    1. Uses Airbnb Style Guide
    2. Perfectly compatible with
      • TypeScript
      • JavaScript
      • Prettier
      • React
    3. Ask questions and creates config based on your choice
    4. You have complete control over the configuration
    5. Checks for package.json file and npm init -y if not found
    6. Installs all required packages as dev dependency as per the config
    7. Uses your preferred package manager
    8. Supports CLI arguments

    ⛏️ Built with

    • Inquirer
    • Listr
    • Execa
    • Yargs

    💻 Command Line Arguments

    • -t, --moduleType: Module type you use [ js: JavaScript modules (Import/Export), req: CommonJS (require)] { choices: "js", "req", "none" }
    • -c, --codeRun: Code will run on [array] { choices: "browser", "node" }
    • -r, --isReact: Using React in project [boolean]
    • -l, --language: Language you going to use { choices: "ts", "js" }
    • -p, --isPrettier: Using Prettier for formatting [boolean]
    • -m, --packageManager: Which package manager to use { choices: "yarn", "npm" }

    🏁 Getting Started

    Follow all these instructions and learn the best way to take benefits from this package.

    📚 Prerequisite

    • Node
    • npm/yarn

    🧰 Installation

    1. Global installation (preferred way)

      npm i eslintrc-generator -g

      Note: Global installation is not possible with yarn v2 as far as I know, (please guide me if I am wrong). If you are using yarn v1 then use yarn global add eslintrc-generator. And I recommend using the global method

    2. Per project installation

      npm i eslintrc-generator
      
                  or
      
      yarn add eslintrc-generator
    3. Command to generate RC file

      npx eslintrc-generator
      
               or
      
      generate-eslintrc
      • Generate via CLI arguments

        npx eslintrc-generator -t js -c node -l ts -m yarn -rp
        
                 or
        
        generate-eslintrc -t js -c node -l ts -m yarn -rp

    🎈 Usage

    The sole motive of this package is to improve Developer Experience. The package is made to save time configuring Eslint and Prettier, with your project (if you have done this before you already know the pain). The tool will ask you certain questions, prepare a config and required packages list based on your answers, install all the packages and create the RC file perfectly compatible with your project as well as Prettier. You just need to focus on your awesome project.

    ✍️ Authors

    📖 Contributing

    "In real open source, you have the right to control your own destiny." - Linus Torvalds

    Contributions are what makes the open-source community an amazing place. Any contributions you make are greatly appreciated.

    💳 License

    Distributed under the MIT License. See LICENSE for more information.

    🧬 Resources

    🎉 Acknowledgement

    👋 EndNote

    Star this project so you don't miss it when you need it and avoid wasting time Googling the stuff and just focus on the build.

    Install

    npm i eslintrc-generator

    DownloadsWeekly Downloads

    8

    Version

    1.1.1

    License

    MIT

    Unpacked Size

    522 kB

    Total Files

    13

    Last publish

    Collaborators

    • deeshansharma