Что такое JSLint и зачем он нужен JavaScript — developer’у

Недавно дочитал книжку Стояна Стефанова «Java Script Patterns«, благодаря которой узнал об очень классной тулзе для проверки правильности JS-кода. Называется она JSLint.

Java Script – это интерпретируемый язык программирования, для которого не предусматривается статическая проверка типов на этапе компиляции. Вследствие этого вполне возможно развернуть программу с ошибкой, вызванной обычной опечаткой, не заметив этого. Чтобы не допустить подобных ситуаций, можно воспользоваться инструментом JSLint (http://jslint.com).



JSLint – это инструмент проверки качества программного кода на JavaScript, созданный Дугласом Крокфордом (Douglas Crockford), который проверит ваш программный код и предупредит обо всех потенциальных проблемах.

Обязательно проверяйте свои сценарии с помощью JSLint. Этот инструмент «будет задевать ваше самолюбие», как предупреждает его создатель, но только на первых порах. Благодаря JSLint вы будете быстро учиться на собственных ошибках и постепенно выработаете в себе основные привычки профессионального программиста на Java Script. Отсутствие предупреждений после проверки с помощью JSLint поднимет вашу уверенность в программном коде, так как вы будете знать, что второпях не допустили элементарных оплошностей или синтаксических ошибок.



Настройки JSLint по умолчанию предполагают, что проверяемый программный код написан для работы в строгом режиме, в котором запрещается использование некоторых особенностей языка, что делает программы более простыми и более устойчивыми к ошибкам.

Инструмент JSLint написан на Java Script (и наверняка сам прошел бы проверку с помощью JSLint). Самое интересное, что он доступен в двух вариантах – как веб-инструмент и как самостоятельная утилита для многих платформ и интерпретаторов Java Script. Вы можете загрузить его и запускать локально на любой из платформ, где имеется WSH (Windows Scripting Host – среда выполнения сценариев для Windows – компонент, входящий в состав всех операционных сис тем Windows), JSC (Java ScriptCore, компонент операционной сис темы Mac OSX) или Rhino (интерпретатор Java Script, выпущенный компанией Mozilla). Было бы просто отлично загрузить JSLint и интегрировать его в свой текстовый редактор, чтобы выработать в себе привычку запускать его перед каждым сохранением файла.

Что такое JSLint и зачем он нужен JavaScript — developer’у
7 votes, 4.86 avg. rating (97% score)

56 thoughts on “Что такое JSLint и зачем он нужен JavaScript — developer’у

  1. Hi I am so delighted I found your webpage, I really found you by mistake, while I was researching on Yahoo for something else, Nonetheless I am here now and would just like to say thanks for a remarkable post and a all round thrilling blog (I also love the theme/design), I don’t have time to read through it all at the moment but I have bookmarked it and also included your RSS feeds, so when I have time I will be back to read more, Please do keep up the excellent jo.

  2. Unquestionably believe that which you said. Your favorite reason seemed to be on the web the easiest thing to be aware of. I say to you, I definitely get annoyed while people think about worries that they plainly don’t know about. You managed to hit the nail upon the top and also defined out the whole thing without having side-effects , people could take a signal. Will probably be back to get more. Thanks

  3. I loved as much as you’ll receive carried out right here. The sketch is attractive, your authored material stylish. nonetheless, you command get bought an edginess over that you wish be delivering the following. unwell unquestionably come further formerly again as exactly the same nearly very often inside case you shield this hike.
    cialishuk online

  4. I’m impressed, I must say. Seldom do I encounter a blog that’s both equally educative and entertaining, and without a doubt, you have hit the nail on the head. The problem is something too few men and women are speaking intelligently about. I’m very happy I found this in my search for something regarding this.

  5. I think that what you published was very reasonable. But, what about this? what if you added a little content? I mean, I don’t want to tell you how to run your blog, but suppose you added a headline to possibly get a person’s attention? I mean %BLOG_TITLE% is a little boring. You could look at Yahoo’s home page and see how they write news headlines to grab people to open the links. You might add a related video or a related pic or two to get readers interested about everything’ve got to say. Just my opinion, it could bring your website a little bit more interesting.

  6. Hello, There’s no doubt that your web site may be having web browser compatibility problems. When I take a look at your blog in Safari, it looks fine however, when opening in Internet Explorer, it has some overlapping issues. I simply wanted to provide you with a quick heads up! Apart from that, wonderful blog!

  7. What i do not realize is if truth be told how you’re not really much more well-appreciated than you may be now. You’re so intelligent. You realize therefore considerably in the case of this subject, produced me personally consider it from a lot of varied angles. Its like men and women are not interested unless it’s one thing to accomplish with Lady gaga! Your personal stuffs outstanding. All the time care for it up!
    levitra 20 mg

  8. Hey there just wanted to give you a quick heads up and let you know a few of the pictures aren’t loading properly. I’m not sure why but I think its a linking issue. I’ve tried it in two different browsers and both show the same outcome.

  9. I know this if off topic but I’m looking into starting my own weblog and was wondering what all is required to get setup? I’m assuming having a blog like yours would cost a pretty penny? I’m not very internet savvy so I’m not 100% certain. Any recommendations or advice would be greatly appreciated. Thanks
    generic levitra

  10. Hey I know this is off topic but I was wondering if you knew of any widgets I could add to my blog that automatically tweet my newest twitter updates. I’ve been looking for a plug-in like this for quite some time and was hoping maybe you would have some experience with something like this. Please let me know if you run into anything. I truly enjoy reading your blog and I look forward to your new updates.
    canadian pharmacies

  11. It is appropriate time to make a few plans for the future and it’s time to be happy. I’ve learn this submit and if I may just I desire to recommend you few attention-grabbing issues or suggestions. Maybe you can write subsequent articles regarding this article. I want to read more things approximately it!
    canadian pharmacies

  12. Hey just wanted to give you a quick heads up. The text in your post seem to be running off the screen in Internet explorer. I’m not sure if this is a formatting issue or something to do with web browser compatibility but I figured I’d post to let you know. The style and design look great though! Hope you get the issue solved soon. Kudos
    online pharmacies canada

  13. Hi there, I found your blog by the use of Google whilst looking for a similar subject, your web site came up, it appears to be like good. I’ve bookmarked it in my google bookmarks.
    Hi there, simply changed into aware of your blog through Google, and located that it’s really informative. I am gonna watch out for brussels. I will be grateful in case you proceed this in future. Many folks will be benefited out of your writing. Cheers!

Добавить комментарий

Ваш e-mail не будет опубликован. Обязательные поля помечены *