Closed dinophile closed 7 years ago
@dinophile We had a bug in our debug script, I just pushed a new version (0.31.1), can you please update prettier-atom, and re-run the debug script. Also, can you please triple-check that you don't have linter-eslint installed? This error is only supposed to happen if all of the following are true at the same time:
Hi @robwise, thanks for getting back to me!
Upgraded to the new version, checked three times (just in case!) and I definitely don't have linter-eslint installed (or any of the linter packages) yet I still get the warning about linter's fix on save feature being active.
This time when I run the debug script this is the only output I get:
Atom version: 1.15.0
prettier-atom version: 0.31.1
prettier version: 1.3.1
prettier-eslint version: 6.2.2
prettier-atom configuration: {
"formatOnSaveOptions": {
"showInStatusBar": true,
"enabled": false,
"respectEslintignore": true,
"scopes": [
"source.js",
"source.jsx",
"source.js.jsx",
"source.babel",
"source.js-semantic",
"text.html.basic",
"text.html.vue"
],
"excludedGlobs": [],
"whitelistedGlobs": []
},
"prettierOptions": {
"bracketSpacing": false,
"singleQuote": false,
"semi": true,
"useTabs": false,
"jsxBracketSameLine": false,
"printWidth": 80,
"tabWidth": "auto",
"trailingComma": "none",
"parser": "babylon"
},
"useEslint": true,
"silenceErrors": false,
"useEditorConfig": true,
"prettierEslintOptions": {
"prettierLast": false
}
}
@dinophile Are there any properties related to linter-eslint
in your config.cson
file? (could happen if you installed it before and removed it)
^ oh yeah good thinking
Aha! And removing them did the trick! That was sneaky, yup the settings were still in my config file...once I removed them there was no more error! Did not even think to look there. Thanks a million @darahak and @robwise! :)
Knowing this, maybe we should check if linter-eslint
is actually installed.
I don't know what's the proper way to do this and how much it would cost though.
@darahak Agreed, we should investigate if there's a way to tell if the package is actually installed and enabled instead of just checking for the value in the config. Then we could change the implementation here: https://github.com/prettier/prettier-atom/blob/master/src/atomInterface/index.js#L17
I keep getting a warning telling me that linter-eslint's fix on save feature is enabled (warning is coming from prettier-atom). But I don't even have the linter-eslint package installed in my editor...nothing obvious coming up other than the following from prettier:debug (and a line telling me that this issue has already been reported):
Error: ENOENT: no such file or directory, open 'package.json' at Error (native) at Object.fs.openSync (fs.js:640:18) at Object.module.(anonymous function) [as openSync] (ELECTRON_ASAR.js:168:20) at Object.fs.readFileSync (fs.js:508:33) at Object.fs.readFileSync (ELECTRON_ASAR.js:501:29) at Function.module.exports.sync.fp [as sync] (/home/cheyenne/.atom/packages/prettier-atom/node_modules/load-json-file/index.js:11:38) at Function.module.exports.sync (/home/cheyenne/.atom/packages/prettier-atom/node_modules/read-pkg/index.js:40:25) at getDebugInfo (/home/cheyenne/.atom/packages/prettier-atom/dist/displayDebugInfo/index.js:16:89) at displayDebugInfo (/home/cheyenne/.atom/packages/prettier-atom/dist/displayDebugInfo/index.js:21:13) at atom-workspace.lazyDisplayDebugInfo (/home/cheyenne/.atom/packages/prettier-atom/dist/main.js:58:3) at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app.asar/src/command-registry.js:259:29) at CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app.asar/src/command-registry.js:3:59) at CommandRegistry.module.exports.CommandRegistry.dispatch (/usr/share/atom/resources/app.asar/src/command-registry.js:160:19) at AtomEnvironment.module.exports.AtomEnvironment.dispatchApplicationMenuCommand (/usr/share/atom/resources/app.asar/src/atom-environment.js:1162:28) at EventEmitter.outerCallback (/usr/share/atom/resources/app.asar/src/application-delegate.js:312:25) at emitThree (events.js:116:13) at EventEmitter.emit (events.js:194:7)