A list of styles for different linters.
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
c++
css
git
html
javascript
liquid
markdown
python
ssh
sublime-text
terminal
themes
.gitignore
.travis.yml
CONTRIBUTING.md
Gemfile
Gemfile.lock
ISSUE_TEMPLATE.md
LICENSE
README.md
package.json
requirements.txt

README.md

Style Guide

Build Status Dependency Status devDependency Status

A list of styles for different linters.

If you want an example project, check out Hafnia Times.

Overview of Packages for Each Language

Format Linter
HTML yarn add htmlhint && gem install html-proofer && brew install tidy-html5
CSS/SASS yarn add stylelint stylefmt
JS yarn add jscs jshint
Markdown gem install markdownlint-cli
Python pip install pep8
CSV gem install csvlint
Shell brew install shellcheck
YAML gem install kwalify
Go go get -u github.com/golang/lint/golint

Notifications when the job finishes:

Installation

Install the packages and download the linter rules using the command line:

Direct Download and Installation (Recommended)

# ( Go to the root of your project; code for doing this not included )

# Install Node.js packages and download repo to node_modules/style
yarn cache clean && yarn --silent ndarville/style

# Install Ruby packages
wget https://raw.githubusercontent.com/ndarville/style/master/Gemfile
bundle install

# Install Python packages
wget https://raw.githubusercontent.com/ndarville/style/master/requirements.txt
pip requirements -r requirements.txt

# Install Go packages
go get -u github.com/golang/lint/golint
# Download linter rules to your project folder
wget https://raw.githubusercontent.com/ndarville/style/master/html/.htmlhintrc
wget https://raw.githubusercontent.com/ndarville/style/master/html/.tidyrc
wget https://raw.githubusercontent.com/ndarville/style/master/css/.stylelintrc
wget https://raw.githubusercontent.com/ndarville/style/master/javascript/.jscsrc
wget https://raw.githubusercontent.com/ndarville/style/master/javascript/.jshintrc
wget https://raw.githubusercontent.com/ndarville/style/master/python/.pep8
wget https://raw.githubusercontent.com/ndarville/style/master/markdown/.markdownlintrc

Download and Installation with node_modules/

# ( Go to the root of your project; code for doing this not included )

# Install Node.js packages and download repo to node_modules/style
yarn cache clean && yarn add ndarville/style # Used to be --silent in npm

# Install Ruby packages from node_modules/style
bundle install node_modules/style/Gemfile

# Install Python packages from node_modules/style
pip requirements -r node_modules/style/requirements.txt

# Install Go packages
go get -u github.com/golang/lint/golint

You can access the linter rules that were downloaded to

  • node_modules/style/master/html/.htmlhintrc
    • htmlhint --config node_modules/style/html/.htmlhintrc
  • node_modules/style/master/html/.tidyrc
  • node_modules/style/master/css/.stylelintrc
    • stylelint --config node_modules/style/css/.stylelintrc
  • node_modules/style/master/javascript/.jscsrc
    • jscs --config node_modules/style/javascript/.jscsrc
  • node_modules/style/master/javascript/.jshintrc
    • jshint --config node_modules/style/javascript/.jshintrc
  • node_modules/style/master/python/.pep8
    • pep8 --config node_modules/style/python/.pep8
  • node_modules/style/master/markdown/.markdownlintrc
    • markdownlint --config node_modules/style/markdown/.markdownlintrc

tidy

To install tidy, the HTML5 linter, which is only tentatively supported for now:

brew tap homebrew/dupes
brew install homebrew/dupes/tidy --HEAD
wget https://raw.githubusercontent.com/ndarville/style/master/html/.tidyrc
tidy -config .tidyrc

Afterwards, download the required Sublime Text 3 packages:

Sublime Text Packages

  • Package Control
  • SublimeLinter
  • Bracket Highlighter
  • Emmet
  • cobalt2
  • Markdown Extended
  • Advanced CSV
  • Babel
  • ColorConvert
  • GhostText
  • SCSS
  • Autoprefixer
  • Git
  • GitCommitMsg (Not supported by ST3, looks like)
  • GitGutter

Linters

jscs now has auto-fixing support. You can using by either running the command with the -x option or by installing the ST3 jscs-formatter listed above.

Linter Rules

Continuous Integration (CI)

Status

  • SASS/CSS linter
  • JavaScript linter
    • jscs
    • jshint
  • HTML (tentative)
    • htmlhint
    • htmlproofer
    • tidy
  • Python linter
  • CSV linter
  • Go linter
    • golint
    • govet
  • Markdown linter
    • markdownlint
    • Personal linter
  • Shell linter
  • YAML linter

Examples

My website ndarville.com and project at Hafnia Times try to conform to the style guidelines. The latter is open source, which makes it easier for you to inspect the code.