New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

babel-jscs

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-jscs

**babel-jscs** allows you to lint **ALL** valid Babel code with [JSCS](https://github.com/jscs-dev/node-jscs). Big thanks to @sebmck!

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6.8K
decreased by-18.22%
Maintainers
1
Weekly downloads
 
Created
Source

babel-jscs Build Status

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

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

Only works on master right now - package.json: "jscs": "jscs-dev/node-jscs#master",

  • validateQuoteMarks

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

$ npm install -g jscs babel-jscs # global
$ npm install jscs babel-jscs # local

Setup

Example .jscsrc

{
  "esprima": "babel-jscs", // global
  "esprima": "./node_modules/babel-jscs", // local
  "verbose": "true", // prints out rule names
  "preset" : "airbnb"
}

Check out the JSCS docs for all possible rules.

Run

$ jscs your-files-here

Keywords

FAQs

Package last updated on 10 Jun 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc