** This is a CSS linter developed to help debug code and follow best practices **
A CSS linter project developed in Ruby It provides feedback about errors or warning in code
- Ruby
- RSpec gem
- Colorize gem
- Object Oriented Programming
- run bundle install
How to run the linters program
- Open the console
- Download or
git clone https://github.com/BigWizzo/ruby-capstone-linters.git
cd ruby-capstone-linters
- Run
ruby bin/main.rb path_to_css_file.css
- Three examples are included inside the css folder for testing the program
- err_file.css which contains css errors
- clean.css which contains clean code
- err_file.css an empty css file
- Errors will show on to the console
Good Code
```
.d-flex {
display: flex;
}
.flex-col {
flex-direction: column;
}
```
Bad Code
```
.d-flex } * Opening bracket error *
display: flex;; * Double semi colons *
{ * Closing bracket error *
}
.flex-col { { * Multuple brackets error *
flex-direction: column;
} | * Trailing white space *
.a-flex { gst * Content after opening bracket *
display: flex; dhs * Content after semicolon *
hsj} * Content before closing bracket *
```
- Open the console
- Navigate to the css working folder
- Run gem install rspec
- Run rspec
- The spec file is in the spec folder
👤 Will Nyamunokora
- Github: @bigwizzo
- Twitter: @willnyamunokora
- Linkedin: linkedin Profile
Give a ⭐️ if you like this project!