You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.
Hey, there is something wrong with reading eslint configuration I guess.
Greetings
prettier-atom: TypeError: Cannot read property 'indexOf' of undefined
TypeError: Cannot read property 'indexOf' of undefined
at isAlways (/Users/patrykpeas/.atom/packages/prettier-atom/node_modules/prettier-eslint/dist/utils.js:187:13)
at Array.some (native)
at getValFromObjectConfig (/Users/patrykpeas/.atom/packages/prettier-atom/node_modules/prettier-eslint/dist/utils.js:131:33)
at getTrailingComma (/Users/patrykpeas/.atom/packages/prettier-atom/node_modules/prettier-eslint/dist/utils.js:118:14)
at /Users/patrykpeas/.atom/packages/prettier-atom/node_modules/prettier-eslint/dist/utils.js:91:50
at Array.reduce (native)
at getPrettierOptionsFromESLintRules (/Users/patrykpeas/.atom/packages/prettier-atom/node_modules/prettier-eslint/dist/utils.js:87:37)
at getOptionsForFormatting (/Users/patrykpeas/.atom/packages/prettier-atom/node_modules/prettier-eslint/dist/utils.js:34:18)
at format (/Users/patrykpeas/.atom/packages/prettier-atom/node_modules/prettier-eslint/dist/index.js:79:62)
at /Users/patrykpeas/.atom/packages/prettier-atom/dist/executePrettier.js:33:16
at exports.allowUnsafeNewFunction (/Users/patrykpeas/.atom/packages/prettier-atom/node_modules/loophole/lib/loophole.js:25:14)
at executePrettier (/Users/patrykpeas/.atom/packages/prettier-atom/dist/executePrettier.js:32:14)
at executePrettierOnBufferRange (/Users/patrykpeas/.atom/packages/prettier-atom/dist/executePrettier.js:45:21)
at formatOnSaveIfAppropriate (/Users/patrykpeas/.atom/packages/prettier-atom/dist/formatOnSave.js:36:5)
at lazyFormatOnSave (/Users/patrykpeas/.atom/packages/prettier-atom/dist/main.js:31:15)
at /Users/patrykpeas/.atom/packages/prettier-atom/dist/main.js:45:12
at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:129:28)
at TextBuffer.module.exports.TextBuffer.saveAs (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:1059:20)
at TextBuffer.module.exports.TextBuffer.save (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:1048:19)
at TextEditor.module.exports.TextEditor.save (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:915:26)
at Pane.module.exports.Pane.saveItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:753:18)
at Pane.saveItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:3:59)
at Pane.module.exports.Pane.saveActiveItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:736:19)
at Workspace.module.exports.Workspace.saveActivePaneItem (/Applications/Atom.app/Contents/Resources/app.asar/src/workspace.js:693:35)
at atom-workspace.core:save (/Applications/Atom.app/Contents/Resources/app.asar/src/register-default-commands.js:225:32)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:259:29)
at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:59
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:599:16)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:390:22)
at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:106:36)
at HTMLDocument.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:3:59)
Hey @Belir, thanks for reporting! It looks from the stack trace that this is coming out of prettier-eslint, so this might be an error with that package as opposed to the plugin. If you install the prettier-eslint-cli and run it directly (instead of using atom-prettier), does it still happen?
prettier-eslint-cli [ERROR]: There was an error formatting "./app/frontend/rails_ujs.js":
TypeError: Cannot read property 'indexOf' of undefined
at isAlways (/Users/patrykpeas/code/***/node_modules/prettier-eslint/dist/utils.js:187:13)
at Array.some (native)
at getValFromObjectConfig (/Users/patrykpeas/code/***/node_modules/prettier-eslint/dist/utils.js:131:33)
at getTrailingComma (/Users/patrykpeas/code/***/node_modules/prettier-eslint/dist/utils.js:118:14)
at /Users/patrykpeas/code/***/node_modules/prettier-eslint/dist/utils.js:91:50
at Array.reduce (native)
at getPrettierOptionsFromESLintRules (/Users/patrykpeas/code/***/node_modules/prettier-eslint/dist/utils.js:87:37)
at getOptionsForFormatting (/Users/patrykpeas/code/***/node_modules/prettier-eslint/dist/utils.js:34:18)
at format (/Users/patrykpeas/code/***/node_modules/prettier-eslint/dist/index.js:79:62)
at MapSubscriber.project (/Users/patrykpeas/code/***/node_modules/prettier-eslint-cli/dist/format-files.js:276:55)
failure formatting 1 file with prettier-eslint
@Belir Okay in that case, can you post this over at that repo since it's not actually a problem with the plugin's code? I will close this since it's a prettier-eslint issue.
Hey, there is something wrong with reading eslint configuration I guess.
Greetings
used eslint configuration:
The text was updated successfully, but these errors were encountered: