Code Monkey home page Code Monkey logo

babel-jscs's Introduction

babel-jscs Build Status

babel-jscs allows you to lint ALL valid Babel code with JSCS. Big thanks to @sebmck!

This package will be used in jscs itself. The recommended way to use it is to use use the esnext option.

Usage: jscs . --esnext or add "esnext": true to your .jscsrc

Also check out the fantastic babel-eslint to lint using ESLint.

NOTE: Please note that this is experimental and may have numerous bugs. It has been run against ember.js and babel-core with no errors (at the moment).

Known Issues

Issues

If there's an issue, first check if you can reproduce with the regular parser (esprima) and the latest version of jscs and babel-jscs.

Include: jscs and babel-jscs version, code snippet/screenshot

  • See if the issue is a duplicate.
  • Check if the issue is reproducible with regular jscs.
  • Run jscs in --verbose mode to get the rule name(s) that have issues.

How does it work?

JSCS allows custom parsers. This is great but some of the syntax nodes that Babel supports aren't supported by JSCS. When using this plugin, JSCS is monkeypatched and your code is transformed into code that JSCS can understand. All location info such as line numbers, columns is also retained so you can track down errors with ease.

Usage

Install

Since jscs 2.0 isn't released you will need to npm i jscs-dev/node-jscs#c5adeba

$ npm i -g jscs # global
$ npm i jscs # local

Setup

Example .jscsrc

{
  "esnext": true
}

Check out the JSCS docs for all possible rules.

Run

$ jscs your-files-here
# if you didn't add esnext to your config
$ jscs your-files-here --esnext

babel-jscs's People

Contributors

hzoo avatar okonet avatar

Watchers

 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.