postcss-autocorrect
Version:
Correct your everyday typos
60 lines (45 loc) • 1.21 kB
Markdown
<img src="http://i.imgur.com/cAgUS7w.png" alt="logo" style='margin:0 auto;width:80px;vertical-align:top;display:block' />
Correct your everyday typos. Check for typos in both properties and values.
[ ]: https://github.com/postcss/postcss
[ ]: https://travis-ci.org/DimitrisNL/postcss-autocorrect.svg
[ ]: https://travis-ci.org/DimitrisNL/postcss-autocorrect
```css
.foogee {
heigth: 120px;
colour: blakc;
}
```
```css
.foogee {
height: 120px;
color: black;
}
```
```js
postcss([ require('postcss-autocorrect') ])
```
By default, the plugin only checks for certain typos. Pass your own like this :
```js
postcss([ require('postcss-autocorrect') ])
({
providedList: [
{absolute: ['asbolute']},
{background: ['backrgound', 'backgrund']}
]
}),
```
You can also set the following, in order to exclude plugin's defaults corrections :
```js
useDefaultList: false,
```
## Installation
```js
npm install postcss-autocorrect --save-dev
```
or
```js
yarn add postcss-autocorrect --dev
```
See [PostCSS] docs for examples for your environment.