Escribiendo "Hello world" en Javascript
var hello_world ="Hello world"
console.log(hello_world)
Eslint: Error: Unexpected var, use let or const instead no-var
const hello_world ="Hello world"
console.log(hello_world)
Eslint: Error: Identifier 'hello_world' is not in camel case camelcase
const helloWorld ="Hello world"
console.log(helloWorld)
Eslint: Error: Replace "Hello world"
with [space]'Hello world'
const helloWorld = 'Hello world'
console.log(helloWorld)
Eslint: Error: Insert ;
at the end of line 1
const helloWorld = 'Hello world';
console.log(helloWorld)
Eslint: Error: Insert ;
at the end of line 2
const helloWorld = 'Hello world';
console.log(helloWorld);
Eslint: Warning: Unexpected console statement no-console
Nota: Eslint no muestra los errores 1 a 1, sinó el total, eso fue demostrativo.
Si bien javascript nos permite escribir código como mejor nos plasca, hay herramientas que nos ayudan a mejorar la calidad del mismo.