Giter Site home page Giter Site logo

vscode-jscs's Introduction

JSCS Support for Visual Studio Code

JSCS support for Visual Studio Code.

Installation and Usage

The JSCS Linter is available in the Visual Studio Code Gallery. To install, press F1 and select Extensions: Install Extensions and then search for and select JSCS Linting.

Install JSCS in your workspace (or globally using the -g switch).

# install locally to the workspace
npm install jscs

Once installed, the JSCS Linter will automatically analyze your JavaScript files and return style warnings based on the rules you define in a .jscsrc file or in your settings.

Configuring the JSCS Linter

The best way to configure how the linter flags issues in your code is to create a .jscsrc file in the root of your workspace. The VS Code JSCS Linter will look for this file first and if no .jscsrc file is found it will look into your custom Settings.

Here are the available settings options:

Enable or disable the JSCS Linter for JavaScript files in this workspace.

"jscs.enable": boolean

The JSCS preset to use, possible values: airbnb, crockford, google, grunt, idiomatic, jquery, mdcs, node-style-guide, wikimedia, wordpress, yandex.

"jscs.preset": string

Disable the JSCS Linter if no .jscsrc configuration file is found.

"jscs.disableIfNoConfig": boolean

Set JSCS configuration rules in your settings file directly.

"jscs.configuration": object

Development

The JSCS Linter is a great way to learn how to create extensions for VS Code. We also love enhancements and bug fixes! Here's how to get started:

git clone https://github.com/microsoft/vscode-jscs
cd vscode-jscs/jscs
npm install
cd ../jscs-server
npm install

Developing the Server

  • Open VS Code on the jscs-server folder
  • Run npm run compile or npm run watch to build the server and copy it into the jscs folder
  • To debug, press F5 once the extension is loaded, this will attach the debugger to the server. If you try to attach too soon you will get a timeout error from the debugger.

Developing the Extension

  • Open VS Code on the jscs folder
  • To run, press F5 to build the app, launch the extension environment, and attach a debugger

Enjoy!

License

MIT

vscode-jscs's People

Contributors

angrieco avatar chrisdias avatar dbaeumer avatar

Stargazers

 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.