This repository contains an inplementation of a CSS linter for beginer using Ruby.
this linter has the following features:
-
output warnings if the indentation is not correct
-
output warnings if the correct assigmeht operator is not used
-
output warnings if the line is not properly ended
-
output warnings if the used css-poperty is not of the correct format
notice:this lint will only check for the format of the css-property but it can't determine if it actually exist or not
-
first clone this repo by typing
git clone https://github.com/Tresor11/css-linter.git
in your terminal -
then navigate to the directory by typing
cd css-lint
in your terminal
-
run the linter by typing
ruby bin/main.rb
in the terminal -
you will be asked to provide the path to your css file ex:
./file.css
*output the warnings if your css file contains any
*don't provide any output if your css file passes the test
.h2, h2{ font-weight: 700; font-size: 38px; padding: 10px 0 10px 0 font-style: normal; font-stretch: normal; line-height: normal; letter-spacing: normal; color: #6f23ff; text-align: center; }
.h2, h2{ font-weight: 700; font-size: 38px; padding: 10px 0 10px 0 font-style: normal; font-stretch: normal; line-height: normal; letter-spacing: normal; color #6f23ff; text-align: center; }
-
run the tests by typing
rspec
in the terminal
-
run the tests by typing
rspec
in the terminal
contact: @Tresor11