What is the difference between line and compilation?

I know that in Java there is a compiler that tells you when you write the wrong code. But Javascript does not work like that because it does not have a compiler. However, "linting" javascripts is a way to compile code?

+4
source share
2 answers

Linting is syntax code to verify that the syntax and format are correct and to follow good practice. Linter will tell you if your indentation is incorrect or if you add spaces around your statements =. Linter may also warn you if your code contains well-known security flaws or code smells.

Compilation is a parsing to check the syntax and convert the code to another language (usually faster).

So what's the difference?

Compilation:

  • syntax check
  • code translated into another language

dust generation:

  • syntax check
  • formatting style and analysis
  • (optional) cheating code / detecting incorrect code
  • (optional) safety / performance analysis
+6
source

Linting is the process of launching a program that will analyze the code for any errors.

JavaScript Lint lints, JavaScript Firefox. , JavaScript, , script, .

javascript lint visit http://www.javascriptlint.com/

a

+2

Source: https://habr.com/ru/post/1656579/


All Articles