Lint is a tool that analyzes source code to flag programming errors, bugs, stylistic errors, and suspicious constructs. So we don't need to spend time for code syntax checking, linters can do it for us.
Rubocop is a Ruby static code analyzer and formatter, based on the Ruby community style guide.
RuboCop is extremely flexible and most aspects of its behavior can be tweaked via various configuration options.
gem install rubocopIf you'd rather install RuboCop using bundler, don't require it in your Gemfile:
gem 'rubocop', require: falseES-lint is a fully pluggable tool for identifying and reporting on patterns in JavaScript
If you want to include ESLint as part of your project's build system, we recommend installing it locally. You can do so using npm:
npm install eslint --save-devYou should then set up a configuration file:
$ ./node_modules/.bin/eslint --initAfter that, you can run ESLint on any file or directory like this:
./node_modules/.bin/eslint yourfile.jsSCSS-lint is a configurable tool for writing clean and consistent SCSS
Add to your Gemfile:
gem 'scss_lint'After that, you can run SCSS-lint on any file or directory like this:
scss-lint app/assets/stylesheets/or
scss-lint app/assets/stylesheets/**/*.css.scssSlim-lint is a configurable tool for analyzing Slim templates
Add to your Gemfile:
gem 'slim_lint'Run slim-lint from the command line by passing in a directory (or multiple directories) to recursively scan:
slim-lint app/views/Overcommit is a fully configurable and extendable Git hook manager.
Overcommit is installed via RubyGems. It is strongly recommended that your environment supports running gem install without requiring sudo privileges. Using a Ruby version manager like rbenv or rvm can help here.
gem install overcommitYou can then run the overcommit command to install hooks into repositories.
mkdir important-project
cd important-project
git init
overcommit --installCopyright © 2015-2019 Codica. It is released under the MIT License.
We love open source software! See our other projects or hire us to design, develop, and grow your product.
