Skip to content

conao3/markuplint.el

Repository files navigation

https://raw.githubusercontent.com/conao3/files/master/blob/headers/png/markuplint.el.png https://img.shields.io/github/license/conao3/markuplint.el.svg?style=flat-square https://img.shields.io/github/tag/conao3/markuplint.el.svg?style=flat-square https://github.com/conao3/markuplint.el/workflows/Main%20workflow/badge.svg https://img.shields.io/codacy/grade/62a36f4f04524d5e8c758440e8071c45.svg?logo=codacy&style=flat-square https://img.shields.io/badge/patreon-become%20a%20patron-orange.svg?logo=patreon&style=flat-square https://img.shields.io/badge/twitter-@conao__3-blue.svg?logo=twitter&style=flat-square https://img.shields.io/badge/chat-on_slack-blue.svg?logo=slack&style=flat-square

Table of Contents

Description

https://raw.githubusercontent.com/conao3/files/master/blob/markuplint.el/markuplint.gif

Frontend for markuplint.

Install

Sample install code using leaf.el.

(leaf markuplint :ensure t)

Usage

Install markuplint

Use Docker markuplint

$ docker run markuplint/markuplint sample/002.html
<markuplint> warning: Attribute value is must quote on double quotation mark (attr-value-quotes) /markuplint/test/fixture/002.html:2:7
   1: <!DOCTYPE•html>
   2: <html•lang=en>
   3: <head>
<markuplint> warning: Attribute value is must quote on double quotation mark (attr-value-quotes) /markuplint/test/fixture/002.html:4:8
   3: <head>
   4: →   <meta•charset=UTF-8>
   5: →   <meta•name=viewport•content='width=device-width,•initial-scale=1.0'>
<markuplint> warning: Attribute value is must quote on double quotation mark (attr-value-quotes) /markuplint/test/fixture/002.html:5:8
...

Good, markuplint invoked from Emacs should be nice.

Please set markuplint-executable-preset to 'docker.

Use local markuplint executable

  • [Optional] Install node
    git clone https://github.com/anyenv/anyenv ~/.anyenv
    echo 'export PATH="$HOME/.anyenv/bin:$PATH"' >> ~/.bash_profile
    echo '$(anyenv init -)' >> ~/.bash_profile
    anyenv install --init
    anyenv install nodenv
    
    eval "$(anyenv init -)"         # configure PATH
    nodenv install -l               # list available versions
    nodenv install 14.13.0          # install latest stable version
    nodenv global 14.13.0           # use it in global
        
  • Install markuplint
    • Install in global
      npm -g install markuplint
              
    • Install in each project
      npm install markuplint --save-dev
              
  • Testing markuplint
    $ nodenv versions
    * 14.13.0 (set by /home/conao/.anyenv/envs/nodenv/version)
    
    $ which node
    /home/conao/.anyenv/envs/nodenv/shims/node
    
    $ which npx
    /home/conao/.anyenv/envs/nodenv/shims/npx
    
    $ npx markuplint --verision
    1.0.0
    
    $ npx markuplint sample/002.html
    <markuplint> warning: Attribute value is must quote on double quotation mark (attr-value-quotes) /home/conao/dev/repos/markuplint.el/sample/002.html:2:7
       1: <!DOCTYPE•html>
       2: <html•lang=en>
       3: <head>
    <markuplint> warning: Attribute value is must quote on double quotation mark (attr-value-quotes) /home/conao/dev/repos/markuplint.el/sample/002.html:4:8
       3: <head>
       4: →   <meta•charset=UTF-8>
       5: →   <meta•name=viewport•content='width=device-width,•initial-scale=1.0'>
    ...
        

    Good, markuplint invoked from Emacs should be nice.

    Please set markuplint-executable-preset to 'npx.

Customize

Information

Community

Any feedback or suggestions are welcome!

You can use github issues, but you can also use Slack if you want a more casual conversation.

Contribution

We welcome PR!

Require tools for testing

  • keg
    cd ~/
    hub clone conao3/keg .keg
    export PATH="$HOME/.keg/bin:$PATH"
        

Running test

Below operation flow is recommended.

git branch [feature-branch]       # Create branch named [feature-branch]
git checkout [feature-branch]     # Checkout branch named [feature-branch]

# <edit loop>
emacs markuplint.el             # Edit something you want

make test                         # Test markuplint
git commit -am "brabra"           # Commit (auto-run test before commit)
# </edit loop>

hub fork                          # Create fork at GitHub
git push [user] [feature-branch]  # Push feature-branch to your fork
hub pull-request                  # Create pull-request

Migration

License

General Public License Version 3 (GPLv3)
Copyright (c) Naoya Yamashita - https://conao3.com
https://github.com/conao3/markuplint.el/blob/master/LICENSE

Author

Contributors

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published