prettier-stylelint
prettier-stylelint copied to clipboard
Cannot set property 'singleQuote' of null
After running prettier-stylelint '**/*.scss'
— leaving --write
off for now just to dry-run — I'm getting the following error:
prettier-stylelint [ERROR]: There was an error formatting "lib/showbie-previewer/addon/components/sbe-preview/text-on-page/styles.scss"
TypeError: Cannot set property 'singleQuote' of null
at resolveConfig.resolve (~/web/node_modules/prettier-stylelint/src/index.js:48:41)
at linterAPI.getConfigForFile.then (~/web/node_modules/prettier-stylelint/src/index.js:32:31)
It appears to be thrown for every .scss
file in the codebase, regardless of whether there's quotes in the file or not. Formatting a file manually via Atom (with prettier-atom
extension & stylelint integration enabled) formats the code as expected.
Using
- node
6.12.0
- prettier-stylelint
~0.4.2
Let me know if I can provide more info!
I added this to my package.json to fix it however needs a deeper look at:
"prettier": {}
same here with ```TypeError: Cannot set property 'useTabs' of null``
That function _resolveConfig
in prettier return null and prettierOptions = {}
in resolveConfig.resolve cause this issue.