Commit 83088e68 by Clinton Blackburn

Removed JSCS

ESLint is sufficient as JSCS is no longer maintained.

LEARNER-1668
parent 1a38a361
{
"requireCurlyBraces": ["if", "else", "for", "while", "do", "try", "catch"],
"requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"],
"requireParenthesesAroundIIFE": true,
"requireSpacesInFunctionExpression": {
"beforeOpeningCurlyBrace": true
},
"requireMultipleVarDecl": true,
"disallowEmptyBlocks": true,
"disallowQuotedKeysInObjects": "allButReserved",
"requireCommaBeforeLineBreak": true,
"requireOperatorBeforeLineBreak": ["?", "+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
"disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
"disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
"requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
"requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
"disallowKeywords": ["with"],
"disallowMultipleLineBreaks": true,
"validateLineBreaks": "LF",
"disallowMixedSpacesAndTabs": true,
"disallowTrailingWhitespace": true,
"disallowKeywordsOnNewLine": ["else"],
"requireLineFeedAtFileEnd": true,
"requireCapitalizedConstructors": true,
"requireDotNotation": true,
"excludeFiles": ["node_modules/**", "ecommerce/static/js/vendor/**", "ecommerce/static/js/common.js"],
"validateIndentation": 4
}
...@@ -65,7 +65,6 @@ validate_js: ...@@ -65,7 +65,6 @@ validate_js:
rm -rf coverage rm -rf coverage
$(NODE_BIN)/gulp test $(NODE_BIN)/gulp test
$(NODE_BIN)/gulp lint $(NODE_BIN)/gulp lint
$(NODE_BIN)/gulp jscs
validate_python: clean quality validate_python: clean quality
PATH=$$PATH:$(NODE_BIN) REUSE_DB=1 coverage run --branch --source=ecommerce ./manage.py test ecommerce \ PATH=$$PATH:$(NODE_BIN) REUSE_DB=1 coverage run --branch --source=ecommerce ./manage.py test ecommerce \
......
...@@ -242,7 +242,6 @@ ...@@ -242,7 +242,6 @@
.. _Jasmine: http://jasmine.github.io/2.3/introduction.html .. _Jasmine: http://jasmine.github.io/2.3/introduction.html
.. _edX JavaScript standards: https://github.com/edx/edx-platform/wiki/Javascript-standards-for-the-edx-platform .. _edX JavaScript standards: https://github.com/edx/edx-platform/wiki/Javascript-standards-for-the-edx-platform
.. _ESLint: http://www.eslint.org .. _ESLint: http://www.eslint.org
.. _jscs: https://www.npmjs.org/package/jscs
.. _Waffle: http://waffle.readthedocs.org/en/latest .. _Waffle: http://waffle.readthedocs.org/en/latest
.. _Waffle documentation: http://waffle.readthedocs.org/en/latest .. _Waffle documentation: http://waffle.readthedocs.org/en/latest
.. _Segment: https://segment.com .. _Segment: https://segment.com
......
...@@ -111,7 +111,7 @@ directory, and add a ``_spec`` suffix. For example, your test name may be ...@@ -111,7 +111,7 @@ directory, and add a ``_spec`` suffix. For example, your test name may be
``ecommerce/static/js/test/specs/course_list_view_spec.js``. ``ecommerce/static/js/test/specs/course_list_view_spec.js``.
All JavaScript code must adhere to the `edX JavaScript standards`_. These All JavaScript code must adhere to the `edX JavaScript standards`_. These
standards are enforced using `ESLint`_ and `jscs`_. standards are enforced using `ESLint`_.
* To run all JavaScript unit tests and linting checks, run the following * To run all JavaScript unit tests and linting checks, run the following
command. command.
...@@ -121,9 +121,8 @@ standards are enforced using `ESLint`_ and `jscs`_. ...@@ -121,9 +121,8 @@ standards are enforced using `ESLint`_ and `jscs`_.
$ make validate_js $ make validate_js
===================================
Run E-Commerce Acceptance Tests Run E-Commerce Acceptance Tests
=================================== ===============================
To run specific acceptance tests for the E-Commerce service, you must complete To run specific acceptance tests for the E-Commerce service, you must complete
the following procedures. the following procedures.
...@@ -133,7 +132,7 @@ the following procedures. ...@@ -133,7 +132,7 @@ the following procedures.
:local: :local:
Configure the LMS Configure the LMS
******************** *****************
To configure the LMS, follow these steps. To configure the LMS, follow these steps.
...@@ -221,7 +220,7 @@ You use the CAT to finish configuring the two courses in your LMS instance. ...@@ -221,7 +220,7 @@ You use the CAT to finish configuring the two courses in your LMS instance.
.. _Configure Acceptance Tests: .. _Configure Acceptance Tests:
Configure Acceptance Tests Configure Acceptance Tests
********************************* **************************
You configure acceptance tests by using the settings in the You configure acceptance tests by using the settings in the
``ecommerce/blob/master/acceptance_tests/config.py`` file. You can use the ``ecommerce/blob/master/acceptance_tests/config.py`` file. You can use the
...@@ -264,7 +263,7 @@ settings by using environment variables. ...@@ -264,7 +263,7 @@ settings by using environment variables.
Run Acceptance Tests Run Acceptance Tests
****************************** ********************
Run all acceptance tests by executing ``make accept``. To run a specific test, Run all acceptance tests by executing ``make accept``. To run a specific test,
execute the following command. execute the following command.
......
// jscs:disable requireCapitalizedConstructors
define([ define([
'backbone', 'backbone',
'backbone.relational', 'backbone.relational',
......
...@@ -44,9 +44,7 @@ define([ ...@@ -44,9 +44,7 @@ define([
}; };
/* eslint-disable */ /* eslint-disable */
// jscs:disable
window.analytics = window.analytics || []; if (!analytics.initialize) if (analytics.invoked)window.console && console.error && console.error('Segment snippet included twice.'); else { analytics.invoked = !0; analytics.methods = ['trackSubmit', 'trackClick', 'trackLink', 'trackForm', 'pageview', 'identify', 'group', 'track', 'ready', 'alias', 'page', 'once', 'off', 'on']; analytics.factory = function(t) { return function() { var e = Array.prototype.slice.call(arguments); e.unshift(t); analytics.push(e); return analytics; }; }; for (var t = 0; t < analytics.methods.length; t++) { var e = analytics.methods[t]; analytics[e] = analytics.factory(e); }analytics.load = function(t) { var e = document.createElement('script'); e.type = 'text/javascript'; e.async = !0; e.src = (document.location.protocol === 'https:' ? 'https://' : 'http://') + 'cdn.segment.com/analytics.js/v1/' + t + '/analytics.min.js'; var n = document.getElementsByTagName('script')[0]; n.parentNode.insertBefore(e, n); }; analytics.SNIPPET_VERSION = '3.0.1'; } window.analytics = window.analytics || []; if (!analytics.initialize) if (analytics.invoked)window.console && console.error && console.error('Segment snippet included twice.'); else { analytics.invoked = !0; analytics.methods = ['trackSubmit', 'trackClick', 'trackLink', 'trackForm', 'pageview', 'identify', 'group', 'track', 'ready', 'alias', 'page', 'once', 'off', 'on']; analytics.factory = function(t) { return function() { var e = Array.prototype.slice.call(arguments); e.unshift(t); analytics.push(e); return analytics; }; }; for (var t = 0; t < analytics.methods.length; t++) { var e = analytics.methods[t]; analytics[e] = analytics.factory(e); }analytics.load = function(t) { var e = document.createElement('script'); e.type = 'text/javascript'; e.async = !0; e.src = (document.location.protocol === 'https:' ? 'https://' : 'http://') + 'cdn.segment.com/analytics.js/v1/' + t + '/analytics.min.js'; var n = document.getElementsByTagName('script')[0]; n.parentNode.insertBefore(e, n); }; analytics.SNIPPET_VERSION = '3.0.1'; }
// jscs:enable
/* eslint-enable */ /* eslint-enable */
}); });
......
...@@ -17,9 +17,7 @@ define([ ...@@ -17,9 +17,7 @@ define([
AnalyticsUtils.analyticsSetUp(); AnalyticsUtils.analyticsSetUp();
/* eslint-disable */ /* eslint-disable */
// jscs:disable
window.analytics = window.analytics || []; if (!analytics.initialize) if (analytics.invoked)window.console && console.error && console.error('Segment snippet included twice.'); else { analytics.invoked = !0; analytics.methods = ['trackSubmit', 'trackClick', 'trackLink', 'trackForm', 'pageview', 'identify', 'group', 'track', 'ready', 'alias', 'page', 'once', 'off', 'on']; analytics.factory = function(t) { return function() { var e = Array.prototype.slice.call(arguments); e.unshift(t); analytics.push(e); return analytics; }; }; for (var t = 0; t < analytics.methods.length; t++) { var e = analytics.methods[t]; analytics[e] = analytics.factory(e); }analytics.load = function(t) { var e = document.createElement('script'); e.type = 'text/javascript'; e.async = !0; e.src = (document.location.protocol === 'https:' ? 'https://' : 'http://') + 'cdn.segment.com/analytics.js/v1/' + t + '/analytics.min.js'; var n = document.getElementsByTagName('script')[0]; n.parentNode.insertBefore(e, n); }; analytics.SNIPPET_VERSION = '3.0.1'; } window.analytics = window.analytics || []; if (!analytics.initialize) if (analytics.invoked)window.console && console.error && console.error('Segment snippet included twice.'); else { analytics.invoked = !0; analytics.methods = ['trackSubmit', 'trackClick', 'trackLink', 'trackForm', 'pageview', 'identify', 'group', 'track', 'ready', 'alias', 'page', 'once', 'off', 'on']; analytics.factory = function(t) { return function() { var e = Array.prototype.slice.call(arguments); e.unshift(t); analytics.push(e); return analytics; }; }; for (var t = 0; t < analytics.methods.length; t++) { var e = analytics.methods[t]; analytics[e] = analytics.factory(e); }analytics.load = function(t) { var e = document.createElement('script'); e.type = 'text/javascript'; e.async = !0; e.src = (document.location.protocol === 'https:' ? 'https://' : 'http://') + 'cdn.segment.com/analytics.js/v1/' + t + '/analytics.min.js'; var n = document.getElementsByTagName('script')[0]; n.parentNode.insertBefore(e, n); }; analytics.SNIPPET_VERSION = '3.0.1'; }
// jscs:enable
/* eslint-enable */ /* eslint-enable */
}); });
......
...@@ -57,10 +57,8 @@ define([ ...@@ -57,10 +57,8 @@ define([
initSegment: function(applicationKey) { initSegment: function(applicationKey) {
var analytics; var analytics;
// jscs:disable
// eslint-disable-next-line // eslint-disable-next-line
analytics = window.analytics = window.analytics || []; if (!analytics.initialize) if (analytics.invoked)window.console && console.error && console.error('Segment snippet included twice.'); else { analytics.invoked = !0; analytics.methods = ['trackSubmit', 'trackClick', 'trackLink', 'trackForm', 'pageview', 'identify', 'group', 'track', 'ready', 'alias', 'page', 'once', 'off', 'on']; analytics.factory = function(t) { return function() { var e = Array.prototype.slice.call(arguments); e.unshift(t); analytics.push(e); return analytics; }; }; for (var t = 0; t < analytics.methods.length; t++) { var e = analytics.methods[t]; analytics[e] = analytics.factory(e); }analytics.load = function(t) { var e = document.createElement('script'); e.type = 'text/javascript'; e.async = !0; e.src = (document.location.protocol === 'https:' ? 'https://' : 'http://') + 'cdn.segment.com/analytics.js/v1/' + t + '/analytics.min.js'; var n = document.getElementsByTagName('script')[0]; n.parentNode.insertBefore(e, n); }; analytics.SNIPPET_VERSION = '3.0.1'; } analytics = window.analytics = window.analytics || []; if (!analytics.initialize) if (analytics.invoked)window.console && console.error && console.error('Segment snippet included twice.'); else { analytics.invoked = !0; analytics.methods = ['trackSubmit', 'trackClick', 'trackLink', 'trackForm', 'pageview', 'identify', 'group', 'track', 'ready', 'alias', 'page', 'once', 'off', 'on']; analytics.factory = function(t) { return function() { var e = Array.prototype.slice.call(arguments); e.unshift(t); analytics.push(e); return analytics; }; }; for (var t = 0; t < analytics.methods.length; t++) { var e = analytics.methods[t]; analytics[e] = analytics.factory(e); }analytics.load = function(t) { var e = document.createElement('script'); e.type = 'text/javascript'; e.async = !0; e.src = (document.location.protocol === 'https:' ? 'https://' : 'http://') + 'cdn.segment.com/analytics.js/v1/' + t + '/analytics.min.js'; var n = document.getElementsByTagName('script')[0]; n.parentNode.insertBefore(e, n); }; analytics.SNIPPET_VERSION = '3.0.1'; }
// jscs:enable
// provide our application key for logging // provide our application key for logging
analytics.load(applicationKey); analytics.load(applicationKey);
......
/* eslint no-underscore-dangle: ["error", { "allow": ["_initAttributes", "_super"] }] */ /* eslint no-underscore-dangle: ["error", { "allow": ["_initAttributes", "_super"] }] */
// jscs:disable requireCapitalizedConstructors
define([ define([
'jquery', 'jquery',
......
/* global gettext */
// jscs:disable requireCapitalizedConstructors
define([ define([
'jquery', 'jquery',
'backbone', 'backbone',
......
// jscs:disable requireCapitalizedConstructors
define([ define([
'underscore', 'underscore',
'views/course_seat_form_fields/course_seat_form_field_view', 'views/course_seat_form_fields/course_seat_form_field_view',
......
var gulp = require('gulp'), var gulp = require('gulp'),
jscs = require('gulp-jscs'),
eslint = require('gulp-eslint'), eslint = require('gulp-eslint'),
KarmaServer = require('karma').Server, KarmaServer = require('karma').Server,
path = require('path'); path = require('path');
...@@ -44,21 +43,11 @@ var gulp = require('gulp'), ...@@ -44,21 +43,11 @@ var gulp = require('gulp'),
}); });
/** /**
* Runs the JavaScript Code Style (JSCS) linter.
*
* http://jscs.info/
*/
gulp.task('jscs', function() {
return gulp.src(paths.lint)
.pipe(jscs());
});
/**
* Monitors the source and test files, running tests * Monitors the source and test files, running tests
* and linters when changes detected. * and linters when changes detected.
*/ */
gulp.task('watch', function() { gulp.task('watch', function() {
gulp.watch(paths.spec, ['test', 'lint', 'jscs']); gulp.watch(paths.spec, ['test', 'lint']);
}); });
gulp.task('default', ['test']); gulp.task('default', ['test']);
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
"geckodriver": "1.6.1", "geckodriver": "1.6.1",
"gulp": "3.9.1", "gulp": "3.9.1",
"gulp-eslint": "3.0.1", "gulp-eslint": "3.0.1",
"gulp-jscs": "4.0.0",
"jasmine-core": "2.6.1", "jasmine-core": "2.6.1",
"jasmine-jquery": "2.1.1", "jasmine-jquery": "2.1.1",
"karma": "1.5.0", "karma": "1.5.0",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment