https://github.com/tresor11/css-linter
A CSS linter capable of identifying errors in CSS code built with Ruby.
https://github.com/tresor11/css-linter
css-linter ruby
Last synced: 8 months ago
JSON representation
A CSS linter capable of identifying errors in CSS code built with Ruby.
- Host: GitHub
- URL: https://github.com/tresor11/css-linter
- Owner: Tresor11
- Created: 2020-01-07T09:35:25.000Z (over 6 years ago)
- Default Branch: development
- Last Pushed: 2024-02-02T19:58:44.000Z (over 2 years ago)
- Last Synced: 2025-08-31T08:39:27.086Z (9 months ago)
- Topics: css-linter, ruby
- Language: Ruby
- Homepage:
- Size: 46.9 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CSS-linter
This repository contains an inplementation of a CSS linter for beginer using Ruby.
## features
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
## getting started
- 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
## usage guide
- 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```
#### after that your console should:
*output the warnings if your css file contains any
*don't provide any output if your css file passes the test
## Example of good and bad code
#### Good:
```
.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;
}
```
#### bad:
```
.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;
}
```
## Testing
- run the tests by typing ```rspec``` in the terminal
## Contributing
- run the tests by typing ```rspec``` in the terminal
contact: @Tresor11