This also adds things in this directory to the whitelist
to make sure nothing ugly gets introduced.
Test Plan:
- Automated tests pass
- Make a non-pretty change in a js file within spec/coffeescripts
- Commit it
- Notice it has been prettierfied
refs COREFE-347
flag = none
Change-Id: I52a32b5888da2ad8fc8054f753bc75e48b5ab843
Reviewed-on: https://gerrit.instructure.com/212515
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
This is the result of running:
jscodeshift -t ../js-codemod/transforms/arrow-function.js .
see: https://github.com/cpojer/js-codemod#arrow-function
Transforms callbacks only when it can guarantee it won't break this
context in the function.
Also transforms function() { }.bind(this) calls to () => {}.
jscodeshift -t js-codemod/transforms/arrow-function.js <file>
Change-Id: I04d20c818002b3dce5a43d8e91f01d904f966706
Reviewed-on: https://gerrit.instructure.com/205785
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Tested-by: Jenkins
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Closes: CORE-2867
This is so we can remove the add-module-exports babel plugin
And pass webpack our raw es modules code. This is needed because without
Doing that, our bundle sizes are going to blow up from the things we
Import from InstUI
Test plan:
* these coffeeScript files should work exactly the same as they
did before
Change-Id: I6329d16ffd4e19e80706d3fdc61e3cf0f0feae06
Reviewed-on: https://gerrit.instructure.com/189777
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Hide view/submission dates on submission details page and SpeedGrader if
the assignment should be anonymizing student information.
closes GRADE-1070
Test plan:
* Create an anonymous assignment allowing file-upload submissions
* Logged in as a student (S1):
* Submit something
* As another student (S2), submit multiple files for the same assignment
(i.e., submit something, then re-submit and upload something else)
* Logged in as a teacher:
* Open the assignment in SpeedGrader
* For S1, the "submitted" and "student viewed at" lines on the right
side should not appear
* For S2, the dropdown letting you choose between submissions, which
previously denoted them using the dates submitted, should now name
them "Submission 1", "Submission 2" and so forth
* In both cases, it's okay if the assignment is marked as late or
missing for a given student (we're not trying to hide that info)
* Logged in as an admin:
* Open the assignment in SpeedGrader
* None of the above should apply; i.e., the admin should be able to
view submission dates as though the assignment weren't anonymous
* Log back in as the teacher:
* Unmute the assignment
* For both students, the submitted at/viewed at information should now
be shown again
Change-Id: I35bb3e6d189fd6f5aca333b6eb4419c209d95090
Reviewed-on: https://gerrit.instructure.com/157540
Tested-by: Jenkins
Reviewed-by: Gary Mei <gmei@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
closes: CORE-1202
by fixing these, we can get rid of our wepback provide plugin for I18n
test plan:
* these spec files should still pass
Change-Id: I5cc4bbc8d4fdb308cf9cfcf00cdc76b5b259f7bd
Reviewed-on: https://gerrit.instructure.com/143483
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
...and pass them through amdtoes6, eslint, and prettier
This converts most of our coffeescript spec files to javscript, to
es module syntax and applies our eslint code formatting rules to it.
Because this is just spec files, as long as the tests still run
and they all still pass, this should be good. That makes these a lot
easier and safer to deal with converting than the stuff in
app/coffeescripts
After this commit there should not be any .coffee files in the
/spec/ directory.
test plan:
* jenkins should run the same # of js specs as before and they should
all pass
Change-Id: I701c101777486e2e37d0ec1327692f16099352cd
Reviewed-on: https://gerrit.instructure.com/141556
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
this will not pass jenkins since it renames these files to .js
without also converting the syntax to javaScript. However, this is
intentionally it's own commit so that when you `git log --follow`
a file, it can track its history across the name change.
the following commit actually changes the syntax.
test plan:
* make sure the next commit passes. This should just rename things
Change-Id: I4b56f2789eda12cba64a3716462fecce31b2e895
Reviewed-on: https://gerrit.instructure.com/141555
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Simon Williams <simon@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Ryan Shaw <ryan@instructure.com>