Coder Social home page Coder Social logo

linto's Introduction

linto ๐Ÿ’„

npm

A tool to test ESLint configurations against a set of GitHub repos.

Installation

yarn global add linto
# or if you have time to spare
npm install -g linto

Usage

linto run -c config.json

where config.json has the following structure:

{
  "repos": [{
    "owner": "buildo",
    "name": "linto"
  }],
  "eslintConfig": {
    "rules": {
      "semi": "error"
    }
  }
}

You can also write the config file in YAML format:

repos:
  - owner: buildo
    name: linto
eslintConfig:
  rules:
    semi: error

Target paths

By default, linto checks the src and the web/src directories of each repo. This default can be overridden on a repo base:

{
  "repos": [{
    "owner": "buildo",
    "name": "someMonoRepo",
    "paths": ["thefrontend/src"]
  }]
}

Plugin support

You can include any ESLint plugin in the config, as long as it's available on npm.

If, for example, you provide the following config

{
  "plugins": ["whatever"],
  "rules": {
    "whatever/rule": 2
  }
}

then linto will try to retrieve eslint-plugin-whatever from npm and make it available to ESLint.

Cleanup

linto creates temporary directories during its execution (to clone repos, install plugins, etc) and it cleans up after itself. However, in case linto is stopped during its execution, some of the directories it created may not be deleted. In order to remove all linto's temporary directories, you can run

linto clean

You can also perform a dry run, using -n or --dry-run:

linto clean -n # don't delete anything, just print what would be deleted

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.