Community
    • Login

    Version 6.8.4 breaks JSLint plugin

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    15 Posts 5 Posters 12.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Peter BrandP
      Peter Brand
      last edited by

      Maybe that explains my question regarding recognition of JS in the FunctionList not working. Seems they have done some work in 6.8.4 to “Enhance Javascript syntax highlighting: 2 groups of keywords more for syntax highlighting customization.” - maybe that broke it.

      Reinstalling 6.8.3 fixed my FunctionList - can’t work without it.

      1 Reply Last reply Reply Quote 0
      • dailD
        dail
        last edited by

        There were some underlying changes how Notepad++ handles JavaScript. The authors of JSLint will have to update their plugin.

        1 Reply Last reply Reply Quote 0
        • Per SidenP
          Per Siden
          last edited by

          The last update to JSLint was in December 2013, I doubt the author will address these “underlying changes” in Notepad++ anytime soon.

          JSLint will hardly be the only plugin that breaks in this sense. Is there really no way Notepad++ could support the “legacy way”, whatever that may be, of getting the current file type?

          1 Reply Last reply Reply Quote 0
          • Per SidenP
            Per Siden
            last edited by

            Work-around when all else fails:

            1. Download JavascriptLint (http://www.javascriptlint.com/download.htm).
            2. Copy files to folder “C:\Program Files (x86)\JavascriptLint”.
            3. Install NPPExex plugin in the Plugin Manager.
            4. Execute as “C:\Program Files (x86)\JavascriptLint\jsl.exe” -nologo -nofilelisting -conf “C:\Program Files (x86)\JavaScriptLint\jsl.default.conf” -process “$(FULL_CURRENT_PATH)”

            JavascriptLint is not indentical to JSLint. I think it’s possible to run JSLint in the same fashion. Bit this is a very crude work-around to the JSLint plugin. Probably better to stay on Notepad++ version 6.8.3.

            1 Reply Last reply Reply Quote 0
            • dailD
              dail
              last edited by

              Is there really no way Notepad++ could support the “legacy way”, whatever that may be, of getting the current file type?

              That’s not a half bad idea, although I don’t know enough about the changes to know if that is possible.

              1 Reply Last reply Reply Quote 0
              • Per SidenP
                Per Siden
                last edited by

                Legacy compliance tend to build up a technical debt, but if it would be possible to implement some sort of legacy fallback for a limited time only in all bu the release candidates (e.g. only for the auto-update versions), if can then safely be removed later on, say in six months or a years time. The plugins that are still up to to the task will break, but with a reasonable delay.

                1 Reply Last reply Reply Quote 0
                • dailD
                  dail
                  last edited by

                  Even if some backwards compatibility was put in place, it just pushes the problem down the road some to either wait for the author to update it (which according to you probably won’t happen), or inform thousands of users it will break eventually (which will never happen). It would have been nice if this kind of change was made to a major N++ update, for example v6.7.x to v6.8, not a minor update which was v6.8.3 to v6.8.4.

                  But I do totally agree with you that it would have been nice to inform plugin developers of the changes going to be made or to temporarily have some backwards compatibility in place for a while. But what’s done is done I guess…

                  Honestly, if JSLint is easy to build from source, it probably wouldn’t be more than a few lines that need changed. I may look into it if I have some free time.

                  1 Reply Last reply Reply Quote 0
                  • Per SidenP
                    Per Siden
                    last edited by

                    A prime suspect is the split of JavaScript that took place in version 6.8.4.

                    • The file “langs.model.xml” used to have only one entry for JavaScript (named “javascript”) for file types js, jsm and json.
                    • That langauge entry has now been renamed “javascript.js” (and JSON has been moved to an entry of its own).
                    • The old “javascript” entry has been reused for embedded code.

                    Perhaps that’s what’s confusing plugins?

                    I wonder if it would be possible to avoid the problems altogether by simply letting the “new” embedded language not hijack the old “javascript” name?

                    1 Reply Last reply Reply Quote 0
                    • dailD
                      dail
                      last edited by

                      I may look into it if I have some free time.

                      Oh well, I tried…I got it to build partly but it uses the v8 JavaScript library from Google, and being Google they do everything their own way and have some weird build system/tools I don’t feel like fighting my way through.

                      Per SidenP 1 Reply Last reply Reply Quote 0
                      • Per SidenP
                        Per Siden @dail
                        last edited by

                        Nice of you to give it a try, @dail.

                        I should think there is a window op opportunity to set up an all new plugin for linting. ;)

                        Maybe Douglas Crockford’s implementation of the JSLint web (https://github.com/douglascrockford/JSLint) could be used? Is it possible to build a Notepad++ plugin running JavaScript?

                        1 Reply Last reply Reply Quote 0
                        • Per SidenP
                          Per Siden
                          last edited by

                          May I suggest the JSLint plugin version (currently at V0.8.117) is downgraded from Stability “Good” to “Poor - No support for Notepad++ V6.8.4 and newer”?

                          1 Reply Last reply Reply Quote 0
                          • Per SidenP
                            Per Siden
                            last edited by Per Siden

                            Note that there is a work-around: Selecting CSS from the Language menu.

                            Perhaps Stability should rather be “Poor - Limited support for Notepad++ V6.8.4 and newer”?

                            1 Reply Last reply Reply Quote 1
                            • Manuel LemckeM
                              Manuel Lemcke
                              last edited by

                              After installing Version 0.8.3 over the one installed by the PluginManager everything works fine for me. I downloaded it from sourceforge: https://sourceforge.net/projects/jslintnpp/

                              Per SidénP 1 Reply Last reply Reply Quote 0
                              • Per SidénP
                                Per Sidén @Manuel Lemcke
                                last edited by

                                @Manuel-Lemcke it was promising that a new version was released, but unfortunately it fails on any JSLint option and there have been no updates since. Version 0.8.1.117 distributed with Notepad++ is still the better option.

                                I advice against Notepad++ distributing 0.8.3.

                                1 Reply Last reply Reply Quote 0
                                • First post
                                  Last post
                                The Community of users of the Notepad++ text editor.
                                Powered by NodeBB | Contributors