• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Dreamweaver 2017.5 - Red numbers in JavaScript

Participant ,
Jul 25, 2017 Jul 25, 2017

Copy link to clipboard

Copied

Why are there these red numbers showing erroneous errors in files with the .js extension?

Here's an example:

For example if I hover my cursor over the number 2 I see this message:

Is there a way to disable these erroneous red numbers and messages?

Views

1.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Jul 25, 2017 Jul 25, 2017

All these errors are caused by the use of linting, which i always turn off.

You will find the setting to turn linting off in your Dw preferences window. It is an all or nothing setting in Dw, so turning off will also turn linting off for every other supported file type.

Linting is in theory a good idea, but in practice it is only for beginners in my opinion.

Votes

Translate

Translate
Community Expert ,
Jul 25, 2017 Jul 25, 2017

Copy link to clipboard

Copied

That's DW's overzealous Linting tool. It likes things to be done a certain way, even if they way you're doing it isn't invalid, it will still tell you it is on certain items.

It's disabled under Edit > Preferences > Linting

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 25, 2017 Jul 25, 2017

Copy link to clipboard

Copied

https://forums.adobe.com/people/Jon+Fritz+II  wrote

That's DW's overzealous Linting tool. It likes things to be done a certain way, even if they way you're doing it isn't invalid, it will still tell you it is on certain items.

It's disabled under Edit > Preferences > Linting

Actually it can be a useful guide. I don't now about the linting in DW as I have not had the pleasure of using it but in the program I use I look and see what it says - sometimes it can be very useful for improving your coding abilities where the over use of declarations can be consolidated into somethimg more streamlined, make one a better coder, I think anyway.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 25, 2017 Jul 25, 2017

Copy link to clipboard

Copied

Sure, it could be a useful guide, if it worked correctly.

DW used to fire the Linter on Open, Edit and Save in CC2015. In CC2017, it only fires on Save, so your errors and inconsistencies need to be "baked into" your document before it will mention them. An interesting concept for someone who uses the DW Upload on Save function. The errors, if they are errors or not, also don't go away until the document is saved a second time.

It needs to differentiate between capital E "Errors", like an unclosed <div> tag or missing doctype declaration, and inconsistencies/abnormalities/non-errors, like using single quotes for tag attributes or writing a tag in all uppercase letters.

It also likes to mark all kinds of things in javascript as errors that simply aren't. In some cases leading the developer on lengthy wild goose chases for phantom errors. Sure, there might be a more streamlined way to do something, but if it's not an actual "error" it should say so, but doesn't.

So, I award the overzealous moniker. In my book, it's pretty much useless given all of the other validation tools already available for saved files. I don't need a bunch of red line numbers on code I know to be correct, that the Linter just doesn't like.

In CC2015, I simply changed the attributes for a couple of the "non-error errors" in the Linter (like double quoting attributes) , preferring to see the errors as I created them over running a validator. Now in CC2017, I turn it off entirely and use the validation tools instead.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 25, 2017 Jul 25, 2017

Copy link to clipboard

Copied

https://forums.adobe.com/people/Jon+Fritz+II  wrote

Sure, it could be a useful guide, if it worked correctly.

DW used to fire the Linter on Open, Edit and Save in CC2015. In CC2017, it only fires on Save, so your errors and inconsistencies need to be "baked into" your document before it will mention them. An interesting concept for someone who uses the DW Upload on Save function. The errors, if they are errors or not, also don't go away until the document is saved a second time.

It needs to differentiate between capital E "Errors", like an unclosed <div> tag or missing doctype declaration, and inconsistencies/abnormalities/non-errors, like using single quotes for tag attributes or writing a tag in all uppercase letters.

It also likes to mark all kinds of things in javascript as errors that simply aren't. In some cases leading the developer on lengthy wild goose chases for phantom errors. Sure, there might be a more streamlined way to do something, but if it's not an actual "error" it should say so, but doesn't.

So, I award the overzealous moniker. In my book, it's pretty much useless given all of the other validation tools already available for saved files. I don't need a bunch of red line numbers on code I know to be correct, that the Linter just doesn't like.

In CC2015, I simply changed the attributes for a couple of the "non-error errors" in the Linter (like double quoting attributes) , preferring to see the errors as I created them over running a validator. Now in CC2017, I turn it off entirely and use the validation tools instead.

Probably not DW's strongest point, need to look elsewhere for it to be of any real benefit. I know for me in php storm it assists as it catches a lot of things in real-time which are critical, usually down to slack coding, a missing : or opening $ etc. I can put that right as it occurs.

The program also suggests a better workflow if you understand the messages it provides so I think in the right program it can be of use, probably not DW by the sounds of it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 25, 2017 Jul 25, 2017

Copy link to clipboard

Copied

osgood_  wrote

- sometimes it can be very useful for improving your coding abilities where the over use of declarations can be consolidated into somethimg more streamlined, make one a better coder, I think anyway.

I was going to write -"as i said, only for beginners", just as a joke, but decided not to

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 25, 2017 Jul 25, 2017

Copy link to clipboard

Copied

pziecina  wrote

osgood_   wrote

- sometimes it can be very useful for improving your coding abilities where the over use of declarations can be consolidated into somethimg more streamlined, make one a better coder, I think anyway.

I was going to write -"as i said, only for beginners", just as a joke, but decided not to

Don't know, Php Storm may work better than DW. I know its improved some areas of my jQuery implementations where I was using duplicated selectors which could be consolidated into a single variable. I'm always looking to improve. I see so many tutorials where the teacher uses bad practices its unreal and I'm not even good at this stuff, so they must be double poop.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 25, 2017 Jul 25, 2017

Copy link to clipboard

Copied

The problem with any code is that we all at some point fall into our own method of coding, complete with everything that is good and bad. Linting also falls into the same catagory in my opinion, in that it is someone elses idea of how one should code.

Yes, it is 'peer' checked, but if those 'peers' also have the same mind set as the creator then it becomes a "do as i think" feature, and not genuinly helpfull.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 25, 2017 Jul 25, 2017

Copy link to clipboard

Copied

LATEST

pziecina  wrote

The problem with any code is that we all at some point fall into our own method of coding, complete with everything that is good and bad. Linting also falls into the same catagory in my opinion, in that it is someone elses idea of how one should code.

Don't agree, some coding is just pain awful, although it still works. A good program can certainly push you in the right direction then its up to you if you take its advice. I'm not an expert in jQuery or php but I can see that some of the suggestions made make perfect sense to me but of course if you are code clueless it probably will make no difference.....youll continue to use bloated code and poor implmentation of a language.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 25, 2017 Jul 25, 2017

Copy link to clipboard

Copied

All these errors are caused by the use of linting, which i always turn off.

You will find the setting to turn linting off in your Dw preferences window. It is an all or nothing setting in Dw, so turning off will also turn linting off for every other supported file type.

Linting is in theory a good idea, but in practice it is only for beginners in my opinion.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 25, 2017 Jul 25, 2017

Copy link to clipboard

Copied

Thank you.

I have now disabled linting.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines