Giter Site home page Giter Site logo

leonelgalan / linter-markdownlint Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 1.0 81 KB

Atom Linter for markdown using markdownlint/mdl

Home Page: https://atom.io/packages/linter-markdownlint

Ruby 0.83% JavaScript 99.17%
markdownlint linter linter-markdownlint linter-plugin mdl atom

linter-markdownlint's Introduction

linter-markdownlint

This linter plugin for Linter provides an interface to markdownlint. It will be used with files that have the "Markdown" syntax.

Installation

Linter package must be installed in order to use this plugin. If Linter is not installed, please follow the instructions here.

mdl installation

Before using this plugin, you must ensure that mdl is installed on your system. To install mdl, do the following:

  1. Install ruby.

  2. Install markdownlint by typing the following in a terminal:

gem install mdl

Now you can proceed to install the linter-markdownlint plugin.

Plugin installation

apm install linter-markdownlint

Settings

You can configure linter-markdownlint by editing ~/.atom/config.cson (choose Config... in Atom menu):

'linter-markdownlint':
  executablePath: 'mdl'
  severity: 'error'

Run which mdl to find the path, if you using rbenv run rbenv which mdl

linter-markdownlint's People

Contributors

bjoernludwigptb avatar dependabot[bot] avatar leonelgalan avatar lloeki avatar steelbrain avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

andidog

linter-markdownlint's Issues

Impossible to find mdl in a gemset

When mdl is installed in a gemset, linter-markdownlint cannot find it and this error pops up:

Failed to run undefined
spawn mdl ENOENT

Setting the executable dir to something like the following outputs the exact same error:

GEM_PATH=~/.rvm/gems/ruby-2.3.1@cht_docs/ ~/.rvm/gems/ruby-2.3.1@cht_docs/bin/mdl

(Same when expanding ~ to the actual user dir)

Save global style config

Thanks for the plugin! I was just reading #4 and it seems that there is good support for project-root level mdl style configs. However, it would be great if this plugin could have a global style file saved within Atom that is applied for all markdown files.

This would resolve issues when opening atom on a single markdown file (instead of the root project folder it is contained within) and also just editing random markdown files that are not necessarily part of a bigger project.

Thanks!

Phil

Using a custom style

In our project, we have our own style file defining which rules must be and must not be enforced. We run the linter as such:

mdl --style my-style.mdl.rb .

Correct me if I'm wrong, but I don't think there is an equivalent using this linter plugin (or it's missing from the README).

Since there is no convention set for configuration file naming on mdl file (and this is how other linter plugins for Atom detect the configuration), I suggest arbitrarily picking a name convention and documenting it in the README.
For example:

If style.mdl.rb exists at the root of your repository, it will be used as a custom style to run mdl. Otherwise, ...

Does this sound reasonable?

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.