Giter Site home page Giter Site logo

esfix's Introduction

Esfix

Build Status codecov

Table of Content

Installation

npm i --dev @kard/esfix

Or with yarn

yarn add --dev @kard/esfix

Configuration exaple

In the package.json:

  "scripts": {
    "esfix": "esfix"
  },
  "eslintConfig": {
    "files": [ "src/**/*.js", "src/**/*.jsx" ],
    "fix": true
  }

Notes:

  • The eslintConfig section can be used to rewrite all of the eslint options. Please refer to the Configuration File Formats and Rules pages of eslint documentation.

Command line options

--nolocals - Ignore any local configurations of the analyzed projects. Whet this key is presents, the only internal configuration of the package is using.

--dryrun - No fixes are carried out linting is performed and all of its messages are shown. It's like to run eslint without --fix.

--showconfig - Show summarized config. No checks or fixes are carried out in this case.

Troubleshooting

Different indent sizes

It is especially painful when only indent is rewritten in a separate file (for instance: the main configuration is inside .eslintrc.json while rewrite is placed inside package.json)

Error pattern

error: Expected indentation of ... space characters but found ... (react/jsx-indent-props) at ...

...

11 errors and 1 warning found.
11 errors potentially fixable with the `--fix` option.

Solution: make sure that these rules are in sync.

  "rules": {
    "indent": ["error", 2],
    "react/jsx-indent": [ "error", 2 ],
    "react/jsx-indent-props": [ "error", 2 ]
  }

esfix's People

Watchers

James Cloos avatar  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.