Skip to content
Permalink
Browse files

tools: update eslint

This updates eslint from v6.0.0-alpha.2 to v6.0.1

This also removes eslint-disable comments about `bigint` typeof
checks. Those would otherwise have caused linting errors now that
`bigint` is accepted as valid entry.

PR-URL: #28173
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
  • Loading branch information...
BridgeAR authored and targos committed Jun 11, 2019
1 parent 3c047b3 commit b744bd9dcb31385152ba4a32b87d9d9335f0b298
Showing with 1,963 additions and 396 deletions.
  1. +0 −1 benchmark/process/bench-hrtime.js
  2. +0 −1 lib/internal/buffer.js
  3. +0 −1 lib/internal/errors.js
  4. +1 −1 lib/internal/fs/utils.js
  5. +0 −5 lib/internal/util/inspect.js
  6. +0 −3 test/common/index.js
  7. +3 −10 tools/node_modules/eslint/README.md
  8. +1 −1 tools/node_modules/eslint/bin/eslint.js
  9. +15 −3 tools/node_modules/eslint/lib/cli-engine/cascading-config-array-factory.js
  10. +8 −1 tools/node_modules/eslint/lib/cli-engine/cli-engine.js
  11. +6 −5 tools/node_modules/eslint/lib/cli-engine/config-array-factory.js
  12. +1 −2 tools/node_modules/eslint/lib/cli-engine/config-array/config-array.js
  13. +11 −1 tools/node_modules/eslint/lib/cli-engine/config-array/override-tester.js
  14. +14 −2 tools/node_modules/eslint/lib/cli-engine/formatters/junit.js
  15. +1 −3 tools/node_modules/eslint/lib/linter/linter.js
  16. +6 −4 tools/node_modules/eslint/lib/linter/node-event-generator.js
  17. +40 −10 tools/node_modules/eslint/lib/rule-tester/rule-tester.js
  18. +21 −0 tools/node_modules/eslint/lib/rules/arrow-parens.js
  19. +7 −0 tools/node_modules/eslint/lib/rules/max-len.js
  20. +2 −1 tools/node_modules/eslint/lib/rules/multiline-comment-style.js
  21. +127 −0 tools/node_modules/eslint/lib/rules/no-else-return.js
  22. +1 −1 tools/node_modules/eslint/lib/rules/no-octal.js
  23. +18 −14 tools/node_modules/eslint/lib/rules/no-restricted-imports.js
  24. +6 −1 tools/node_modules/eslint/lib/rules/no-useless-escape.js
  25. +14 −1 tools/node_modules/eslint/lib/rules/no-var.js
  26. +63 −84 tools/node_modules/eslint/lib/rules/require-atomic-updates.js
  27. +11 −3 tools/node_modules/eslint/lib/rules/sort-keys.js
  28. +1 −1 tools/node_modules/eslint/lib/rules/valid-typeof.js
  29. +2 −0 tools/node_modules/eslint/messages/extend-config-missing.txt
  30. +2 −0 tools/node_modules/eslint/messages/print-config-with-directory-path.txt
  31. +1 −1 tools/node_modules/eslint/node_modules/espree/package.json
  32. +174 −0 tools/node_modules/eslint/node_modules/extend/.jscs.json
  33. +94 −0 tools/node_modules/eslint/node_modules/flatted/SPECS.md
  34. +2 −2 tools/node_modules/eslint/node_modules/flatted/esm/index.js
  35. +1 −1 tools/node_modules/eslint/node_modules/flatted/min.js
  36. +2 −2 tools/node_modules/eslint/node_modules/flatted/package.json
  37. +2 −0 tools/node_modules/eslint/node_modules/inherits/inherits.js
  38. +18 −14 tools/node_modules/eslint/node_modules/inherits/inherits_browser.js
  39. +3 −3 tools/node_modules/eslint/node_modules/inherits/package.json
  40. +2 −2 tools/node_modules/eslint/node_modules/inquirer/package.json
  41. +2 −2 tools/node_modules/eslint/node_modules/ms/index.js
  42. +1 −1 tools/node_modules/eslint/node_modules/ms/package.json
  43. +1 −1 tools/node_modules/eslint/node_modules/ms/readme.md
  44. +3 −3 tools/node_modules/eslint/node_modules/table/README.md
  45. +1 −1 tools/node_modules/eslint/node_modules/table/package.json
  46. +21 −0 tools/node_modules/eslint/node_modules/tmp/LICENSE
  47. +314 −0 tools/node_modules/eslint/node_modules/tmp/README.md
  48. +611 −0 tools/node_modules/eslint/node_modules/tmp/lib/tmp.js
  49. +47 −0 tools/node_modules/eslint/node_modules/tmp/package.json
  50. +7 −7 tools/node_modules/eslint/node_modules/tslib/README.md
  51. +1 −1 tools/node_modules/eslint/node_modules/tslib/package.json
  52. +24 −14 tools/node_modules/eslint/node_modules/tslib/tslib.es6.js
  53. +38 −26 tools/node_modules/eslint/node_modules/tslib/tslib.js
  54. +87 −0 tools/node_modules/eslint/node_modules/unist-util-is/convert.js
  55. +8 −88 tools/node_modules/eslint/node_modules/unist-util-is/index.js
  56. +4 −3 tools/node_modules/eslint/node_modules/unist-util-is/package.json
  57. +51 −16 tools/node_modules/eslint/node_modules/unist-util-is/readme.md
  58. +6 −2 tools/node_modules/eslint/node_modules/unist-util-visit-parents/index.js
  59. +2 −2 tools/node_modules/eslint/node_modules/unist-util-visit-parents/package.json
  60. +8 −13 tools/node_modules/eslint/node_modules/vfile-location/package.json
  61. +38 −20 tools/node_modules/eslint/node_modules/vfile-location/readme.md
  62. +6 −10 tools/node_modules/eslint/package.json
  63. +1 −1 tools/update-eslint.sh
@@ -37,6 +37,5 @@ function main({ n, type }) {
break;
}

// eslint-disable-next-line valid-typeof
assert.ok(Array.isArray(noDead) || typeof noDead === 'bigint');
}
@@ -43,7 +43,6 @@ function checkBounds(buf, offset, byteLength) {

function checkInt(value, min, max, buf, offset, byteLength) {
if (value > max || value < min) {
// eslint-disable-next-line valid-typeof
const n = typeof min === 'bigint' ? 'n' : '';
let range;
if (byteLength > 3) {
@@ -1039,7 +1039,6 @@ E('ERR_OUT_OF_RANGE',
let received;
if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {
received = addNumericalSeparator(String(input));
// eslint-disable-next-line valid-typeof
} else if (typeof input === 'bigint') {
received = String(input);
if (input > 2n ** 32n || input < -(2n ** 32n)) {
@@ -276,7 +276,7 @@ Stats.prototype._checkModeProperty = function(property) {
property === S_IFSOCK)) {
return false; // Some types are not available on Windows
}
if (typeof this.mode === 'bigint') { // eslint-disable-line valid-typeof
if (typeof this.mode === 'bigint') {
return (this.mode & BigInt(S_IFMT)) === BigInt(property);
}
return (this.mode & S_IFMT) === property;
@@ -1012,7 +1012,6 @@ function groupArrayElements(ctx, output, value) {
let order = 'padStart';
if (value !== undefined) {
for (let i = 0; i < output.length; i++) {
// eslint-disable-next-line valid-typeof
if (typeof value[i] !== 'number' && typeof value[i] !== 'bigint') {
order = 'padEnd';
break;
@@ -1087,7 +1086,6 @@ function formatPrimitive(fn, value, ctx) {
}
if (typeof value === 'number')
return formatNumber(fn, value);
// eslint-disable-next-line valid-typeof
if (typeof value === 'bigint')
return formatBigInt(fn, value);
if (typeof value === 'boolean')
@@ -1550,7 +1548,6 @@ function formatWithOptions(inspectOptions, ...args) {
const tempArg = args[++a];
if (typeof tempArg === 'number') {
tempStr = formatNumber(stylizeNoColor, tempArg);
// eslint-disable-next-line valid-typeof
} else if (typeof tempArg === 'bigint') {
tempStr = `${tempArg}n`;
} else {
@@ -1582,7 +1579,6 @@ function formatWithOptions(inspectOptions, ...args) {
break;
case 100: // 'd'
const tempNum = args[++a];
// eslint-disable-next-line valid-typeof
if (typeof tempNum === 'bigint') {
tempStr = `${tempNum}n`;
} else if (typeof tempNum === 'symbol') {
@@ -1606,7 +1602,6 @@ function formatWithOptions(inspectOptions, ...args) {
}
case 105: // 'i'
const tempInteger = args[++a];
// eslint-disable-next-line valid-typeof
if (typeof tempInteger === 'bigint') {
tempStr = `${tempInteger}n`;
} else if (typeof tempInteger === 'symbol') {
@@ -239,9 +239,6 @@ const pwdCommand = isWindows ?


function platformTimeout(ms) {
// ESLint will not support 'bigint' in valid-typeof until it reaches stage 4.
// See https://github.com/eslint/eslint/pull/9636.
// eslint-disable-next-line valid-typeof
const multipliers = typeof ms === 'bigint' ?
{ two: 2n, four: 4n, seven: 7n } : { two: 2, four: 4, seven: 7 };

Some generated files are not rendered by default. Learn more.

Some generated files are not rendered by default. Learn more.

Some generated files are not rendered by default. Learn more.

Some generated files are not rendered by default. Learn more.

Some generated files are not rendered by default. Learn more.

Some generated files are not rendered by default. Learn more.

Some generated files are not rendered by default. Learn more.

Some generated files are not rendered by default. Learn more.

Some generated files are not rendered by default. Learn more.

Some generated files are not rendered by default. Learn more.

0 comments on commit b744bd9

Please sign in to comment.
You can’t perform that action at this time.