This repository has been archived by the owner on Jun 20, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 80
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Currently missing - proper handling of stat-exceptions - steps for edit, save & check - negative test (Atom stripping whitespace, editorconfig not)
The editorconfig-object should hold the normalized and preferred editorconfig-settings. The editorconfig-object is embedded into the given TextBuffer (since those are the single source of information for the given file). Some values (like the buffer-reference) are absolutely necessary to act on events like "onWillSave".
…tion The introduction of the 'auto'-setting is a preparation for future updates, it also makes the whole implementation less intrusive and more consistent, since some configuration values now used during the whole lifetime of the TextBuffer. The insert_final_newline-implementation still suffers from intrusive actions of the whitespace-plugin. A workaround could be to disable the entire whitespace-plugin in favor of atom-editorconfig.
@sindresorhus I decided to borrow the settings-property-names from the editorconfig-object to reduce the confusion when stumbling over the different names of the Atom & Editorconfig properties. Therefore i had to add some eslint-disable-line camelcase-directives. I had no idea how to make it better. I'd appreciate a second opinion on that. |
Considers only changes made from within Atom.
It seems like the specs can't work due to the asynchronous behaviour of the editorconfig-applying function.
This is ready to publish! Last chance for feedback! 😄 |
8 tasks
🐀 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is the final reorder of the PRs around the next minor release fulfilling containing the following changes:
.editorconfig
-files from within Atom now reapplies the settings to all open editors (fixes Update all open Editors after changing the .editorconfig #85)trim_trailing_whitespace
-property is now implemented (fixestrim_trailing_whitespace
property #3)insert_final_newline
-property is now implemented (fixesinsert_final_newline
property #4)generate
-command now usesconfig.get()
to fetch the defaults fortrim_trailing_whitespace
andinsert_final_newline
(fixes Uncaught TypeError: Cannot read property 'removeTrailingWhitespace' of undefined #94)tab_width
-property now falls back toindent_size
if missing (fixes tab_with does not fall back to indent_size #91)This PR takes the PRs #104 & #102 over.