Correct your everyday typos
npm install postcss-autocorrect
Correct your everyday typos. Check for typos in both properties and values.
[PostCSS]: https://github.com/postcss/postcss
[ci-img]: https://travis-ci.org/DimitrisNL/postcss-autocorrect.svg
[ci]: 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,
`js`
npm install postcss-autocorrect --save-dev`
orjs``
yarn add postcss-autocorrect --dev
See [PostCSS] docs for examples for your environment.