Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugins:
- flowtype

rules:
# `eslint-plugin-flowtype` rule list based on `v4.3.x`
# `eslint-plugin-flowtype` rule list based on `v4.4.x`
# https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype

flowtype/array-style-complex-type: [error, verbose]
Expand Down Expand Up @@ -55,7 +55,7 @@ rules:
flowtype/union-intersection-spacing: off

##################################################
# ESLint builtin rules list based on `v6.6.x`
# ESLint builtin rules list based on `v6.7.x`
##################################################

# Possible Errors
Expand All @@ -72,6 +72,7 @@ rules:
no-control-regex: error
no-debugger: warn
no-dupe-args: error
no-dupe-else-if: error
no-dupe-keys: error
no-duplicate-case: error
no-empty: error
Expand All @@ -87,6 +88,7 @@ rules:
no-obj-calls: error
no-prototype-builtins: error
no-regex-spaces: error
no-setter-return: error
no-sparse-arrays: error
no-template-curly-in-string: error
no-unreachable: error
Expand All @@ -110,11 +112,13 @@ rules:
default-param-last: off # TODO
dot-notation: off
eqeqeq: [error, smart]
grouped-accessor-pairs: error
guard-for-in: error
max-classes-per-file: off
no-alert: error
no-caller: error
no-case-declarations: error
no-constructor-return: error
no-div-regex: error
no-else-return: error
no-empty-function: error
Expand Down Expand Up @@ -255,6 +259,7 @@ rules:
one-var: [error, never]
operator-assignment: [error, always]
padding-line-between-statements: off
prefer-exponentiation-operator: error
prefer-object-spread: error
quotes: [error, single, { avoidEscape: true, allowTemplateLiterals: false }]
sort-keys: off
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@
"babel-eslint": "10.0.3",
"chai": "4.2.0",
"dtslint": "1.0.3",
"eslint": "6.6.0",
"eslint-plugin-flowtype": "4.3.0",
"eslint": "6.7.1",
"eslint-plugin-flowtype": "4.5.2",
"flow-bin": "0.112.0",
"mocha": "6.2.2",
"nyc": "14.1.1",
Expand Down
4 changes: 2 additions & 2 deletions resources/benchmark.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ function computeStats(samples) {
// Compute the sample variance (estimate of the population variance).
let variance = 0;
for (const { clocked } of samples) {
variance += Math.pow(clocked - mean, 2);
variance += (clocked - mean) ** 2;
}
variance /= samples.length - 1;

Expand Down Expand Up @@ -223,7 +223,7 @@ function beautifyBenchmark(results) {
function beautifyBytes(bytes) {
const sizes = ['Bytes', 'KB', 'MB', 'GB'];
const i = Math.floor(Math.log2(bytes) / 10);
return beautifyNumber(bytes / Math.pow(2, i * 10)) + ' ' + sizes[i];
return beautifyNumber(bytes / 2 ** (i * 10)) + ' ' + sizes[i];
}

function beautifyNumber(num) {
Expand Down
36 changes: 24 additions & 12 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1250,10 +1250,10 @@ [email protected], escape-string-regexp@^1.0.2, escape-string-regexp@^1
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=

eslint-plugin-flowtype@4.3.0:
version "4.3.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-4.3.0.tgz#06d0837ac341caf369e7e6dbb112dd7fd21acf17"
integrity sha512-elvqoadMHnYqSYN1YXn02DR7SFW8Kc2CLe8na3m2GdQPQhIY+BgCd2quVJ1AbW3aO0zcyE9loVJ7Szy8A/xlMA==
eslint-plugin-flowtype@4.5.2:
version "4.5.2"
resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-4.5.2.tgz#5353449692663ef70e8fc8c2386cebdecac7e86b"
integrity sha512-ByV0EtEQOqiCl6bsrtXtTGnXlIXoyvDrvUq3Nz28huODAhnRDuMotyTrwP+TjAKZMPWbtaNGFHMoUxW3DktGOw==
dependencies:
lodash "^4.17.15"

Expand All @@ -1277,10 +1277,10 @@ eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0:
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2"
integrity sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==

eslint@6.6.0:
version "6.6.0"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-6.6.0.tgz#4a01a2fb48d32aacef5530ee9c5a78f11a8afd04"
integrity sha512-PpEBq7b6qY/qrOmpYQ/jTMDYfuQMELR4g4WI1M/NaSDDD/bdcMb+dj4Hgks7p41kW2caXsPsEZAEAyAgjVVC0g==
eslint@6.7.1:
version "6.7.1"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-6.7.1.tgz#269ccccec3ef60ab32358a44d147ac209154b919"
integrity sha512-UWzBS79pNcsDSxgxbdjkmzn/B6BhsXMfUaOHnNwyE8nD+Q6pyT96ow2MccVayUTV4yMid4qLhMiQaywctRkBLA==
dependencies:
"@babel/code-frame" "^7.0.0"
ajv "^6.10.0"
Expand All @@ -1297,7 +1297,7 @@ [email protected]:
file-entry-cache "^5.0.1"
functional-red-black-tree "^1.0.1"
glob-parent "^5.0.0"
globals "^11.7.0"
globals "^12.1.0"
ignore "^4.0.6"
import-fresh "^3.0.0"
imurmurhash "^0.1.4"
Expand All @@ -1310,7 +1310,7 @@ [email protected]:
minimatch "^3.0.4"
mkdirp "^0.5.1"
natural-compare "^1.4.0"
optionator "^0.8.2"
optionator "^0.8.3"
progress "^2.0.0"
regexpp "^2.0.1"
semver "^6.1.2"
Expand Down Expand Up @@ -1572,11 +1572,18 @@ glob@^7.1.1, glob@^7.1.3:
once "^1.3.0"
path-is-absolute "^1.0.0"

globals@^11.1.0, globals@^11.7.0:
globals@^11.1.0:
version "11.12.0"
resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e"
integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==

globals@^12.1.0:
version "12.3.0"
resolved "https://registry.yarnpkg.com/globals/-/globals-12.3.0.tgz#1e564ee5c4dded2ab098b0f88f24702a3c56be13"
integrity sha512-wAfjdLgFsPZsklLJvOBUBmzYE8/CwhEqSBEMRXA3qxIiNtyqvjYurAtIfDh6chlEPUfmTY3MnZh5Hfh4q0UlIw==
dependencies:
type-fest "^0.8.1"

graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6:
version "4.2.3"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423"
Expand Down Expand Up @@ -2296,7 +2303,7 @@ optimist@^0.6.1:
minimist "~0.0.1"
wordwrap "~0.0.2"

optionator@^0.8.2:
optionator@^0.8.3:
version "0.8.3"
resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495"
integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==
Expand Down Expand Up @@ -3031,6 +3038,11 @@ type-fest@^0.5.2:
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.5.2.tgz#d6ef42a0356c6cd45f49485c3b6281fc148e48a2"
integrity sha512-DWkS49EQKVX//Tbupb9TFa19c7+MK1XmzkrZUR8TAktmE/DizXoaoJV6TZ/tSIPXipqNiRI6CyAe7x69Jb6RSw==

type-fest@^0.8.1:
version "0.8.1"
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d"
integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==

typescript@next:
version "3.8.0-dev.20191105"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.0-dev.20191105.tgz#84936856168f081f8ffd67441c76f439c97fb9b7"
Expand Down