Skip to content

Commit

Permalink
MDL-79003 eslint: Change configuration and use 'eslint:recommended'
Browse files Browse the repository at this point in the history
This commit is a backport of MDL-74301 which should have been backported
at the time.
  • Loading branch information
kabalin authored and andrewnicols committed Jan 30, 2024
1 parent 8b85e34 commit 47bc325
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions .eslintrc
@@ -1,8 +1,11 @@
{
'plugins': [
'babel',
'@babel',
'promise',
'jsdoc',
'jsdoc'
],
'extends': [
'eslint:recommended'
],
'env': {
'browser': true,
Expand Down Expand Up @@ -195,7 +198,7 @@
"no-restricted-properties": ['warn', {
'object': 'M',
'property': 'str',
'message': 'Use AMD module "core/str" or M.util.get_string()'
'message': 'Use "core/str" module or M.util.get_string()'
}],
},
overrides: [
Expand Down Expand Up @@ -247,15 +250,13 @@
'semi': 'off',
'no-unused-expressions': 'off',
// Enable all of the babel version of these rules.
'babel/new-cap': ['warn', { 'properties': false }],
'@babel/new-cap': ['warn', { 'properties': false }],
// Not using this rule for the time being because it isn't
// compatible with jQuery and ES6.
'babel/no-invalid-this': 'off',
'babel/object-curly-spacing': 'warn',
// This is off in the original style int.
'babel/quotes': 'off',
'babel/semi': 'error',
'babel/no-unused-expressions': 'error',
'@babel/no-invalid-this': 'off',
'@babel/object-curly-spacing': 'warn',
'@babel/semi': 'error',
'@babel/no-unused-expressions': 'error',
// === Promises ===
// We have Promise now that we're using ES6.
'promise/no-native': 'off',
Expand Down Expand Up @@ -305,7 +306,7 @@
},
parserOptions: {
'sourceType': 'module',
'requireConfigFile': false,
'requireConfigFile': false
}
}
]
Expand Down

0 comments on commit 47bc325

Please sign in to comment.