Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Bad indentation on comment blocks #50

Closed
darahak opened this issue Feb 15, 2017 · 4 comments
Closed

Bad indentation on comment blocks #50

darahak opened this issue Feb 15, 2017 · 4 comments

Comments

@darahak
Copy link
Collaborator

darahak commented Feb 15, 2017

I ran the latest version 0.17.0 on a script that defines a RequireJS module.
It added one indentation step to the whole module, but the comment blocks didn't follow (just the first line).

Here's an example (with 4-space tabs):

define('zzz', [
    'a',
    'b',
    'c'
], function (a, b, c) {
    /**
     * Does something.
     * @return {void}
     */
    function doSomething() {
        ...
    }

    ...
});

became

define(
    'zzz',
    [
        'a',
        'b',
        'c'
    ],
    function (a, b, c) {
        /**
     * Does something.
     * @return {void}
     */
        function doSomething() {
            ...
        }

        ...
    }
);

It works properly when I test my code on the REPL though.
Can other packages interfere when Prettier runs in Atom?

@robwise
Copy link
Collaborator

robwise commented Feb 16, 2017

Hmm, this is strange. I'm not sure off the top of my head what the culprit here may be. To answer your question, yes other packages could interfere I suppose if you were using something like eslint's fix-on-save feature, but I'm not sure why that would cause this.

@darahak
Copy link
Collaborator Author

darahak commented Feb 24, 2017

It looks like this one: prettier/prettier#648

@robwise
Copy link
Collaborator

robwise commented Feb 25, 2017

@darahak Does that mean we should close here and that it's actually a prettier issue?

@darahak
Copy link
Collaborator Author

darahak commented Feb 25, 2017

@robwise Yes, I will follow this other issue instead. We can always re-open if necessary.

@darahak darahak closed this as completed Feb 25, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants