Skip to content

Commit d1ff778

Browse files
committedAug 3, 2015
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.
1 parent b182482 commit d1ff778

File tree

4 files changed

+26
-3
lines changed

4 files changed

+26
-3
lines changed
 

‎.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
node_modules
2+
npm-debug.log
13
.DS_Store
4+
.settings
5+
.project
26
*.pyc
37
*.komodoproject

‎.jshintignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules/
2+
tests/
3+
demos/
4+
**/*_compressed.js
5+
**/*_uncompressed.js
6+
**/*_test.js

‎msg/messages.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,7 @@ Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = 'to last letter';
679679
Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = '';
680680

681681
/// url - Information about the case of letters (upper-case and lower-case).
682-
Blockly.Msg.TEXT_CHANGECASE_HELPURL = 'https://github.com/google/blockly/wiki/Text#adjusting-text-case'
682+
Blockly.Msg.TEXT_CHANGECASE_HELPURL = 'https://github.com/google/blockly/wiki/Text#adjusting-text-case';
683683
/// tooltip - Describes a block to adjust the case of letters. For more information on this block,
684684
/// see [https://github.com/google/blockly/wiki/Text#adjusting-text-case
685685
/// https://github.com/google/blockly/wiki/Text#adjusting-text-case].
@@ -979,7 +979,7 @@ Blockly.Msg.LISTS_GET_SUBLIST_TOOLTIP = 'Creates a copy of the specified portion
979979
/// url - Information describing splitting text into a list, or joining a list into text.
980980
Blockly.Msg.LISTS_SPLIT_HELPURL = 'https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists';
981981
/// dropdown - Indicates that text will be split up into a list (e.g. "a-b-c" -> ["a", "b", "c"]).
982-
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = 'make list from text'
982+
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = 'make list from text';
983983
/// dropdown - Indicates that a list will be joined together to form text (e.g. ["a", "b", "c"] -> "a-b-c").
984984
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = 'make text from list';
985985
/// block text - Prompts for a letter to be used as a separator when splitting or joining text.

‎package.json

+14-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
"version": "1.0.0",
44
"description": "Blockly is a library for building visual programming editors.",
55
"keywords": ["blockly"],
6+
"scripts": {
7+
"lint": "jshint ."
8+
},
69
"repository": {
710
"type": "git",
811
"url": "https://github.com/google/blockly.git"
@@ -15,5 +18,15 @@
1518
"name": "Neil Fraser"
1619
},
1720
"license": "Apache-2.0",
18-
"private": true
21+
"private": true,
22+
"devDependencies": {
23+
"jshint": "latest"
24+
},
25+
"jshintConfig": {
26+
"unused": true,
27+
"undef": true,
28+
"globalstrict": true,
29+
"sub": true,
30+
"predef": ["Blockly", "goog", "window", "document", "soy", "XMLHttpRequest"]
31+
}
1932
}

0 commit comments

Comments
 (0)
Please sign in to comment.