Lint as a term can also refer more broadly to syntactic discrepancies in general, especially in interpreted languages like JavaScript and Python. For example, modern lint checkers are often used to find code that doesn't correspond to certain style guidelines. They can also be used as simple debuggers for common errors, or hard to find errors such as heisenbugs.
Follows the Ruby Style Guide a crowd-sourced set of best practices and style suggestions written and maintained by real-world Rubyists. Rubocop will automatically refactor common mistakes, and point out (but not modify) ones that are code-breaking when they're detected.
$ gem install rubocop
/Users/Bricky/.rvm/gems/ruby-2.3.0/bin/rubocop
$ which rubocop
control + option + b
you can also right-click and select 'Beautify editor contents'$font-stack: Helvetica, sans-serif;
$color1: rgba(45, 49, 66, 1);
$color2: rgba(191, 192, 192, 1);
$color3: rgba(255, 255, 255, 1);
$color4: rgba(79, 93, 117, 1);
$color5: rgba(233, 129, 34, 1);
@mixin border-radius($radius) {
-webkit-border-radius: $radius;
-moz-border-radius: $radius;
-ms-border-radius: $radius;
border-radius: $radius;
}
.box { @include border-radius(10px); }
// _reset.scss
body {
margin: 0;
padding: 0;
}
/ application.scss
@import 'reset';
body {
font: $font-stack;
background-color: $color1;
}
border-color: darken($color1, 10%);
.container { width: 100%; }
article {
width: 600px / 960px * 100%;
}
.message {
border: 1px solid #ccc;
padding: 10px;
color: #333;
}
.success {
@extend .message;
border-color: green;
}
nav {
ul {
margin: 0;
padding: 0;
list-style: none;
}
li { display: inline-block; }
a {
display: block;
padding: 6px 12px;
text-decoration: none;
}
}