GithubHelp home page GithubHelp logo

isabella232 / stlint-vscode-plugin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from stylus/stlint-vscode-plugin

0.0 0.0 0.0 2.15 MB

Plugin STLint for Visual Studio Code

License: MIT License

TypeScript 100.00%

stlint-vscode-plugin's Introduction

VS Code StLint extension

Description

Integrates StLint into VS Code. If you are new to StLint check the documentation.

The extension uses the StLint library installed in the opened workspace folder. If the folder doesn't provide one the extension looks for a global install version. If you haven't installed StLint either locally or globally do so by running npm install stlint in the workspace folder for a local install or npm install -g stlint for a global install.

On new folders you might also need to create a .stlintrc configuration file. The extension will search for an .stlintrc file on the workspace folder root.

Installation

Via Visual Studio Code

  1. Press Ctrl + P to open the Go to File... view
  2. Type ext install xdan.stlint-vscode-plugin and press Enter

From VSIX

  1. Download the .vsix file of the latest release from GitHub
  2. Run code --install-extension stlint-vscode-plugin-*.*.*.vsix in the command line (reference)

Settings Options

This extension contributes the following variables to the settings:

  • stlint.enable: enable/disable stlint. Is enabled by default.

  • stlint.stlintrcPath: The path to the .stlintrc file. When no .stlintrc file is found the default options are used.

  • stlint.packageManager: controls the package manager to be used to resolve the Stlint library. This has only an influence if the Stlint library is resolved globally. Valid values are "npm" or "yarn".

  • stlint.run: run the linter onSave or onType, default is onType.

  • stlint.nodePath: use this setting if an installed Stlint package can't be detected, for example /myGlobalNodePackages/node_modules.

  • stlint.alwaysShowStatus: Always show the Stlint status bar item.

  • stlint.trace.server: Traces the communication between VSCode and the stlint linter service.

  • stlint.workingDirectories - an array for working directories to be used. Stlint resolves configuration files relative to a working directory. This new settings allows users to control which working directory is used for which files. Consider the following setups:

    client/
      .stlintignore
      .stlintrc
      client.styl
    server/
      .stlintignore
      .stlintrc
      server.styl
    

    Then using the setting:

      "stlint.workingDirectories": [
        "./client", "./server"
      ]

    will validate files inside the server directory with the server directory as the current working directory. Same for files in the client directory. If the setting is omitted the working directory is the workspace folder.

    The setting also supports literals of the form { "directory": string, "changeProcessCWD": boolean } as elements. Use this form if you want to instruct Stlint to change the current working directory of the Stlint validation process to the value of directory as well.

Commands:

This extension contributes the following commands to the Command palette.

  • Disable Stlint for this Workspace: disables Stlint extension for this workspace.
  • Enable Stlint for this Workspace: enable Stlint extension for this workspace.
  • stylint.showOutputChannel: show the output channel of the Stlint extension.

Contribution

If you found a bug or are missing a feature do not hesitate to file an issue.
Pull Requests are welcome!

Support

When you like this extension make sure to star the repo and write a review. I am always looking for new ideas and feedback.

stlint-vscode-plugin's People

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.