Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
Removed JSCS
Browse files Browse the repository at this point in the history
ESLint is sufficient as JSCS is no longer maintained.

LEARNER-1668
  • Loading branch information
clintonb committed Jul 6, 2017
1 parent 1a38a36 commit 83088e6
Show file tree
Hide file tree
Showing 13 changed files with 6 additions and 63 deletions.
28 changes: 0 additions & 28 deletions .jscsrc

This file was deleted.

1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ validate_js:
rm -rf coverage
$(NODE_BIN)/gulp test
$(NODE_BIN)/gulp lint
$(NODE_BIN)/gulp jscs

validate_python: clean quality
PATH=$$PATH:$(NODE_BIN) REUSE_DB=1 coverage run --branch --source=ecommerce ./manage.py test ecommerce \
Expand Down
1 change: 0 additions & 1 deletion docs/links/links.rst
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@
.. _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
.. _ESLint: http://www.eslint.org
.. _jscs: https://www.npmjs.org/package/jscs
.. _Waffle: http://waffle.readthedocs.org/en/latest
.. _Waffle documentation: http://waffle.readthedocs.org/en/latest
.. _Segment: https://segment.com
Expand Down
11 changes: 5 additions & 6 deletions docs/test_ecommerce.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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``.

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
command.
Expand All @@ -121,9 +121,8 @@ standards are enforced using `ESLint`_ and `jscs`_.
$ make validate_js
===================================
Run E-Commerce Acceptance Tests
===================================
===============================

To run specific acceptance tests for the E-Commerce service, you must complete
the following procedures.
Expand All @@ -133,7 +132,7 @@ the following procedures.
:local:

Configure the LMS
********************
*****************

To configure the LMS, follow these steps.

Expand Down Expand Up @@ -221,7 +220,7 @@ You use the CAT to finish configuring the two courses in your LMS instance.
.. _Configure Acceptance Tests:

Configure Acceptance Tests
*********************************
**************************

You configure acceptance tests by using the settings in the
``ecommerce/blob/master/acceptance_tests/config.py`` file. You can use the
Expand Down Expand Up @@ -264,7 +263,7 @@ settings by using environment variables.


Run Acceptance Tests
******************************
********************

Run all acceptance tests by executing ``make accept``. To run a specific test,
execute the following command.
Expand Down
2 changes: 0 additions & 2 deletions ecommerce/static/js/models/course_model.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// jscs:disable requireCapitalizedConstructors

define([
'backbone',
'backbone.relational',
Expand Down
2 changes: 0 additions & 2 deletions ecommerce/static/js/test/specs/pages/basket_page_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ define([
};

/* 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'; }
// jscs:enable
/* eslint-enable */
});

Expand Down
2 changes: 0 additions & 2 deletions ecommerce/static/js/test/specs/pages/receipt_page_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ define([
AnalyticsUtils.analyticsSetUp();

/* 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'; }
// jscs:enable
/* eslint-enable */
});

Expand Down
2 changes: 0 additions & 2 deletions ecommerce/static/js/views/analytics_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,8 @@ define([
initSegment: function(applicationKey) {
var analytics;

// jscs:disable
// 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'; }
// jscs:enable

// provide our application key for logging
analytics.load(applicationKey);
Expand Down
1 change: 0 additions & 1 deletion ecommerce/static/js/views/coupon_form_view.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* eslint no-underscore-dangle: ["error", { "allow": ["_initAttributes", "_super"] }] */
// jscs:disable requireCapitalizedConstructors

define([
'jquery',
Expand Down
3 changes: 0 additions & 3 deletions ecommerce/static/js/views/course_form_view.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/* global gettext */
// jscs:disable requireCapitalizedConstructors

define([
'jquery',
'backbone',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// jscs:disable requireCapitalizedConstructors

define([
'underscore',
'views/course_seat_form_fields/course_seat_form_field_view',
Expand Down
13 changes: 1 addition & 12 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
var gulp = require('gulp'),
jscs = require('gulp-jscs'),
eslint = require('gulp-eslint'),
KarmaServer = require('karma').Server,
path = require('path');
Expand Down Expand Up @@ -43,22 +42,12 @@ var gulp = require('gulp'),
.pipe(eslint.failAfterError());
});

/**
* 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
* and linters when changes detected.
*/
gulp.task('watch', function() {
gulp.watch(paths.spec, ['test', 'lint', 'jscs']);
gulp.watch(paths.spec, ['test', 'lint']);
});

gulp.task('default', ['test']);
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"geckodriver": "1.6.1",
"gulp": "3.9.1",
"gulp-eslint": "3.0.1",
"gulp-jscs": "4.0.0",
"jasmine-core": "2.6.1",
"jasmine-jquery": "2.1.1",
"karma": "1.5.0",
Expand Down

0 comments on commit 83088e6

Please sign in to comment.