mirror of
https://github.com/moodle/moodle.git
synced 2025-08-02 07:39:54 +02:00
MDL-55835 eslint: bump to v3.7.1
1) Bump eslint verson in npm 2) Enable tabs rule introduced in 3.2.0 3) With rules deprecated in 3.3.0 to their replacements http://eslint.org/blog/2016/08/eslint-v3.3.0-released 4) Deprecate the use of M.str (fixes MDLSITE-3646) with new no-restricted-properties introduced in 3.5.0 5) Fixup no-unused-vars - remove argsIgnorePattern which shouldn't have allowed partial matches and turns out to be uncesssary (detected because of https://github.com/eslint/eslint/issues/7250 in 3.6.0)
This commit is contained in:
parent
d9520bc04e
commit
00c714f05c
4 changed files with 76 additions and 54 deletions
16
.eslintrc
16
.eslintrc
|
@ -31,7 +31,6 @@
|
|||
'no-inner-declarations': 'error',
|
||||
'no-invalid-regexp': 'error',
|
||||
'no-irregular-whitespace': 'error',
|
||||
'no-negated-in-lhs': 'error',
|
||||
'no-obj-calls': 'error',
|
||||
'no-prototype-builtins': 'off',
|
||||
'no-regex-spaces': 'error',
|
||||
|
@ -39,6 +38,7 @@
|
|||
'no-unexpected-multiline': 'error',
|
||||
'no-unreachable': 'warn',
|
||||
'no-unsafe-finally': 'error',
|
||||
'no-unsafe-negation': 'error',
|
||||
'use-isnan': 'error',
|
||||
'valid-jsdoc': ['warn', { 'requireReturn': false, 'requireParamDescription': false, 'requireReturnDescription': false }],
|
||||
'valid-typeof': 'error',
|
||||
|
@ -63,6 +63,7 @@
|
|||
'no-extra-bind': 'warn',
|
||||
'no-fallthrough': 'error',
|
||||
'no-floating-decimal': 'warn',
|
||||
'no-global-assign': 'warn',
|
||||
// Enabled by grunt for AMD modules: 'no-implicit-globals': 'error',
|
||||
'no-implied-eval': 'error',
|
||||
'no-invalid-this': 'error',
|
||||
|
@ -71,7 +72,6 @@
|
|||
'no-loop-func': 'error',
|
||||
'no-multi-spaces': 'warn',
|
||||
'no-multi-str': 'error',
|
||||
'no-native-reassign': 'warn',
|
||||
'no-new-func': 'error',
|
||||
'no-new-wrappers': 'error',
|
||||
'no-octal': 'error',
|
||||
|
@ -96,7 +96,7 @@
|
|||
'no-delete-var': 'error',
|
||||
'no-undef': 'error',
|
||||
'no-undef-init': 'error',
|
||||
'no-unused-vars': ['error', { 'caughtErrors': 'none', 'argsIgnorePattern': "(e|event)" }],
|
||||
'no-unused-vars': ['error', { 'caughtErrors': 'none' }],
|
||||
|
||||
// === Stylistic Issues ===
|
||||
'array-bracket-spacing': 'warn',
|
||||
|
@ -108,6 +108,7 @@
|
|||
'computed-property-spacing': 'error',
|
||||
'consistent-this': 'off',
|
||||
'eol-last': 'off',
|
||||
'func-call-spacing': ['warn', 'never'],
|
||||
'func-names': 'off',
|
||||
'func-style': 'off',
|
||||
// indent currently not doing well with our wrapping style, so disabled.
|
||||
|
@ -140,7 +141,7 @@
|
|||
'no-nested-ternary': 'warn',
|
||||
'no-new-object': 'off',
|
||||
'no-plusplus': 'off',
|
||||
'no-spaced-func': 'warn',
|
||||
'no-tabs': 'error',
|
||||
'no-ternary': 'off',
|
||||
'no-trailing-spaces': 'error',
|
||||
'no-underscore-dangle': 'off',
|
||||
|
@ -168,5 +169,12 @@
|
|||
'spaced-comment': 'warn',
|
||||
'unicode-bom': 'error',
|
||||
'wrap-regex': 'off',
|
||||
|
||||
// === Deprecations ===
|
||||
"no-restricted-properties": ['warn', {
|
||||
'object': 'M',
|
||||
'property': 'str',
|
||||
'message': 'Use AMD module "core/str" or M.util.get_string()'
|
||||
}],
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* @since 2.9
|
||||
*/
|
||||
// Disable no-restriced-properties because M.str is expected here:
|
||||
/* eslint-disable no-restricted-properties */
|
||||
define(['jquery', 'core/ajax', 'core/localstorage'], function($, ajax, storage) {
|
||||
|
||||
|
||||
|
|
110
npm-shrinkwrap.json
generated
110
npm-shrinkwrap.json
generated
|
@ -7,14 +7,21 @@
|
|||
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz"
|
||||
},
|
||||
"acorn": {
|
||||
"version": "3.2.0",
|
||||
"from": "https://registry.npmjs.org/acorn/-/acorn-3.2.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-3.2.0.tgz"
|
||||
"version": "4.0.3",
|
||||
"from": "acorn@>=4.0.1 <5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.3.tgz"
|
||||
},
|
||||
"acorn-jsx": {
|
||||
"version": "3.0.1",
|
||||
"from": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz",
|
||||
"resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz"
|
||||
"resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz",
|
||||
"dependencies": {
|
||||
"acorn": {
|
||||
"version": "3.3.0",
|
||||
"from": "acorn@>=3.0.4 <4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
"align-text": {
|
||||
"version": "0.1.4",
|
||||
|
@ -208,6 +215,11 @@
|
|||
"from": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz"
|
||||
},
|
||||
"circular-json": {
|
||||
"version": "0.3.1",
|
||||
"from": "circular-json@>=0.3.0 <0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.1.tgz"
|
||||
},
|
||||
"cli": {
|
||||
"version": "0.6.6",
|
||||
"from": "https://registry.npmjs.org/cli/-/cli-0.6.6.tgz",
|
||||
|
@ -443,9 +455,9 @@
|
|||
"resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz"
|
||||
},
|
||||
"del": {
|
||||
"version": "2.2.1",
|
||||
"from": "https://registry.npmjs.org/del/-/del-2.2.1.tgz",
|
||||
"resolved": "https://registry.npmjs.org/del/-/del-2.2.1.tgz"
|
||||
"version": "2.2.2",
|
||||
"from": "del@>=2.0.2 <3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz"
|
||||
},
|
||||
"delayed-stream": {
|
||||
"version": "1.0.0",
|
||||
|
@ -458,16 +470,9 @@
|
|||
"resolved": "https://registry.npmjs.org/depd/-/depd-1.1.0.tgz"
|
||||
},
|
||||
"doctrine": {
|
||||
"version": "1.2.2",
|
||||
"from": "https://registry.npmjs.org/doctrine/-/doctrine-1.2.2.tgz",
|
||||
"resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.2.2.tgz",
|
||||
"dependencies": {
|
||||
"esutils": {
|
||||
"version": "1.1.6",
|
||||
"from": "https://registry.npmjs.org/esutils/-/esutils-1.1.6.tgz",
|
||||
"resolved": "https://registry.npmjs.org/esutils/-/esutils-1.1.6.tgz"
|
||||
}
|
||||
}
|
||||
"version": "1.4.0",
|
||||
"from": "doctrine@>=1.2.2 <2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.4.0.tgz"
|
||||
},
|
||||
"doiuse": {
|
||||
"version": "2.4.1",
|
||||
|
@ -613,14 +618,21 @@
|
|||
"resolved": "https://registry.npmjs.org/escope/-/escope-3.6.0.tgz"
|
||||
},
|
||||
"eslint": {
|
||||
"version": "3.0.1",
|
||||
"from": "https://registry.npmjs.org/eslint/-/eslint-3.0.1.tgz",
|
||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-3.0.1.tgz"
|
||||
"version": "3.7.1",
|
||||
"from": "eslint@3.7.1",
|
||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-3.7.1.tgz",
|
||||
"dependencies": {
|
||||
"ignore": {
|
||||
"version": "3.1.5",
|
||||
"from": "ignore@>=3.1.5 <4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ignore/-/ignore-3.1.5.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
"espree": {
|
||||
"version": "3.1.6",
|
||||
"from": "https://registry.npmjs.org/espree/-/espree-3.1.6.tgz",
|
||||
"resolved": "https://registry.npmjs.org/espree/-/espree-3.1.6.tgz"
|
||||
"version": "3.3.2",
|
||||
"from": "espree@>=3.2.0 <4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/espree/-/espree-3.3.2.tgz"
|
||||
},
|
||||
"esprima": {
|
||||
"version": "2.7.2",
|
||||
|
@ -685,9 +697,9 @@
|
|||
"resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.0.2.tgz"
|
||||
},
|
||||
"fast-levenshtein": {
|
||||
"version": "1.1.3",
|
||||
"from": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-1.1.3.tgz",
|
||||
"resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-1.1.3.tgz"
|
||||
"version": "2.0.5",
|
||||
"from": "fast-levenshtein@>=2.0.4 <2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.5.tgz"
|
||||
},
|
||||
"faye-websocket": {
|
||||
"version": "0.10.0",
|
||||
|
@ -700,9 +712,9 @@
|
|||
"resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz"
|
||||
},
|
||||
"file-entry-cache": {
|
||||
"version": "1.2.4",
|
||||
"from": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-1.2.4.tgz",
|
||||
"resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-1.2.4.tgz"
|
||||
"version": "2.0.0",
|
||||
"from": "file-entry-cache@>=2.0.0 <3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz"
|
||||
},
|
||||
"fileset": {
|
||||
"version": "0.1.8",
|
||||
|
@ -746,9 +758,9 @@
|
|||
}
|
||||
},
|
||||
"flat-cache": {
|
||||
"version": "1.0.10",
|
||||
"from": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.0.10.tgz",
|
||||
"resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.0.10.tgz"
|
||||
"version": "1.2.1",
|
||||
"from": "flat-cache@>=1.2.1 <2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.2.1.tgz"
|
||||
},
|
||||
"flatten": {
|
||||
"version": "1.0.2",
|
||||
|
@ -909,9 +921,9 @@
|
|||
"resolved": "https://registry.npmjs.org/glob/-/glob-7.0.5.tgz"
|
||||
},
|
||||
"globals": {
|
||||
"version": "9.9.0",
|
||||
"from": "https://registry.npmjs.org/globals/-/globals-9.9.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/globals/-/globals-9.9.0.tgz"
|
||||
"version": "9.10.0",
|
||||
"from": "globals@>=9.2.0 <10.0.0",
|
||||
"resolved": "https://registry.npmjs.org/globals/-/globals-9.10.0.tgz"
|
||||
},
|
||||
"globby": {
|
||||
"version": "5.0.0",
|
||||
|
@ -1586,6 +1598,11 @@
|
|||
"from": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.5.tgz",
|
||||
"resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.5.tgz"
|
||||
},
|
||||
"natural-compare": {
|
||||
"version": "1.4.0",
|
||||
"from": "natural-compare@>=1.4.0 <2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz"
|
||||
},
|
||||
"node-uuid": {
|
||||
"version": "1.4.7",
|
||||
"from": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.7.tgz",
|
||||
|
@ -1664,9 +1681,9 @@
|
|||
}
|
||||
},
|
||||
"optionator": {
|
||||
"version": "0.8.1",
|
||||
"from": "https://registry.npmjs.org/optionator/-/optionator-0.8.1.tgz",
|
||||
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.1.tgz"
|
||||
"version": "0.8.2",
|
||||
"from": "optionator@>=0.8.1 <0.9.0",
|
||||
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz"
|
||||
},
|
||||
"os-homedir": {
|
||||
"version": "1.0.1",
|
||||
|
@ -1704,9 +1721,9 @@
|
|||
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz"
|
||||
},
|
||||
"path-is-inside": {
|
||||
"version": "1.0.1",
|
||||
"from": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.1.tgz",
|
||||
"resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.1.tgz"
|
||||
"version": "1.0.2",
|
||||
"from": "path-is-inside@>=1.0.1 <2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz"
|
||||
},
|
||||
"path-type": {
|
||||
"version": "1.1.0",
|
||||
|
@ -1837,11 +1854,6 @@
|
|||
"from": "https://registry.npmjs.org/read-file-stdin/-/read-file-stdin-0.2.1.tgz",
|
||||
"resolved": "https://registry.npmjs.org/read-file-stdin/-/read-file-stdin-0.2.1.tgz"
|
||||
},
|
||||
"read-json-sync": {
|
||||
"version": "1.1.1",
|
||||
"from": "https://registry.npmjs.org/read-json-sync/-/read-json-sync-1.1.1.tgz",
|
||||
"resolved": "https://registry.npmjs.org/read-json-sync/-/read-json-sync-1.1.1.tgz"
|
||||
},
|
||||
"read-pkg": {
|
||||
"version": "1.1.0",
|
||||
"from": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz",
|
||||
|
@ -1938,9 +1950,9 @@
|
|||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz"
|
||||
},
|
||||
"shelljs": {
|
||||
"version": "0.6.0",
|
||||
"from": "https://registry.npmjs.org/shelljs/-/shelljs-0.6.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.6.0.tgz"
|
||||
"version": "0.6.1",
|
||||
"from": "shelljs@>=0.6.0 <0.7.0",
|
||||
"resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.6.1.tgz"
|
||||
},
|
||||
"shifter": {
|
||||
"version": "0.5.0",
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"description": "Moodle",
|
||||
"devDependencies": {
|
||||
"async": "1.5.2",
|
||||
"eslint": "^3.0.1",
|
||||
"eslint": "3.7.1",
|
||||
"grunt": "1.0.1",
|
||||
"grunt-contrib-less": "1.3.0",
|
||||
"grunt-contrib-uglify": "1.0.1",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue