[Enter steps to reproduce:]
.js file, with format-on-save enabled. This was working like 10 minutes ago but is no longer working. After receiving the error a first time, I was prompted to updated Atom. I updated Atom and am still getting the error.Atom: 1.14.4 x64
Electron: 1.3.13
OS: Microsoft Windows 10 Pro
Thrown From: prettier-atom package 0.21.0
Uncaught TypeError: Path must be a string. Received null
At C:\Users\Ryan\AppData\Local\atom\app-1.14.4\resources\app.asar\src\pane.js:1045
TypeError: Path must be a string. Received null
at assertPath (path.js:7:11)
at Object.parse (path.js:952:5)
at getDirFromFilePath (/packages/prettier-atom/dist/helpers.js:32:15)
at /packages/prettier-atom/dist/helpers.js:27:61
at /packages/prettier-atom/dist/helpers.js:27:55
at getFilePathRelativeToEslintignore (/packages/prettier-atom/dist/helpers.js:42:5)
at isFilePathEslintignored (/packages/prettier-atom/dist/helpers.js:97:83)
at formatOnSaveIfAppropriate (/packages/prettier-atom/dist/formatOnSave.js:20:38)
at lazyFormatOnSave (/packages/prettier-atom/dist/main.js:31:15)
at /packages/prettier-atom/dist/main.js:45:12
at Function.module.exports.Emitter.simpleDispatch (/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
at Emitter.module.exports.Emitter.emit (/app.asar/node_modules/event-kit/lib/emitter.js:129:28)
at TextBuffer.module.exports.TextBuffer.saveAs (/app.asar/node_modules/text-buffer/lib/text-buffer.js:1060:20)
at TextBuffer.module.exports.TextBuffer.save (/app.asar/node_modules/text-buffer/lib/text-buffer.js:1049:19)
at TextEditor.module.exports.TextEditor.save (/app.asar/src/text-editor.js:893:26)
at Pane.module.exports.Pane.saveItem (/app.asar/src/pane.js:753:18)
at Pane.saveItem (/app.asar/src/pane.js:3:59)
at Pane.module.exports.Pane.saveActiveItem (/app.asar/src/pane.js:736:19)
at Workspace.module.exports.Workspace.saveActivePaneItem (/app.asar/src/workspace.js:693:35)
at /app.asar/src/register-default-commands.js:225:32)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/app.asar/src/command-registry.js:259:29)
at /app.asar/src/command-registry.js:3:59
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:599:16)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:390:22)
at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (/app.asar/src/window-event-handler.js:106:36)
at /app.asar/src/window-event-handler.js:3:59)
-0:28.3.0 tree-view:show (atom-workspace.workspace.scrollbars-visible-always.theme-oceanic-next.theme-one-dark-ui)
-0:23.1.0 core:save (input.hidden-input)
autocomplete-modules 1.6.7
file-icons 2.0.17
language-babel 2.56.0
language-graphql 0.8.0
linter 1.11.23
linter-eslint 8.1.2
oceanic-next 1.0.0
prettier-atom 0.21.0
This is happening to me as well. It started occurring upon upgrading prettier-atom to 0.21.0
I'm on it!
@ryancole & @skevy if you just create an empty .eslintignore file in your project, the error goes away...
just a dirty workaround until @robwise fixes this...
Wow @robwise that was FAST!
Loving this package btw.... :)
@thtliife @ryancole @skevy I just released a new version that hopefully addresses the bug. I apologize; I had to change a bunch of stuff under the hood when integrating prettier-eslint and this bug crept in.
Could you update to the latest and verify that it fixes your use cases? I was able to reproduce locally and then my fix seemed to resolve it, but I just want to make sure you're all set.
Wow @robwise that was FAST!
Loving this package btw.... :)
So happy to hear it!
I'm getting the same issue on version 0.21.1 but an empty .eslintignore does the trick.
Okay, was a double bug, fixing that now
I was able to reproduce the eslintignore problem as well and wrote a fix that seems to resolve it. I got thrown off because I actually encountered and fixed an unreported bug the first time. This should now fix the actual bug you were describing. I just published 0.21.2. Can someone confirm the problem is solved?
Confirmed fixed in v0.21.2
Thanks for the fast work @robwise :)
Thanks @robwise for the quick turnaround!!
Thanks @robwise! Take care of yourself :)
Most helpful comment
Confirmed fixed in v0.21.2
Thanks for the fast work @robwise :)