This repository has been archived by the owner on Sep 13, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update makefiles, jshint/jscs -> eslint
- Loading branch information
Showing
11 changed files
with
125 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
1.11.0 | ||
=================== | ||
|
||
* Use eslint instead of jshint/jscs | ||
|
||
1.10.0 (2015-06-05) | ||
=================== | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
module.exports = { | ||
"env": { | ||
"browser": true, | ||
"amd": true, | ||
"jquery": true | ||
}, | ||
"plugins": [ | ||
"security", | ||
"scanjs-rules", | ||
"no-unsafe-innerhtml" | ||
], | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:security/recommended" | ||
], | ||
"rules": { | ||
"indent": [ | ||
"error", | ||
4 | ||
], | ||
"linebreak-style": [ | ||
"error", | ||
"unix" | ||
], | ||
"no-unused-vars": [ | ||
"error", | ||
{"vars": "all", "args": "none"} | ||
], | ||
"quotes": [ | ||
"error", | ||
"single" | ||
], | ||
"semi": [ | ||
"error", | ||
"always" | ||
], | ||
/** no-unsafe-innerhtml rule **/ | ||
"no-unsafe-innerhtml/no-unsafe-innerhtml" : 2, | ||
|
||
/** ScanJS rules **/ | ||
"scanjs-rules/assign_to_hostname": 1, | ||
"scanjs-rules/assign_to_href": 1, | ||
"scanjs-rules/assign_to_location": 1, | ||
"scanjs-rules/assign_to_onmessage": 1, | ||
"scanjs-rules/assign_to_pathname": 1, | ||
"scanjs-rules/assign_to_protocol": 1, | ||
"scanjs-rules/assign_to_search": 1, | ||
"scanjs-rules/assign_to_src": 1, | ||
"scanjs-rules/call_Function": 1, | ||
"scanjs-rules/call_addEventListener": 1, | ||
"scanjs-rules/call_addEventListener_deviceproximity": 1, | ||
"scanjs-rules/call_addEventListener_message": 1, | ||
"scanjs-rules/call_connect": 1, | ||
"scanjs-rules/call_eval": 1, | ||
"scanjs-rules/call_execScript": 1, | ||
"scanjs-rules/call_hide": 0, /* hide used often. overly cautious */ | ||
"scanjs-rules/call_open_remote=true": 1, | ||
"scanjs-rules/call_parseFromString": 1, | ||
"scanjs-rules/call_setImmediate": 1, | ||
"scanjs-rules/call_setInterval": 1, | ||
"scanjs-rules/call_setTimeout": 1, | ||
"scanjs-rules/identifier_indexedDB": 1, | ||
"scanjs-rules/identifier_localStorage": 1, | ||
"scanjs-rules/identifier_sessionStorage": 1, | ||
"scanjs-rules/new_Function": 1, | ||
"scanjs-rules/property_addIdleObserver": 1, | ||
"scanjs-rules/property_createContextualFragment": 1, | ||
"scanjs-rules/property_geolocation": 1, | ||
"scanjs-rules/property_getUserMedia": 1, | ||
"scanjs-rules/property_indexedDB": 1, | ||
"scanjs-rules/property_localStorage": 1, | ||
"scanjs-rules/property_mgmt": 1, | ||
"scanjs-rules/property_sessionStorage": 1, | ||
|
||
'security/detect-buffer-noassert': 1, | ||
'security/detect-child-process': 1, | ||
'security/detect-disable-mustache-escape': 1, | ||
'security/detect-eval-with-expression': 1, | ||
'security/detect-new-buffer': 1, | ||
'security/detect-no-csrf-before-method-override': 1, | ||
'security/detect-non-literal-fs-filename': 1, | ||
'security/detect-non-literal-regexp': 1, | ||
'security/detect-non-literal-require': 0, /* requirejs conflict */ | ||
'security/detect-object-injection': 0, /* several false positives */ | ||
'security/detect-possible-timing-attacks': 1, | ||
'security/detect-pseudoRandomBytes': 1, | ||
'security/detect-unsafe-regex': 1 | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,36 @@ | ||
# VERSION=1.0.0 | ||
# VERSION=1.3.0 | ||
|
||
# CHANGES: | ||
# 1.3.0 - restore eslint | ||
# 1.2.0 - restore jshint/jscs | ||
|
||
# expect JS_FILES to be set from the main Makefile, but default | ||
# to everything in media/js otherwise. | ||
# | ||
# When setting a custom value for this variable in your own Makefile, | ||
# the line should look like this: | ||
# JS_FILES=media/js/src media/js/tests | ||
# | ||
# and not: | ||
# JS_FILES="media/js/src media/js/tests" | ||
# | ||
# Using quotes here will cause eslint to ignore this argument. | ||
# | ||
JS_FILES ?= media/js | ||
|
||
NODE_MODULES ?= ./node_modules | ||
JS_SENTINAL ?= $(NODE_MODULES)/sentinal | ||
JSHINT ?= $(NODE_MODULES)/jshint/bin/jshint | ||
JSCS ?= $(NODE_MODULES)/jscs/bin/jscs | ||
ESLINT ?= $(NODE_MODULES)/.bin/eslint | ||
|
||
$(JS_SENTINAL): package.json | ||
rm -rf $(NODE_MODULES) | ||
npm install | ||
touch $(JS_SENTINAL) | ||
|
||
jshint: $(JS_SENTINAL) | ||
$(JSHINT) $(JS_FILES) | ||
|
||
jscs: $(JS_SENTINAL) | ||
$(JSCS) $(JS_FILES) | ||
eslint: $(JS_SENTINAL) | ||
$(ESLINT) $(JS_FILES) | ||
|
||
jstest: $(JS_SENTINAL) | ||
npm test | ||
|
||
.PHONY: jshint jscs jstest | ||
.PHONY: eslint jstest |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/* jshint node: true */ | ||
/* eslint-env node */ | ||
|
||
var requirejs = require('requirejs'); | ||
requirejs.config({ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters