Skip to content

Instantly share code, notes, and snippets.

@ProfAvery
Created March 3, 2019 06:29
Show Gist options
  • Save ProfAvery/80afeab2e6a953906689ac492a7e79cd to your computer and use it in GitHub Desktop.
Save ProfAvery/80afeab2e6a953906689ac492a7e79cd to your computer and use it in GitHub Desktop.
Test file for ESLint
/*
*
* kda@bender:~/work/cpsc349$ eslint test.js
*
* /home/kda/work/cpsc349/test.js
* 18:15 error Missing space before function parentheses space-before-function-paren
* 19:1 error Expected indentation of 2 spaces but found 4 indent
* 19:27 error Missing semicolon semi
* 22:14 error Strings must use singlequote quotes
* 23:1 error 'greeting' is not defined no-undef
* 25:13 error 'greeting' is not defined no-undef
*
* ✖ 6 problems (6 errors, 0 warnings)
* 4 errors and 0 warnings potentially fixable with the `--fix` option.
*
*/
function hello(who) {
return `Hello, ${who}`
}
var target = "world";
greeting = hello(target);
console.log(greeting);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment