elicwhite / ESLint-Formatter

Sublime Text 3 Plugin to Autoformat with Eslint
MIT License
139 stars 20 forks source link

Global name 'data' is not defined #78

Closed dwhenson closed 4 years ago

dwhenson commented 4 years ago

I've tried installing this but I get the following error when I try to run: "Global name 'data' is not defined". I imagine I'm doing something very simple wrong, any advise would be appreciated.

Niekes commented 4 years ago

I have the same issue after updating:

// ...
        "ESLint-Formatter": {
            "format_on_save": true,
            "local_eslint_path": {
                "osx": "/usr/local/bin/eslint_d"
            },
            "format_on_save_extensions": [
                "js",
                "jsx",
                "es",
                "es6",
                "vue",
                "babel"
            ]
        },
// ...
Niekes commented 4 years ago

If you use eslint_d you can set "fix_to_stdout" In the settings to true

That fixed my problem.

// ...
        "ESLint-Formatter": {
            "format_on_save": true,
            "fix_to_stdout": true,
            "local_eslint_path": {
                "osx": "/usr/local/bin/eslint_d"
            },
            "format_on_save_extensions": [
                "js",
                "jsx",
                "es",
                "es6",
                "vue",
                "babel"
            ]
        },
// ...
yanqiangsjz commented 4 years ago

I have the same issue, what's wrong?

dwhenson commented 4 years ago

I'm just using the standard eslint plugin, what's the difference with eslint_d?

skeggse commented 4 years ago

My sincerest apologies; this was an oversight on my part. I've released a fix in 2.4.1, which should be available just as soon as Package Control finds the new tag and adds it to https://packagecontrol.io/channel_v3.json.