-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update client dependencies #4150
Changes from 61 commits
dc4175e
fe130ab
2943f44
b88ac6d
b3bfbe0
99e8909
27b8956
10a77cb
1bf19e0
ca04166
b7f76f9
c4ca187
b3afa60
86636e8
06646d5
2942ff2
692996f
bb31a0c
4168cc1
6ad1a96
1edb163
e378d9a
4b2f4d8
88882e7
25df3f3
ccf151f
eb5b233
b737bf9
4bbb806
a75477c
3fc9cb5
2483a5e
9402d65
67f564c
771219e
b1679a0
ab88119
623b40f
eb89001
41c6666
25c7ffa
37aa760
9aa7c82
eadf875
b0b381c
afd73c7
e0fcdad
56fe20d
0618aaf
b66ef60
045233c
dd1e49d
0f9d9e4
22d1451
d60057c
4ab4c49
9a6743b
3c1bae1
0b2e45a
fde6441
599d1bf
382633f
fbfd046
09bde73
bee527c
6af9a8d
60e4862
42b442d
c63c2cb
866e806
cc51d95
3e2799b
871672d
85f7eba
016a00d
836d149
8b0c560
4536835
c0c97c3
4da4784
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ | |
}); | ||
} | ||
|
||
$(document).ready(function () { | ||
$(function () { | ||
initializeDropdownEventListener(); | ||
}); | ||
})(jQuery); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
{ | ||
"presets": [ | ||
"@babel/preset-env", | ||
"@babel/preset-react", | ||
[ | ||
"@babel/preset-react", | ||
{ | ||
"runtime": "automatic" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is added to support the new JSX Transform: https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html which has the following benefits:
See this section: https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html#manual-babel-setup |
||
} | ||
] | ||
], | ||
"plugins": [ | ||
"@babel/plugin-syntax-dynamic-import", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,28 @@ | ||
module.exports = { | ||
parser: 'babel-eslint', | ||
plugins: ['jest'], | ||
extends: [ | ||
'airbnb', | ||
'eslint:recommended', | ||
'plugin:react/recommended', | ||
'plugin:react/jsx-runtime', | ||
'plugin:import/recommended', | ||
'prettier', | ||
], | ||
settings: { | ||
'import/resolver': { | ||
node: {}, | ||
webpack: {}, | ||
alias: { | ||
map: [ | ||
['lib', './app/lib'], | ||
['api', './app/api'], | ||
['course', './app/bundles/course'], | ||
['testUtils', './app/__test__/utils'], | ||
], | ||
extensions: ['.js', '.jsx'], | ||
}, | ||
}, | ||
react: { | ||
// TODO: Update this to 'detect' once React is upgraded >=16.9 | ||
version: '16.8.6', | ||
version: 'detect', | ||
}, | ||
}, | ||
rules: { | ||
|
@@ -34,7 +43,7 @@ module.exports = { | |
'jsx-a11y/mouse-events-have-key-events': 'off', | ||
'jsx-a11y/no-static-element-interactions': 'off', | ||
'max-len': ['warn', 120], | ||
camelcase: ['warn', { properties: 'never' }], | ||
camelcase: ['warn', { properties: 'never', allow: ['^UNSAFE_'] }], | ||
'comma-dangle': ['error', 'always-multiline'], | ||
'func-names': 'off', | ||
'no-multi-str': 'off', | ||
|
@@ -55,4 +64,54 @@ module.exports = { | |
File: true, | ||
FileReader: true, | ||
}, | ||
overrides: [ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I merged in the test ESLint config using the |
||
{ | ||
files: [ | ||
'**/__test__/**/*.js', | ||
'**/__test__/**/*.jsx', | ||
'**/*.test.js', | ||
'**/*.test.jsx', | ||
'**/*.spec.js', | ||
'**/*.spec.jsx', | ||
], | ||
env: { | ||
jest: true, | ||
}, | ||
globals: { | ||
courseId: true, | ||
intl: true, | ||
intlShape: true, | ||
sleep: true, | ||
buildContextOptions: true, | ||
localStorage: true, | ||
}, | ||
rules: { | ||
'jest/no-disabled-tests': 'error', | ||
'jest/no-focused-tests': 'error', | ||
'jest/no-alias-methods': 'error', | ||
'jest/no-identical-title': 'error', | ||
'jest/no-jasmine-globals': 'error', | ||
'jest/no-jest-import': 'error', | ||
'jest/no-test-prefixes': 'error', | ||
'jest/no-done-callback': 'error', | ||
'jest/no-test-return-statement': 'error', | ||
'jest/prefer-to-be': 'error', | ||
'jest/prefer-to-contain': 'error', | ||
'jest/prefer-to-have-length': 'error', | ||
'jest/prefer-spy-on': 'error', | ||
'jest/valid-expect': 'error', | ||
'jest/no-deprecated-functions': 'error', | ||
'react/no-find-dom-node': 'off', | ||
'react/jsx-filename-extension': 'off', | ||
'import/no-extraneous-dependencies': 'off', | ||
'import/extensions': 'off', | ||
'import/no-unresolved': [ | ||
'error', | ||
{ | ||
ignore: ['utils/'], | ||
}, | ||
], | ||
}, | ||
}, | ||
], | ||
}; |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
module.exports = { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added more configurations to improve Prettier formatting. |
||
semi: true, | ||
trailingComma: 'all', | ||
arrowParens: 'always', | ||
endOfLine: 'lf', | ||
jsxSingleQuote: false, | ||
quoteProps: 'as-needed', | ||
semi: true, | ||
singleQuote: true, | ||
tabWidth: 2, | ||
trailingComma: 'all', | ||
useTabs: false, | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been deprecated in jQuery 1.8. Recommended way is the updated way.
See https://api.jquery.com/ready/