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

Brackets hangs during JSLint scan of large file #3

Open
jbmonroe opened this issue May 10, 2015 · 3 comments
Open

Brackets hangs during JSLint scan of large file #3

jbmonroe opened this issue May 10, 2015 · 3 comments

Comments

@jbmonroe
Copy link

I have a JS file that's an array of arrays used for games that need a dictionary. It's 1362KB in size, and upon loading it in Brackets, JSLint embarks on an epic journey to try to lint it.

Well, it doesn't need linting--just editing. Brackets hangs up like a jilted girlfriend during the lint, and it's entirely an issue with JSLint. (The current web version dies trying to parse it with a recursion failure.)

Not your fault, for sure, but still an issue. An option for the plug-in that disallowed linting any file larger than X KB would likely resolve this and still allow linting files of a more sane size. Any JS file larger than 100K probably needs to be broken down into smaller modules. Unfortunately for the dictionary, breaking it down into smaller files isn't really an option.

@markmcintyre
Copy link
Owner

An irritation, for sure. I wonder if the new version of Crockford's JSLint will resolve this issue? If not, I can look into including an option to disable linting on files. I'll likely update this plugin once the new JSLint version is released.

@jbmonroe
Copy link
Author

There may well be a Brackets config that gets around it. I (think I)
was using the new JSLint when I discovered the crash--the UI was new,
anyway.

I'm thinking the pro tip here is "you don't need to lint a large file
that's just an array, so just edit it with Sublime Text." I should use
this as a cue to just JSON/P the whole mess over in smaller units.

On 5/24/2015 1:30 PM, Mark McIntyre wrote:

An irritation, for sure. I wonder if the new version of Crockford's
JSLint will resolve this issue? If not, I can look into including an
option to disable linting on files. I'll likely update this plugin
once the new JSLint version is released.


Reply to this email directly or view it on GitHub
#3 (comment).

@TomMalbran
Copy link

@jbmonroe You can disable linting for that file in the .brackets.json file with something like:

    "path": {
        "path/to/file.js": {
            "linting.enabled": false
        }
    }

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

3 participants