sindresorhus / atom-editorconfig

Helps developers maintain consistent coding styles between different editors
https://atom.io/packages/editorconfig
MIT License
812 stars 80 forks source link

atmom-editorconfig doesn't format anymore using set config, throws error in Atom #201

Closed iainvdw closed 5 years ago

iainvdw commented 6 years ago

Out of the blue the atom-editorconfig seemed to stop working.

Steps to reproduce

  1. Set editorconfig to indenting with 2 spaces
  2. Open a .SCSS file
  3. Press
  4. atom-editorconfig throws an error

Expected result: Indenting with 2 tabs

Actual result: Indenting with 4 tabs, atom-editorconfig throws an error

Config used:

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*.{html,scss,css,js,json,twig,yml}]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 2

Atom: 1.19.2 x64

Electron: 1.6.9

OS: Mac OS X 10.12.5

Thrown From: editorconfig package 2.2.2

Stack Trace Uncaught TypeError: Cannot read property 'reduce' of undefined

At /Users/Iain/.atom/packages/editorconfig/commands/show.js:5 TypeError: Cannot read property 'reduce' of undefined at notificationTemplate (/packages/editorconfig/commands/show.js:5:17)
at HTMLElement.init (/packages/editorconfig/commands/show.js:55:17)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:265:35)
at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:3:65)
at CommandRegistry.module.exports.CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:166:25)
at /packages/editorconfig/lib/statustile-view.js:21:17)

Commands

-0:42.4.0 snippets:previous-tab-stop (input.hidden-input) 
-0:42.4.0 editor:outdent-selected-rows (input.hidden-input) 
-0:42.1.0 snippets:previous-tab-stop (input.hidden-input) 
-0:42.1.0 editor:outdent-selected-rows (input.hidden-input) 
-0:41.7.0 emmet:expand-abbreviation-with-tab (input.hidden-input) 
-0:41 core:undo (input.hidden-input) 
-0:40.4.0 editor:move-to-first-character-of-line (input.hidden-input) 2x 
-0:40.2.0 emmet:expand-abbreviation-with-tab (input.hidden-input) 
-0:38.8.0 core:save (input.hidden-input) 
-0:38.7.0 linter:lint (atom-text-editor.editor.is-focused) 
-0:35.7.0 snippets:previous-tab-stop (input.hidden-input) 
-0:35.7.0 editor:outdent-selected-rows (input.hidden-input) 
-0:34.8.0 emmet:expand-abbreviation-with-tab (input.hidden-input) 2x 
-0:34 core:save (input.hidden-input) 
-0:26.9.0 core:close (input.hidden-input) 
-0:24.7.0 EditorConfig:show-state (atom-workspace.workspace.scrollbars-visible-always.theme-monokai-seti.theme-one-dark-ui) 

Non-Core Packages

atom-beautify 0.30.5 
atom-css-comb 3.3.1 
atom-monokai 0.10.9 
atom-ternjs 0.18.3 
auto-update-packages 1.0.1 
autocomplete-module-import 0.1.1 
autocomplete-modules 1.6.10 
busy-signal 1.4.3 
clipboard-plus 0.5.1 
docblockr 0.11.0 
duplicate-line-or-selection 0.9.0 
editor-stats 0.17.0 
editorconfig 2.2.2 
emmet 2.4.3 
file-icons 2.1.11 
file-types 0.5.5 
git-blame 1.2.1 
git-time-machine 1.5.9 
haskell-grammar 0.4.0 
highlight-selected 0.13.1 
html-entities 0.4.0 
hyperclick 0.1.3 
intentions 1.1.5 
language-babel 2.71.0 
language-graphql 0.9.0 
language-ini 1.19.0 
language-lua 0.9.11 
language-mjml 1.10.0 
language-svg 0.9.2 
language-swift 0.5.0 
language-thrift 1.0.2 
linter 2.2.0 
linter-eslint 8.2.1 
linter-mjml 1.2.0 
linter-sass-lint 1.7.4 
linter-ui-default 1.6.7 
merge-conflicts 1.4.5 
minimap 4.29.6 
minimap-cursorline 0.2.0 
minimap-find-and-replace 4.5.2 
minimap-git-diff 4.3.1 
minimap-pigments 0.2.2 
minimap-selection 4.5.0 
monokai-seti 0.9.0 
php-integrator-annotations 1.2.0 
php-integrator-autocomplete-plus 1.6.0 
php-integrator-base 
undefined 
php-integrator-call-tips 1.2.1 
php-integrator-call-tips-legacy-php56 1.2.3 
php-integrator-linter 1.3.0 
php-integrator-linter-legacy-php56 1.3.1 
php-integrator-navigation 1.2.1 
php-integrator-refactoring 1.4.1 
php-integrator-tooltips 1.1.5 
php-integrator-tooltips-legacy-php56 1.1.6 
php-twig 4.0.0 
pigments 0.40.2 
platformio-ide-terminal 2.5.5 
prettier-atom 0.37.0 
project-manager 3.3.5 
seti-ui 1.9.0 
sort-lines 0.14.0 
split-diff 1.5.0 
syfi 0.5.1 
symfony-snippets 0.3.0 
todo-show 1.11.0 
tool-bar 1.1.0 
tool-bar-almighty 0.8.2 
florianb commented 6 years ago

Hi @iainvdw - thanks for reporting this issue! Please give me some time to address that, i personally won't find time to work on this until next week. Thank you in advance.. ☕️

Alhadis commented 5 years ago

Closing this, as it was already fixed in an earlier commit.