PostCSS Conversion Checklist
See original GitHub issueStarting this issue to track progress on the conversion to using PostCSS.
Misc Tasks:
- merge linting fixes from master
- merge changes from #156, when that is merged
- util module for common operations. see note on then/catch with the parser below.
- write proper value parser
- move to postcss-values-parser
Linters:
- attributeQuotes
- borderZero
- comment
- decimalZero
- depthLevel
- duplicateProperty
- emptyRule
- finalNewline
- hexLength
- hexNotation
- hexValidation
- idSelector
- importantRule
- importPath
- propertyOrdering
- propertyUnits
- qualifyingElement
- selectorNaming
- singleLinePerProperty
- singleLinePerSelector
- spaceAfterPropertyColon
- spaceAfterPropertyName
- spaceAfterPropertyValue
- spaceAroundComma
- spaceAroundOperator
- spaceBeforeBrace
- spaceBetweenParens
- stringQuotes
- trailingSemicolon
- trailingWhitespace
- urlFormat
- urlQuotes
- zeroUnit
Then/Catch
Considering the following code:
parser = getParser(source);
parser.then(function (ast) {
expect(linter.nodeTypes).to.include(ast.root.first.type);
});
If that expect throws an AssertionError, it’s swallowed by the Promise implementation of PostCSS less. So we’ll essentially get a false-positive for the expect result. Found this while implementing new tests for the nodeTypes
property in the comments linter. And so we need to have a And so we need to return the promise for every .catch(...)
for every parse operation.it()
. We already have a ton of copy/paste’d code in the specs, so a small util lib that wraps this for us is reasonable.
Issue Analytics
- State:
- Created 8 years ago
- Comments:16 (16 by maintainers)
Top Results From Across the Web
PostCSS - a tool for transforming CSS with JavaScript
PostCSS Preset Env, lets you convert modern CSS into something most browsers can understand, determining the polyfills you need based on your targeted...
Read more >postcss-unit-conversion - npm package - Snyk
PostCSS plugin for converting units from px to em or rem. For more information about how to use this package see README.
Read more >Getting started with PostCSS - LogRocket Blog
PostCSS is a tool for transforming CSS with JavaScript plugins. It provides features via its extensive plugin ecosystem to help improve your CSS ......
Read more >PostCSS - Transforming Your CSS with JavaScript - KeyCDN
PostCSS allows you to transform and extend your CSS using JavaScript. With its large ecosystem of plugins, it can help streamline your ...
Read more >hoivee/postcss-convert-unit - GitHub
Contribute to hoivee/postcss-convert-unit development by creating an account on GitHub. ... convertConfig, convert config list, convertItem[], [], yes ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jwilsson cool. I’ve got the value parser coding portion done, and I’m working on unit tests now that match postcss-value-parser (minus some really weird rules he was allowing, like unmatched parens and quotes).
let’s get you and @kokarn to knock out a few of those remaining linters that don’t rely on property parsing 😉
Knocked out 12 of the linters. Will have some more free time towards the weekend.