Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jumps to top of file randomly #73

Open
Niekes opened this issue Apr 24, 2020 · 1 comment
Open

Jumps to top of file randomly #73

Niekes opened this issue Apr 24, 2020 · 1 comment

Comments

@Niekes
Copy link

Niekes commented Apr 24, 2020

I am using Sublime Text 3.2.2 Build 3211 on Mac Version 10.14.6 (18G4032). Eslint-Formatter v2.3.1. I use it mainly in vue projects but also in Vanilla JS projects.

After formatting the file it jumps to the top of the file. Randomly. I can not track down any pattern. It just happens randomly. Any thoughts?

Here is my .eslintrc.js for my vue-projects:

module.exports = {
    root: true,
    env: {
        node: true,
    },
    extends: [
        'plugin:vue/recommended',
        '@vue/airbnb',
    ],
    rules: {
        'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
        'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
        indent: ['error', 4],
        // don't require .vue extension when importing
        'import/extensions': ['error', 'always', {
            js: 'never',
            vue: 'never',
        }],
        'vue/html-indent': ['error', 4],
    },
    parserOptions: {
        parser: 'babel-eslint',
    },
};

Here is my .eslintrc.js for my vanilla projects:

module.exports = {
    root: true,

    env: {
        browser: true,
    },

    extends: [
        'airbnb'
    ],

    rules: {
        'import/no-unresolved': [2, { ignore: ['$'] }],
        'indent': ['error', 4],
        'react/no-this-in-sfc': [0],
    },
}

And finally my sublime-project file:

// ...
        "ESLint-Formatter": {
            "format_on_save": true,
            "format_on_save_extensions": [
                "js",
                "jsx",
                "es",
                "es6",
                "vue",
                "babel"
            ]
        },
// ...
@jazairi
Copy link

jazairi commented May 7, 2020

I'm also having this issue, but I haven't been able to identify a pattern yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants