Skip to content
This repository has been archived by the owner on Dec 21, 2022. It is now read-only.

Cannot set property 'singleQuote' of null #9

Open
stormwarning opened this issue Jan 4, 2018 · 3 comments · May be fixed by #20 or #30
Open

Cannot set property 'singleQuote' of null #9

stormwarning opened this issue Jan 4, 2018 · 3 comments · May be fixed by #20 or #30

Comments

@stormwarning
Copy link

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!

@GodOfGrandeur
Copy link

I added this to my package.json to fix it however needs a deeper look at:

"prettier": {}

@ausminternet
Copy link

same here with ```TypeError: Cannot set property 'useTabs' of null``

@alextes alextes linked a pull request Aug 7, 2018 that will close this issue
@tarol
Copy link

tarol commented Sep 27, 2018

That function _resolveConfig in prettier return null and prettierOptions = {} in resolveConfig.resolve cause this issue.

@lachieh lachieh linked a pull request Feb 19, 2019 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants