Git Product home page Git Product logo

myna's Introduction

Myna

Easy linting, prettification, testing, and type checking for Web apps.

Overview

This package gets you generic configurations for ESLint, Prettier, Jest, and Typescript. It is intended not to impose uniformity, but to get essential tooling up and running quickly in projects that don't have it yet.

It is named for the myna bird, which gets everywhere.

Myna strongly prefers minimal configuration and sensible defaults. Have a look in config/ to see how tools are set up.

Usage

Either

yarn install @zoopoetics/myna

Or

npm install @zoopoetics/myna

During installation:

  • If there is no babel.config.js at the root of your project, Myna will add one so that Jest can be run project-wide.
  • If there is no tsconfig.json at the root of your project, Myna will add one.
  • If there is no "prettier" key in your root package.json, Myna will add one.
  • If any of the following scripts is not found in your root package.json, Myna will add it.
    • ci: run all the following commands
    • lint: run ESLint
    • prettify: run Prettier
    • test: run Jest
    • typecheck: run Typescript

It is recommended to also:

yarn install husky lint-staged

And add the following to your root package.json:

"husky": {
  "hooks": {
    "pre-commit": "lint-staged",
    "pre-push": "yarn ci"
  }
},
"lint-staged": {
  "*.{css,js,jsx,json,md,mdx,ts,tsx}": [
    "myna prettify",
    "git add ."
  ],
  "*.{js,jsx,ts,tsx}": [
    "myna lint --fix",
    "git add ."
  ]
},

Tweak this however you like, but it's good to have prophylactic tools running during interactions with git.

myna's People

Contributors

zoopoetics avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.