Add basic lint options for npm
To use this linter, make sure npm is installed and execute the following commands inside the main folder. 1.) Only once to update the package "npm install" 2.) To run the linter "npm run lint" This would make it easier to clean up some of the code.
Showing
.jshintignore
0 → 100644
... | @@ -3,6 +3,9 @@ | ... | @@ -3,6 +3,9 @@ |
"version": "1.0.0", | "version": "1.0.0", | ||
"description": "Blockly is a library for building visual programming editors.", | "description": "Blockly is a library for building visual programming editors.", | ||
"keywords": ["blockly"], | "keywords": ["blockly"], | ||
"scripts": { | |||
"lint": "jshint ." | |||
}, | |||
"repository": { | "repository": { | ||
"type": "git", | "type": "git", | ||
"url": "https://github.com/google/blockly.git" | "url": "https://github.com/google/blockly.git" | ||
... | @@ -15,5 +18,15 @@ | ... | @@ -15,5 +18,15 @@ |
"name": "Neil Fraser" | "name": "Neil Fraser" | ||
}, | }, | ||
"license": "Apache-2.0", | "license": "Apache-2.0", | ||
"private": true | "private": true, | ||
"devDependencies": { | |||
"jshint": "latest" | |||
}, | |||
"jshintConfig": { | |||
"unused": true, | |||
"undef": true, | |||
"globalstrict": true, | |||
"sub": true, | |||
"predef": ["Blockly", "goog", "window", "document", "soy", "XMLHttpRequest"] | |||
} | |||
} | } |
Please register or sign in to comment