fix linting errors and un-vendor backbone-associations

remove erroneous asset_index listing

remove indirect define

remove pageFactoryArguments index

max length seems excessive for this file

lintfix

un-vendor backbone associations
This commit is contained in:
Ari Rizzitano
2018-03-05 09:55:46 -08:00
parent 970bc6a50d
commit c5b199a1a2
5 changed files with 34 additions and 28 deletions

View File

@@ -1,10 +1,6 @@
(function(define) {
'use strict';
define(
['js/models/course'],
function(ContextCourse) {
window.course = new ContextCourse(window.pageFactoryArguments.ContextCourse[0]);
}
);
}).call(this, define || RequireJS.define);
define(
['js/models/course'],
function(ContextCourse) {
window.course = new ContextCourse(window.pageFactoryArguments.ContextCourse);
}
);

39
package-lock.json generated
View File

@@ -276,7 +276,7 @@
"anymatch": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz",
"integrity": "sha1-VT3Lj5HjyImEXf26NMd3IbkLnXo=",
"integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==",
"requires": {
"micromatch": "2.3.11",
"normalize-path": "2.1.1"
@@ -318,7 +318,7 @@
"string_decoder": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz",
"integrity": "sha1-D8Z9fBQYJd6UKC3VNr7GubzoYKs=",
"integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==",
"requires": {
"safe-buffer": "5.1.1"
}
@@ -1279,6 +1279,15 @@
"underscore": "1.8.3"
}
},
"backbone-associations": {
"version": "0.6.2",
"resolved": "https://registry.npmjs.org/backbone-associations/-/backbone-associations-0.6.2.tgz",
"integrity": "sha1-aRNBdWNWJBuuuiuAHYvjDQojV0g=",
"requires": {
"backbone": "1.3.3",
"underscore": "1.8.3"
}
},
"backbone.paginator": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/backbone.paginator/-/backbone.paginator-2.0.6.tgz",
@@ -1437,7 +1446,7 @@
"bootstrap": {
"version": "4.0.0-beta.2",
"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.0.0-beta.2.tgz",
"integrity": "sha1-TWfSqiIZ8GLNkLwSR+Z0e56P0FE="
"integrity": "sha512-DzGtdTlKbrMoGMpz0LigKSqJ+MgtFKxA791PU/q062OlRG0HybNZcTLH7rpDAmLS66Y3esN9yzKHLLbqa5UR3w=="
},
"bourbon": {
"version": "4.2.7",
@@ -1750,7 +1759,7 @@
"circular-json": {
"version": "0.3.3",
"resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz",
"integrity": "sha1-gVyZ6oT2gJUp0vRXkb34JxE1LWY=",
"integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==",
"dev": true
},
"clap": {
@@ -2060,7 +2069,7 @@
"string_decoder": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz",
"integrity": "sha1-D8Z9fBQYJd6UKC3VNr7GubzoYKs=",
"integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==",
"dev": true,
"requires": {
"safe-buffer": "5.1.1"
@@ -3299,7 +3308,7 @@
"eslint-config-airbnb": {
"version": "15.1.0",
"resolved": "https://registry.npmjs.org/eslint-config-airbnb/-/eslint-config-airbnb-15.1.0.tgz",
"integrity": "sha1-/UMpZakG4wE5ABuoMPWPc67dro4=",
"integrity": "sha512-m0q9fiMBzDAIbirlGnpJNWToIhdhJmXXnMG+IFflYzzod9231ZhtmGKegKg8E9T8F1YuVaDSU1FnCm5b9iXVhQ==",
"dev": true,
"requires": {
"eslint-config-airbnb-base": "11.3.2"
@@ -4536,7 +4545,7 @@
"hash.js": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz",
"integrity": "sha1-NA3tvmKQGHFRweodd3o0SJNd+EY=",
"integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==",
"requires": {
"inherits": "2.0.3",
"minimalistic-assert": "1.0.0"
@@ -6649,7 +6658,7 @@
"npmlog": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz",
"integrity": "sha1-CKfyqL9zRgR3mp76StXMcXq7lUs=",
"integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==",
"requires": {
"are-we-there-yet": "1.1.4",
"console-control-strings": "1.1.0",
@@ -8152,7 +8161,7 @@
"redux": {
"version": "3.7.2",
"resolved": "https://registry.npmjs.org/redux/-/redux-3.7.2.tgz",
"integrity": "sha1-BrcxIyFZAdJdBlvjQusCa8HIU3s=",
"integrity": "sha512-pNqnf9q1hI5HHZRBkj3bAngGZW/JMCmexDlOxw4XagXY2o1327nHH54LoTjiPJ0gizoqPDRqWyX/00g0hD6w+A==",
"requires": {
"lodash": "4.17.5",
"lodash-es": "4.17.5",
@@ -8376,7 +8385,7 @@
"requirejs": {
"version": "2.3.5",
"resolved": "https://registry.npmjs.org/requirejs/-/requirejs-2.3.5.tgz",
"integrity": "sha1-YXuay7yzNlQO9JFNeQMjqNS4YbA="
"integrity": "sha512-svnO+aNcR/an9Dpi44C7KSAy5fFGLtmPbaaCeQaklUz8BQhS64tWWIIlvEA5jrWICzlO/X9KSzSeXFnZdBu8nw=="
},
"requirejs-plugins": {
"version": "1.0.2",
@@ -8554,7 +8563,7 @@
"sax": {
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
"integrity": "sha1-KBYjTiN4vdxOU1T6tcqold9xANk="
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw=="
},
"schema-utils": {
"version": "0.3.0",
@@ -9072,7 +9081,7 @@
"string_decoder": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz",
"integrity": "sha1-D8Z9fBQYJd6UKC3VNr7GubzoYKs=",
"integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==",
"requires": {
"safe-buffer": "5.1.1"
}
@@ -9568,7 +9577,7 @@
"stylelint-config-recommended": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-1.0.0.tgz",
"integrity": "sha1-dSwX/Gj6ZM1edYniT25G534UpzU=",
"integrity": "sha512-wp50rY5A6MWndIIkKNNzJv/S58lTvqQEriS7CXTBN1SwtoY/YjHhCLIOkjundLnUWMvJJska6GnciLbs76UQrA==",
"dev": true
},
"stylelint-config-recommended-scss": {
@@ -10429,7 +10438,7 @@
"webpack": {
"version": "2.7.0",
"resolved": "https://registry.npmjs.org/webpack/-/webpack-2.7.0.tgz",
"integrity": "sha1-sqEiaAQ3P/09A+qca9UlBnA09rE=",
"integrity": "sha512-MjAA0ZqO1ba7ZQJRnoCdbM56mmFpipOPUv/vQpwwfSI42p5PVDdoiuK2AL2FwFUVgT859Jr43bFZXRg/LNsqvg==",
"requires": {
"acorn": "5.5.0",
"acorn-dynamic-import": "2.0.2",
@@ -10659,7 +10668,7 @@
"which": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz",
"integrity": "sha1-/wS9/AEO5UfXgL7DjhrBwnd9JTo=",
"integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==",
"requires": {
"isexe": "2.0.0"
}

View File

@@ -14,6 +14,7 @@
"babel-preset-env": "1.6.1",
"babel-preset-react": "6.24.1",
"backbone": "1.3.3",
"backbone-associations": "0.6.2",
"backbone.paginator": "2.0.6",
"bootstrap": "4.0.0-beta.2",
"classnames": "2.2.5",

View File

@@ -1,3 +1,4 @@
/* eslint-disable max-len */
var path = require('path');
module.exports = {
@@ -105,4 +106,4 @@ module.exports = {
path.resolve(__dirname, '../openedx/features/learner_profile/static/learner_profile/js/views/section_two_tab.js'),
path.resolve(__dirname, '../openedx/features/learner_profile/static/learner_profile/js/views/share_modal_view.js')
]
}
};

View File

@@ -21,7 +21,6 @@ module.exports = {
CourseOrLibraryListing: './cms/static/js/features_jsx/studio/CourseOrLibraryListing.jsx',
'js/pages/login': './cms/static/js/pages/login.js',
'js/pages/textbooks': './cms/static/js/pages/textbooks.js',
'js/pages/asset_index': './cms/static/js/pages/asset_index.js',
'js/sock': './cms/static/js/sock.js',
// LMS
@@ -213,7 +212,7 @@ module.exports = {
'edx-ui-toolkit': 'edx-ui-toolkit/src/', // @TODO: some paths in toolkit are not valid relative paths
'jquery.ui': 'jQuery-File-Upload/js/vendor/jquery.ui.widget.js',
jquery: 'jquery/src/jquery', // Use the non-dist form of jQuery for better debugging + optimization
'backbone.associations': 'backbone-associations-min',
'backbone.associations': 'backbone-associations/backbone-associations-min',
// See sinon/webpack interaction weirdness:
// https://github.com/webpack/webpack/issues/304#issuecomment-272150177