From 1433f9db8c27b44919cc6b961276681263fb1a24 Mon Sep 17 00:00:00 2001 From: Toru Kobayashi Date: Tue, 12 May 2020 23:10:53 +0900 Subject: [PATCH 01/10] deps: update ESLint v7 BREAKING CHANGE: Support minimum ESLint version is v7. --- package-lock.json | 200 +++++++++++++++++++++++++++++++++------------- package.json | 4 +- 2 files changed, 147 insertions(+), 57 deletions(-) diff --git a/package-lock.json b/package-lock.json index ff141b51..5add4e04 100644 --- a/package-lock.json +++ b/package-lock.json @@ -219,9 +219,9 @@ } }, "acorn": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz", - "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.2.0.tgz", + "integrity": "sha512-apwXVmYVpQ34m/i71vrApRrRKCWQnZZF1+npOD0WV5xZFfwWOmKGQ2RWlfdy9vWITsenisM8M0Qeq8agcFHNiQ==", "dev": true }, "acorn-jsx": { @@ -1086,22 +1086,22 @@ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, "eslint": { - "version": "6.8.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz", - "integrity": "sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.0.0.tgz", + "integrity": "sha512-qY1cwdOxMONHJfGqw52UOpZDeqXy8xmD0u8CT6jIstil72jkhURC704W8CFyTPDPllz4z4lu0Ql1+07PG/XdIg==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", "ajv": "^6.10.0", - "chalk": "^2.1.0", - "cross-spawn": "^6.0.5", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", "debug": "^4.0.1", "doctrine": "^3.0.0", "eslint-scope": "^5.0.0", - "eslint-utils": "^1.4.3", + "eslint-utils": "^2.0.0", "eslint-visitor-keys": "^1.1.0", - "espree": "^6.1.2", - "esquery": "^1.0.1", + "espree": "^7.0.0", + "esquery": "^1.2.0", "esutils": "^2.0.2", "file-entry-cache": "^5.0.1", "functional-red-black-tree": "^1.0.1", @@ -1114,22 +1114,67 @@ "is-glob": "^4.0.0", "js-yaml": "^3.13.1", "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.3.0", + "levn": "^0.4.1", "lodash": "^4.17.14", "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", "natural-compare": "^1.4.0", - "optionator": "^0.8.3", + "optionator": "^0.9.1", "progress": "^2.0.0", - "regexpp": "^2.0.1", - "semver": "^6.1.2", - "strip-ansi": "^5.2.0", - "strip-json-comments": "^3.0.1", + "regexpp": "^3.1.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", + "strip-json-comments": "^3.1.0", "table": "^5.2.3", "text-table": "^0.2.0", "v8-compile-cache": "^2.0.3" }, "dependencies": { + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.0.0.tgz", + "integrity": "sha512-N9oWFcegS0sFr9oh1oz2d7Npos6vNoWW9HvtCg5N1KRFpUhaAhvTv5Y58g880fZaEYSNm3qDz8SU1UrGvp+n7A==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "cross-spawn": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.2.tgz", + "integrity": "sha512-PD6G8QG3S4FK/XCGFbEQrDqO2AnMMsy0meR7lerlIOHAAbkuavGU/pOqprrlvfTNjvowivTeBsjebAL0NSoMxw==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, "doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -1139,15 +1184,6 @@ "esutils": "^2.0.2" } }, - "eslint-utils": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", - "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^1.1.0" - } - }, "globals": { "version": "12.4.0", "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", @@ -1157,17 +1193,71 @@ "type-fest": "^0.8.1" } }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, "ignore": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", "dev": true }, - "regexpp": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", - "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true + }, + "semver": { + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", + "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==", + "dev": true + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } } } }, @@ -1372,9 +1462,9 @@ "integrity": "sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==" }, "espree": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz", - "integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.0.0.tgz", + "integrity": "sha512-/r2XEx5Mw4pgKdyb7GNLQNsu++asx/dltf/CI8RFi9oGHxmQFgvLbc5Op4U6i8Oaj+kdslhJtVlEZeAqH5qOTw==", "dev": true, "requires": { "acorn": "^7.1.1", @@ -2343,13 +2433,13 @@ } }, "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" } }, "load-json-file": { @@ -2942,17 +3032,17 @@ } }, "optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", "dev": true, "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" } }, "os-tmpdir": { @@ -3075,9 +3165,9 @@ } }, "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true }, "prettier": { @@ -3891,12 +3981,12 @@ } }, "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, "requires": { - "prelude-ls": "~1.1.2" + "prelude-ls": "^1.2.1" } }, "type-fest": { diff --git a/package.json b/package.json index c225a33d..3ab52972 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "license": "MIT", "devDependencies": { "@types/react": "^16.9.38", - "eslint": "^6.8.0", + "eslint": "^7.0.0", "mocha": "^7.2.0", "npm-run-all": "^4.1.5", "prettier": "^1.19.1", @@ -37,7 +37,7 @@ "typescript": "^3.9.5" }, "peerDependencies": { - "eslint": "^6.4.0", + "eslint": "^7.0.0", "typescript": "^3.3.3333" }, "dependencies": { From def2188fed9f668f6d8276179c0cfbf2c929e058 Mon Sep 17 00:00:00 2001 From: Toru Kobayashi Date: Tue, 12 May 2020 23:12:42 +0900 Subject: [PATCH 02/10] test: use ESLint class instead of CLIEngine --- test/base-test.js | 4 +- test/es5-test.js | 4 +- test/flowtype-test.js | 4 +- test/globals-kintone-test.js | 7 +- test/kintone-test.js | 4 +- test/lib/runLintWithFixtures.js | 12 ++-- test/node-test.js | 4 +- test/node-typescript.js | 4 +- test/presets-test.js | 123 ++++++++++++++++++-------------- test/prettier-test.js | 4 +- test/react-test.js | 4 +- test/react-typescript-test.js | 4 +- test/typescript-test.js | 4 +- 13 files changed, 100 insertions(+), 82 deletions(-) diff --git a/test/base-test.js b/test/base-test.js index f3adfaf4..a2b7bffe 100644 --- a/test/base-test.js +++ b/test/base-test.js @@ -2,8 +2,8 @@ const assert = require("assert"); const runLintWithFixtures = require("./lib/runLintWithFixtures"); describe("base", () => { - it("should get expected errors and warninigs with base config", () => { - const result = runLintWithFixtures("base"); + it("should get expected errors and warninigs with base config", async () => { + const result = await runLintWithFixtures("base"); assert.deepStrictEqual(result, { "error.js": { errors: [ diff --git a/test/es5-test.js b/test/es5-test.js index ab8e9895..df74f79e 100644 --- a/test/es5-test.js +++ b/test/es5-test.js @@ -2,8 +2,8 @@ const assert = require("assert"); const runLintWithFixtures = require("./lib/runLintWithFixtures"); describe("es5", () => { - it("should get expected errors and warninigs with es5 config", () => { - const result = runLintWithFixtures("es5"); + it("should get expected errors and warninigs with es5 config", async () => { + const result = await runLintWithFixtures("es5"); assert.deepStrictEqual(result, { "error.js": { errors: ["no-unused-vars", "no-redeclare"] diff --git a/test/flowtype-test.js b/test/flowtype-test.js index bfd38f3b..c7ac2b21 100644 --- a/test/flowtype-test.js +++ b/test/flowtype-test.js @@ -2,9 +2,9 @@ const assert = require("assert"); const runLintWithFixtures = require("./lib/runLintWithFixtures"); describe("flowtype", () => { - it("should get expected errors and warninigs with react config with flowtype config", () => { + it("should get expected errors and warninigs with react config with flowtype config", async () => { // We use react presets in order to support ES2017 syntax - const result = runLintWithFixtures("flowtype"); + const result = await runLintWithFixtures("flowtype"); assert.deepStrictEqual(result, { "ok.js": {}, "error.js": { diff --git a/test/globals-kintone-test.js b/test/globals-kintone-test.js index 7c82afa7..b65a1452 100644 --- a/test/globals-kintone-test.js +++ b/test/globals-kintone-test.js @@ -2,8 +2,11 @@ const assert = require("assert"); const runLintWithFixtures = require("./lib/runLintWithFixtures"); describe("kintone", () => { - it("should get expected errors and warninigs with kintone config", () => { - const result = runLintWithFixtures("globals-kintone", "globals/kintone.js"); + it("should get expected errors and warninigs with kintone config", async () => { + const result = await runLintWithFixtures( + "globals-kintone", + "globals/kintone.js" + ); assert.deepStrictEqual(result, { "error.js": { errors: ["no-undef"] diff --git a/test/kintone-test.js b/test/kintone-test.js index eaf3d588..c9afb0b7 100644 --- a/test/kintone-test.js +++ b/test/kintone-test.js @@ -2,8 +2,8 @@ const assert = require("assert"); const runLintWithFixtures = require("./lib/runLintWithFixtures"); describe("kintone", () => { - it("should get expected errors and warninigs with kintone config", () => { - const result = runLintWithFixtures("kintone"); + it("should get expected errors and warninigs with kintone config", async () => { + const result = await runLintWithFixtures("kintone"); assert.deepStrictEqual(result, { "error.js": { errors: ["strict", "strict"] diff --git a/test/lib/runLintWithFixtures.js b/test/lib/runLintWithFixtures.js index 594d809e..34567bce 100644 --- a/test/lib/runLintWithFixtures.js +++ b/test/lib/runLintWithFixtures.js @@ -1,6 +1,6 @@ "use strict"; -const CLIEngine = require("eslint").CLIEngine; +const { ESLint } = require("eslint"); const path = require("path"); /** @@ -8,17 +8,17 @@ const path = require("path"); * @param type lint type, which is in lib directory * @returns {Object} lint results {[fileName]: {errors: [ruleNames], warnings: [ruleNames]}} */ -const runLintWithFixtures = (type, configFile = `lib/${type}.js`) => { - const cli = new CLIEngine({ - configFile: path.resolve(process.cwd(), configFile), +const runLintWithFixtures = async (type, configFile = `lib/${type}.js`) => { + const eslint = new ESLint({ + overrideConfigFile: path.resolve(process.cwd(), configFile), ignore: false, useEslintrc: false, extensions: [".js", ".jsx", ".ts", ".tsx"] }); const targetDir = path.resolve(__dirname, "..", "fixtures", type); - const lintResult = cli.executeOnFiles([targetDir]); + const lintResult = await eslint.lintFiles([targetDir]); // console.log(JSON.stringify(lintResult, null, 2)); - return lintResult.results.reduce((results, { filePath, messages }) => { + return lintResult.reduce((results, { filePath, messages }) => { // strip path const fileName = filePath.replace(`${targetDir}/`, ""); return Object.assign(results, { diff --git a/test/node-test.js b/test/node-test.js index af36cce3..4b4e945b 100644 --- a/test/node-test.js +++ b/test/node-test.js @@ -2,8 +2,8 @@ const assert = require("assert"); const runLintWithFixtures = require("./lib/runLintWithFixtures"); describe("node", () => { - it("should get expected errors and warninigs with node config", () => { - const result = runLintWithFixtures("node"); + it("should get expected errors and warninigs with node config", async () => { + const result = await runLintWithFixtures("node"); assert.deepStrictEqual(result, { "error.js": { errors: [ diff --git a/test/node-typescript.js b/test/node-typescript.js index fe1cdb8e..46df2ecd 100644 --- a/test/node-typescript.js +++ b/test/node-typescript.js @@ -2,8 +2,8 @@ const assert = require("assert"); const runLintWithFixtures = require("./lib/runLintWithFixtures"); describe("node-typescript", () => { - it("should get expected errors and warninigs", () => { - const result = runLintWithFixtures( + it("should get expected errors and warninigs", async () => { + const result = await runLintWithFixtures( "node-typescript", "presets/node-typescript-prettier.js" ); diff --git a/test/presets-test.js b/test/presets-test.js index 0254db1c..7fe5f4ac 100644 --- a/test/presets-test.js +++ b/test/presets-test.js @@ -3,66 +3,72 @@ const runLintWithFixtures = require("./lib/runLintWithFixtures"); describe("presets", () => { describe("index", () => { - it("should be able to use index as well as lib/base", () => { + it("should be able to use index as well as lib/base", async () => { assert.deepStrictEqual( - runLintWithFixtures("base"), - runLintWithFixtures("base", "index.js") + await runLintWithFixtures("base"), + await runLintWithFixtures("base", "index.js") ); }); }); describe("react", () => { - it("should be able to use react as well as lib/base and lib/react", () => { - assert.deepStrictEqual(runLintWithFixtures("react", "presets/react.js"), { - "ok.jsx": {} - }); + it("should be able to use react as well as lib/base and lib/react", async () => { assert.deepStrictEqual( - runLintWithFixtures("base"), - runLintWithFixtures("base", "presets/react.js") + await runLintWithFixtures("react", "presets/react.js"), + { + "ok.jsx": {} + } + ); + assert.deepStrictEqual( + await runLintWithFixtures("base"), + await runLintWithFixtures("base", "presets/react.js") ); }); }); describe("flowtype", () => { - it("should be able to use flowtype as well as lib/base and lib/flowtype", () => { + it("should be able to use flowtype as well as lib/base and lib/flowtype", async () => { assert.deepStrictEqual( - runLintWithFixtures("flowtype"), - runLintWithFixtures("flowtype", "presets/flowtype.js") + await runLintWithFixtures("flowtype"), + await runLintWithFixtures("flowtype", "presets/flowtype.js") ); assert.deepStrictEqual( - runLintWithFixtures("base"), - runLintWithFixtures("base", "presets/flowtype.js") + await runLintWithFixtures("base"), + await runLintWithFixtures("base", "presets/flowtype.js") ); }); }); describe("react-flowtype", () => { - it("should be able to use react-flowtype as well as lib/react and lib/flowtype", () => { + it("should be able to use react-flowtype as well as lib/react and lib/flowtype", async () => { assert.deepStrictEqual( - runLintWithFixtures("react", "presets/react.js"), - runLintWithFixtures("react", "presets/react-flowtype.js") + await runLintWithFixtures("react", "presets/react.js"), + await runLintWithFixtures("react", "presets/react-flowtype.js") ); assert.deepStrictEqual( - runLintWithFixtures("flowtype"), - runLintWithFixtures("flowtype", "presets/react-flowtype.js") + await runLintWithFixtures("flowtype"), + await runLintWithFixtures("flowtype", "presets/react-flowtype.js") ); }); }); describe("node", () => { - it("should be able to use node as well as lib/node", () => { + it("should be able to use node as well as lib/node", async () => { assert.deepStrictEqual( - runLintWithFixtures("node"), - runLintWithFixtures("node", "presets/node.js") + await runLintWithFixtures("node"), + await runLintWithFixtures("node", "presets/node.js") ); }); }); describe("kintone-customize-es5", () => { - it("should be able to use kintone-customize-es5 as well as lib/es5 and lib/kintone", () => { + it("should be able to use kintone-customize-es5 as well as lib/es5 and lib/kintone", async () => { assert.deepStrictEqual( - runLintWithFixtures("es5"), - runLintWithFixtures("es5", "presets/kintone-customize-es5.js") + await runLintWithFixtures("es5"), + await runLintWithFixtures("es5", "presets/kintone-customize-es5.js") ); }); - it("should be able to use kintone-customize-es5 as well as lib/kintone", () => { + it("should be able to use kintone-customize-es5 as well as lib/kintone", async () => { assert.deepStrictEqual( - runLintWithFixtures("kintone", "presets/kintone-customize-es5.js"), + await runLintWithFixtures( + "kintone", + "presets/kintone-customize-es5.js" + ), { "ok.js": {}, "error.js": { errors: ["strict", "strict"] } @@ -71,74 +77,83 @@ describe("presets", () => { }); }); describe("prettier", () => { - it("should be able to use prettier as well as lib/prettier", () => { + it("should be able to use prettier as well as lib/prettier", async () => { assert.deepStrictEqual( - runLintWithFixtures("prettier"), - runLintWithFixtures("prettier", "presets/prettier.js") + await runLintWithFixtures("prettier"), + await runLintWithFixtures("prettier", "presets/prettier.js") ); }); }); describe("react-prettier", () => { - it("should be able to use react-prettier as well as lib/prettier", () => { + it("should be able to use react-prettier as well as lib/prettier", async () => { assert.deepStrictEqual( - runLintWithFixtures("prettier"), - runLintWithFixtures("prettier", "presets/react-prettier.js") + await runLintWithFixtures("prettier"), + await runLintWithFixtures("prettier", "presets/react-prettier.js") ); }); }); describe("react-flowtype-prettier", () => { - it("should be able to use react-flowtype-prettier as well as lib/prettier", () => { + it("should be able to use react-flowtype-prettier as well as lib/prettier", async () => { assert.deepStrictEqual( - runLintWithFixtures("prettier"), - runLintWithFixtures("prettier", "presets/react-flowtype-prettier.js") + await runLintWithFixtures("prettier"), + await runLintWithFixtures( + "prettier", + "presets/react-flowtype-prettier.js" + ) ); }); }); describe("node-prettier", () => { - it("should be able to use node-prettier as well as lib/prettier", () => { + it("should be able to use node-prettier as well as lib/prettier", async () => { assert.deepStrictEqual( - runLintWithFixtures("prettier"), - runLintWithFixtures("prettier", "presets/node-prettier.js") + await runLintWithFixtures("prettier"), + await runLintWithFixtures("prettier", "presets/node-prettier.js") ); }); }); describe("node-typescript-prettier", () => { - it("should be able to use node-typescript-prettier as well as lib/prettier", () => { + it("should be able to use node-typescript-prettier as well as lib/prettier", async () => { assert.deepStrictEqual( - runLintWithFixtures("prettier"), - runLintWithFixtures("prettier", "presets/node-typescript-prettier.js") + await runLintWithFixtures("prettier"), + await runLintWithFixtures( + "prettier", + "presets/node-typescript-prettier.js" + ) ); }); }); describe("react-typescript-prettier", () => { - it("should be able to use react-typescript-prettier as well as lib/prettier", () => { + it("should be able to use react-typescript-prettier as well as lib/prettier", async () => { assert.deepStrictEqual( - runLintWithFixtures("prettier"), - runLintWithFixtures("prettier", "presets/react-typescript-prettier.js") + await runLintWithFixtures("prettier"), + await runLintWithFixtures( + "prettier", + "presets/react-typescript-prettier.js" + ) ); }); }); describe("react-typescript", () => { - it("should be able to use react-typescript as well as presets/typescript", () => { + it("should be able to use react-typescript as well as presets/typescript", async () => { assert.deepStrictEqual( - runLintWithFixtures("typescript", "presets/typescript.js"), - runLintWithFixtures("typescript", "presets/react-typescript.js") + await runLintWithFixtures("typescript", "presets/typescript.js"), + await runLintWithFixtures("typescript", "presets/react-typescript.js") ); }); }); describe("typescript-prettier", () => { - it("should be able to use typescript-prettier as well as lib/prettier", () => { + it("should be able to use typescript-prettier as well as lib/prettier", async () => { assert.deepStrictEqual( - runLintWithFixtures("prettier"), - runLintWithFixtures("prettier", "presets/typescript-prettier.js") + await runLintWithFixtures("prettier"), + await runLintWithFixtures("prettier", "presets/typescript-prettier.js") ); }); }); describe("typescript", () => { - it("should be able to use typescript as well as lib/typescript", () => { + it("should be able to use typescript as well as lib/typescript", async () => { assert.deepStrictEqual( - runLintWithFixtures("typescript"), - runLintWithFixtures("typescript", "presets/typescript.js") + await runLintWithFixtures("typescript"), + await runLintWithFixtures("typescript", "presets/typescript.js") ); }); }); diff --git a/test/prettier-test.js b/test/prettier-test.js index 3758ffc5..f0d2a0e6 100644 --- a/test/prettier-test.js +++ b/test/prettier-test.js @@ -2,8 +2,8 @@ const assert = require("assert"); const runLintWithFixtures = require("./lib/runLintWithFixtures"); describe("prettier", () => { - it("should get expected errors and warninigs", () => { - const result = runLintWithFixtures("prettier", "presets/prettier.js"); + it("should get expected errors and warninigs", async () => { + const result = await runLintWithFixtures("prettier", "presets/prettier.js"); assert.deepStrictEqual(result, { "ok.js": {}, "error.js": { diff --git a/test/react-test.js b/test/react-test.js index 548d6d53..16d7c514 100644 --- a/test/react-test.js +++ b/test/react-test.js @@ -2,9 +2,9 @@ const assert = require("assert"); const runLintWithFixtures = require("./lib/runLintWithFixtures"); describe("react", () => { - it("should get expected errors and warninigs", () => { + it("should get expected errors and warninigs", async () => { // We use react presets in order to support ES2017 syntax - const result = runLintWithFixtures("react", "presets/react.js"); + const result = await runLintWithFixtures("react", "presets/react.js"); assert.deepStrictEqual(result, { "ok.jsx": {} }); diff --git a/test/react-typescript-test.js b/test/react-typescript-test.js index b04b5ce6..b8f0230a 100644 --- a/test/react-typescript-test.js +++ b/test/react-typescript-test.js @@ -2,9 +2,9 @@ const assert = require("assert"); const runLintWithFixtures = require("./lib/runLintWithFixtures"); describe("react-typescript", () => { - it("should get expected errors and warninigs", () => { + it("should get expected errors and warninigs", async () => { // We use react presets in order to support ES2017 syntax - const result = runLintWithFixtures( + const result = await runLintWithFixtures( "react-typescript", "presets/react-typescript.js" ); diff --git a/test/typescript-test.js b/test/typescript-test.js index 63246037..8a962e30 100644 --- a/test/typescript-test.js +++ b/test/typescript-test.js @@ -2,9 +2,9 @@ const assert = require("assert"); const runLintWithFixtures = require("./lib/runLintWithFixtures"); describe("typescript", () => { - it("should get expected errors and warninigs", () => { + it("should get expected errors and warninigs", async () => { // We use react presets in order to support ES2017 syntax - const result = runLintWithFixtures("typescript"); + const result = await runLintWithFixtures("typescript"); assert.deepStrictEqual(result, { "ok.ts": {}, "error.ts": { From 5a8a2c8f52b6acb20b166747ed70036106de373f Mon Sep 17 00:00:00 2001 From: Toru Kobayashi Date: Mon, 25 May 2020 09:53:09 +0900 Subject: [PATCH 03/10] deps: update typescript-eslint version to v3 --- package-lock.json | 41 +++++++++++++++++++++++++++++++++++++++++ package.json | 4 ++-- 2 files changed, 43 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5add4e04..601c2450 100644 --- a/package-lock.json +++ b/package-lock.json @@ -155,28 +155,54 @@ } }, "@typescript-eslint/eslint-plugin": { +<<<<<<< HEAD "version": "2.34.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.34.0.tgz", "integrity": "sha512-4zY3Z88rEE99+CNvTbXSyovv2z9PNOVffTWD2W8QF5s2prBQtwN2zadqERcrHpcR7O/+KMI3fcTAmUUhK/iQcQ==", "requires": { "@typescript-eslint/experimental-utils": "2.34.0", +======= + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-3.0.0.tgz", + "integrity": "sha512-lcZ0M6jD4cqGccYOERKdMtg+VWpoq3NSnWVxpc/AwAy0zhkUYVioOUZmfNqiNH8/eBNGhCn6HXd6mKIGRgNc1Q==", + "requires": { + "@typescript-eslint/experimental-utils": "3.0.0", +>>>>>>> deps: update typescript-eslint version to v3 "functional-red-black-tree": "^1.0.1", "regexpp": "^3.0.0", + "semver": "^7.3.2", "tsutils": "^3.17.1" + }, + "dependencies": { + "semver": { + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", + "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==" + } } }, "@typescript-eslint/experimental-utils": { +<<<<<<< HEAD "version": "2.34.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.34.0.tgz", "integrity": "sha512-eS6FTkq+wuMJ+sgtuNTtcqavWXqsflWcfBnlYhg/nS4aZ1leewkXGbvBhaapn1q6qf4M71bsR1tez5JTRMuqwA==", "requires": { "@types/json-schema": "^7.0.3", "@typescript-eslint/typescript-estree": "2.34.0", +======= + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-3.0.0.tgz", + "integrity": "sha512-BN0vmr9N79M9s2ctITtChRuP1+Dls0x/wlg0RXW1yQ7WJKPurg6X3Xirv61J2sjPif4F8SLsFMs5Nzte0WYoTQ==", + "requires": { + "@types/json-schema": "^7.0.3", + "@typescript-eslint/typescript-estree": "3.0.0", +>>>>>>> deps: update typescript-eslint version to v3 "eslint-scope": "^5.0.0", "eslint-utils": "^2.0.0" } }, "@typescript-eslint/parser": { +<<<<<<< HEAD "version": "2.34.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.34.0.tgz", "integrity": "sha512-03ilO0ucSD0EPTw2X4PntSIRFtDPWjrVq7C3/Z3VQHRC7+13YB55rcJI3Jt+YgeHbjUdJPcPa7b23rXCBokuyA==", @@ -184,13 +210,28 @@ "@types/eslint-visitor-keys": "^1.0.0", "@typescript-eslint/experimental-utils": "2.34.0", "@typescript-eslint/typescript-estree": "2.34.0", +======= + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-3.0.0.tgz", + "integrity": "sha512-8RRCA9KLxoFNO0mQlrLZA0reGPd/MsobxZS/yPFj+0/XgMdS8+mO8mF3BDj2ZYQj03rkayhSJtF1HAohQ3iylw==", + "requires": { + "@types/eslint-visitor-keys": "^1.0.0", + "@typescript-eslint/experimental-utils": "3.0.0", + "@typescript-eslint/typescript-estree": "3.0.0", +>>>>>>> deps: update typescript-eslint version to v3 "eslint-visitor-keys": "^1.1.0" } }, "@typescript-eslint/typescript-estree": { +<<<<<<< HEAD "version": "2.34.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.34.0.tgz", "integrity": "sha512-OMAr+nJWKdlVM9LOqCqh3pQQPwxHAN7Du8DR6dmwCrAmxtiXQnhHJ6tBNtf+cggqfo51SG/FCwnKhXCIM7hnVg==", +======= + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-3.0.0.tgz", + "integrity": "sha512-nevQvHyNghsfLrrByzVIH4ZG3NROgJ8LZlfh3ddwPPH4CH7W4GAiSx5qu+xHuX5pWsq6q/eqMc1io840ZhAnUg==", +>>>>>>> deps: update typescript-eslint version to v3 "requires": { "debug": "^4.1.1", "eslint-visitor-keys": "^1.1.0", diff --git a/package.json b/package.json index 3ab52972..9b318ea2 100644 --- a/package.json +++ b/package.json @@ -41,8 +41,8 @@ "typescript": "^3.3.3333" }, "dependencies": { - "@typescript-eslint/eslint-plugin": "^2.34.0", - "@typescript-eslint/parser": "^2.34.0", + "@typescript-eslint/eslint-plugin": "^3.0.0", + "@typescript-eslint/parser": "^3.0.0", "babel-eslint": "^10.1.0", "eslint-config-prettier": "^6.10.1", "eslint-plugin-flowtype": "^4.7.0", From c219b3f1b3ae72b6caa005fc068a9dead8c64253 Mon Sep 17 00:00:00 2001 From: Toru Kobayashi Date: Mon, 25 May 2020 09:54:32 +0900 Subject: [PATCH 04/10] deps: update eslint-plugin-flowtype version to v5 --- package-lock.json | 14 ++++++++++---- package.json | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 601c2450..8607e0a2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1368,11 +1368,12 @@ } }, "eslint-plugin-flowtype": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-flowtype/-/eslint-plugin-flowtype-4.7.0.tgz", - "integrity": "sha512-M+hxhSCk5QBEValO5/UqrS4UunT+MgplIJK5wA1sCtXjzBcZkpTGRwxmLHhGpbHcrmQecgt6ZL/KDdXWqGB7VA==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-flowtype/-/eslint-plugin-flowtype-5.1.0.tgz", + "integrity": "sha512-avZ1nHs0vadDTPvgGbggLWvktqI7urjZ1fcK8P+AXJkTuOSBmNje/vMtbfXgs85d32nMYioD7LoLNZiEULZ8lA==", "requires": { - "lodash": "^4.17.15" + "lodash": "^4.17.15", + "string-natural-compare": "^3.0.1" } }, "eslint-plugin-import": { @@ -3769,6 +3770,11 @@ } } }, + "string-natural-compare": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/string-natural-compare/-/string-natural-compare-3.0.1.tgz", + "integrity": "sha512-n3sPwynL1nwKi3WJ6AIsClwBMa0zTi54fn2oLU6ndfTSIO05xaznjSf15PcBZU6FNWbmN5Q6cxT4V5hGvB4taw==" + }, "string-width": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", diff --git a/package.json b/package.json index 9b318ea2..79edd64f 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "@typescript-eslint/parser": "^3.0.0", "babel-eslint": "^10.1.0", "eslint-config-prettier": "^6.10.1", - "eslint-plugin-flowtype": "^4.7.0", + "eslint-plugin-flowtype": "^5.1.0", "eslint-plugin-import": "^2.20.2", "eslint-plugin-jsx-a11y": "6.2.3", "eslint-plugin-node": "^11.1.0", From 393234c30abf461dd9f6e485588b844e344e462b Mon Sep 17 00:00:00 2001 From: Toru Kobayashi Date: Mon, 25 May 2020 09:55:07 +0900 Subject: [PATCH 05/10] deps: update eslint plugins for react BREAKING CHANGE: eslint-plugin-react-hooks reports new errors --- package-lock.json | 22 ++++++++++------------ package.json | 4 ++-- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8607e0a2..b539047b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1448,9 +1448,9 @@ } }, "eslint-plugin-react": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.19.0.tgz", - "integrity": "sha512-SPT8j72CGuAP+JFbT0sJHOB80TX/pu44gQ4vXH/cq+hQTiY2PuZ6IHkqXJV6x1b28GDdo1lbInjKUrrdUf0LOQ==", + "version": "7.20.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.20.0.tgz", + "integrity": "sha512-rqe1abd0vxMjmbPngo4NaYxTcR3Y4Hrmc/jg4T+sYz63yqlmJRknpEQfmWY+eDWPuMmix6iUIK+mv0zExjeLgA==", "requires": { "array-includes": "^3.1.1", "doctrine": "^2.1.0", @@ -1461,7 +1461,6 @@ "object.values": "^1.1.1", "prop-types": "^15.7.2", "resolve": "^1.15.1", - "semver": "^6.3.0", "string.prototype.matchall": "^4.0.2", "xregexp": "^4.3.0" }, @@ -1477,9 +1476,9 @@ } }, "eslint-plugin-react-hooks": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-2.5.1.tgz", - "integrity": "sha512-Y2c4b55R+6ZzwtTppKwSmK/Kar8AdLiC2f9NADCuxbcTgPPg41Gyqa6b9GppgXSvCtkRw43ZE86CT5sejKC6/g==" + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.0.2.tgz", + "integrity": "sha512-kAMRjNztrLW1rK+81X1NwMB2LqG+nc7Q8AibnG8/VyWhQK8SP6JotCFG+HL4u1EjziplxVz4jARdR8gGk8pLDA==" }, "eslint-scope": { "version": "5.0.0", @@ -3014,13 +3013,12 @@ } }, "object.entries": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.1.tgz", - "integrity": "sha512-ilqR7BgdyZetJutmDPfXCDffGa0/Yzl2ivVNpbx/g4UeWrCdRnFDUBrKJGLhGieRHDATnyZXWBeCb29k9CJysQ==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.2.tgz", + "integrity": "sha512-BQdB9qKmb/HyNdMNWVr7O3+z5MUIx3aiegEIJqjMBbBf0YT9RRxTJSim4mzFqtyr7PDAHigq0N9dO0m0tRakQA==", "requires": { "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1", - "function-bind": "^1.1.1", + "es-abstract": "^1.17.5", "has": "^1.0.3" } }, diff --git a/package.json b/package.json index 79edd64f..ad7cde06 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "eslint-plugin-jsx-a11y": "6.2.3", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.1.3", - "eslint-plugin-react": "^7.19.0", - "eslint-plugin-react-hooks": "^2.5.1" + "eslint-plugin-react": "^7.20.0", + "eslint-plugin-react-hooks": "^4.0.2" } } From 50cb10a54aa1b4735d43ec529f667174edcd1b85 Mon Sep 17 00:00:00 2001 From: Toru Kobayashi Date: Mon, 25 May 2020 11:11:24 +0900 Subject: [PATCH 06/10] fix: review newly added rules in typescript-eslint BREAKING CHANGE: enable new rules in typescript-eslint/recommended --- lib/typescript.js | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/lib/typescript.js b/lib/typescript.js index 7bab1318..bd5331a5 100644 --- a/lib/typescript.js +++ b/lib/typescript.js @@ -1,10 +1,7 @@ module.exports = { parser: "@typescript-eslint/parser", plugins: ["@typescript-eslint"], - extends: [ - "plugin:@typescript-eslint/eslint-recommended", - "plugin:@typescript-eslint/recommended" - ], + extends: ["plugin:@typescript-eslint/recommended"], // It's 5〜10x slower with the project setting. // So We disable it until the issue has been fixed /* @@ -17,15 +14,12 @@ module.exports = { "no-useless-constructor": "off", "@typescript-eslint/no-useless-constructor": "warn", - "@typescript-eslint/type-annotation-spacing": "warn", "@typescript-eslint/unified-signatures": "warn", "@typescript-eslint/indent": ["warn", 2, { SwitchCase: 1 }], - "@typescript-eslint/ban-ts-ignore": "off", - "@typescript-eslint/camelcase": "off", - "@typescript-eslint/explicit-function-return-type": "off", + "@typescript-eslint/ban-ts-comment": "off", "@typescript-eslint/explicit-member-accessibility": "off", - "@typescript-eslint/interface-name-prefix": "off", + "@typescript-eslint/explicit-module-boundary-types": "off", "@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/no-empty-interface": "off", "@typescript-eslint/no-inferrable-types": "off", @@ -34,7 +28,6 @@ module.exports = { "@typescript-eslint/no-object-literal-type-assertion": "off", "@typescript-eslint/no-triple-slash-reference": "off", "@typescript-eslint/no-unused-vars": "off", - "@typescript-eslint/no-use-before-define": "off", "@typescript-eslint/no-var-requires": "off", "@typescript-eslint/prefer-interface": "off", "@typescript-eslint/prefer-namespace-keyword": "off" From 675708a5c9389b713101fb2636d8361f6f9bb709 Mon Sep 17 00:00:00 2001 From: Toru Kobayashi Date: Tue, 16 Jun 2020 00:18:07 +0900 Subject: [PATCH 07/10] deps: update all plugin versions to laest --- package-lock.json | 223 +++++++++++++++++++++++++--------------------- package.json | 14 +-- 2 files changed, 126 insertions(+), 111 deletions(-) diff --git a/package-lock.json b/package-lock.json index b539047b..01529077 100644 --- a/package-lock.json +++ b/package-lock.json @@ -134,9 +134,14 @@ "integrity": "sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag==" }, "@types/json-schema": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.4.tgz", - "integrity": "sha512-8+KAKzEvSUdeo+kmqnKrqgeE+LcA0tjYWFY7RPProVYwnqDjukzO+3b6dLD56rYX5TdWejnEOLJYOIeh4CXKuA==" + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.5.tgz", + "integrity": "sha512-7+2BITlgjgDhH0vvwZU/HZJVyk+2XUlvxXe8dFMedNX/aMkaOq++rMAFXc0tM7ij15QaWlbdQASBR9dihi+bDQ==" + }, + "@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=" }, "@types/prop-types": { "version": "15.7.3", @@ -155,19 +160,11 @@ } }, "@typescript-eslint/eslint-plugin": { -<<<<<<< HEAD - "version": "2.34.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.34.0.tgz", - "integrity": "sha512-4zY3Z88rEE99+CNvTbXSyovv2z9PNOVffTWD2W8QF5s2prBQtwN2zadqERcrHpcR7O/+KMI3fcTAmUUhK/iQcQ==", - "requires": { - "@typescript-eslint/experimental-utils": "2.34.0", -======= - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-3.0.0.tgz", - "integrity": "sha512-lcZ0M6jD4cqGccYOERKdMtg+VWpoq3NSnWVxpc/AwAy0zhkUYVioOUZmfNqiNH8/eBNGhCn6HXd6mKIGRgNc1Q==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-3.2.0.tgz", + "integrity": "sha512-t9RTk/GyYilIXt6BmZurhBzuMT9kLKw3fQoJtK9ayv0tXTlznXEAnx07sCLXdkN3/tZDep1s1CEV95CWuARYWA==", "requires": { - "@typescript-eslint/experimental-utils": "3.0.0", ->>>>>>> deps: update typescript-eslint version to v3 + "@typescript-eslint/experimental-utils": "3.2.0", "functional-red-black-tree": "^1.0.1", "regexpp": "^3.0.0", "semver": "^7.3.2", @@ -182,56 +179,31 @@ } }, "@typescript-eslint/experimental-utils": { -<<<<<<< HEAD - "version": "2.34.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.34.0.tgz", - "integrity": "sha512-eS6FTkq+wuMJ+sgtuNTtcqavWXqsflWcfBnlYhg/nS4aZ1leewkXGbvBhaapn1q6qf4M71bsR1tez5JTRMuqwA==", - "requires": { - "@types/json-schema": "^7.0.3", - "@typescript-eslint/typescript-estree": "2.34.0", -======= - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-3.0.0.tgz", - "integrity": "sha512-BN0vmr9N79M9s2ctITtChRuP1+Dls0x/wlg0RXW1yQ7WJKPurg6X3Xirv61J2sjPif4F8SLsFMs5Nzte0WYoTQ==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-3.2.0.tgz", + "integrity": "sha512-UbJBsk+xO9dIFKtj16+m42EvUvsjZbbgQ2O5xSTSfVT1Z3yGkL90DVu0Hd3029FZ5/uBgl+F3Vo8FAcEcqc6aQ==", "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/typescript-estree": "3.0.0", ->>>>>>> deps: update typescript-eslint version to v3 + "@typescript-eslint/typescript-estree": "3.2.0", "eslint-scope": "^5.0.0", "eslint-utils": "^2.0.0" } }, "@typescript-eslint/parser": { -<<<<<<< HEAD - "version": "2.34.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.34.0.tgz", - "integrity": "sha512-03ilO0ucSD0EPTw2X4PntSIRFtDPWjrVq7C3/Z3VQHRC7+13YB55rcJI3Jt+YgeHbjUdJPcPa7b23rXCBokuyA==", - "requires": { - "@types/eslint-visitor-keys": "^1.0.0", - "@typescript-eslint/experimental-utils": "2.34.0", - "@typescript-eslint/typescript-estree": "2.34.0", -======= - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-3.0.0.tgz", - "integrity": "sha512-8RRCA9KLxoFNO0mQlrLZA0reGPd/MsobxZS/yPFj+0/XgMdS8+mO8mF3BDj2ZYQj03rkayhSJtF1HAohQ3iylw==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-3.2.0.tgz", + "integrity": "sha512-Vhu+wwdevDLVDjK1lIcoD6ZbuOa93fzqszkaO3iCnmrScmKwyW/AGkzc2UvfE5TCoCXqq7Jyt6SOXjsIlpqF4A==", "requires": { "@types/eslint-visitor-keys": "^1.0.0", - "@typescript-eslint/experimental-utils": "3.0.0", - "@typescript-eslint/typescript-estree": "3.0.0", ->>>>>>> deps: update typescript-eslint version to v3 + "@typescript-eslint/experimental-utils": "3.2.0", + "@typescript-eslint/typescript-estree": "3.2.0", "eslint-visitor-keys": "^1.1.0" } }, "@typescript-eslint/typescript-estree": { -<<<<<<< HEAD - "version": "2.34.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.34.0.tgz", - "integrity": "sha512-OMAr+nJWKdlVM9LOqCqh3pQQPwxHAN7Du8DR6dmwCrAmxtiXQnhHJ6tBNtf+cggqfo51SG/FCwnKhXCIM7hnVg==", -======= - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-3.0.0.tgz", - "integrity": "sha512-nevQvHyNghsfLrrByzVIH4ZG3NROgJ8LZlfh3ddwPPH4CH7W4GAiSx5qu+xHuX5pWsq6q/eqMc1io840ZhAnUg==", ->>>>>>> deps: update typescript-eslint version to v3 + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-3.2.0.tgz", + "integrity": "sha512-uh+Y2QO7dxNrdLw7mVnjUqkwO/InxEqwN0wF+Za6eo3coxls9aH9kQ/5rSvW2GcNanebRTmsT5w1/92lAOb1bA==", "requires": { "debug": "^4.1.1", "eslint-visitor-keys": "^1.1.0", @@ -260,9 +232,9 @@ } }, "acorn": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.2.0.tgz", - "integrity": "sha512-apwXVmYVpQ34m/i71vrApRrRKCWQnZZF1+npOD0WV5xZFfwWOmKGQ2RWlfdy9vWITsenisM8M0Qeq8agcFHNiQ==", + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.3.1.tgz", + "integrity": "sha512-tLc0wSnatxAQHVHUapaHdz72pi9KUyHjq5KyHjGg9Y8Ifdc79pTh2XvI6I1/chZbnM7QtNKzh66ooDogPZSleA==", "dev": true }, "acorn-jsx": { @@ -1127,9 +1099,9 @@ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, "eslint": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.0.0.tgz", - "integrity": "sha512-qY1cwdOxMONHJfGqw52UOpZDeqXy8xmD0u8CT6jIstil72jkhURC704W8CFyTPDPllz4z4lu0Ql1+07PG/XdIg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.2.0.tgz", + "integrity": "sha512-B3BtEyaDKC5MlfDa2Ha8/D6DsS4fju95zs0hjS3HdGazw+LNayai38A25qMppK37wWGWNYSPOR6oYzlz5MHsRQ==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", @@ -1138,10 +1110,10 @@ "cross-spawn": "^7.0.2", "debug": "^4.0.1", "doctrine": "^3.0.0", - "eslint-scope": "^5.0.0", + "eslint-scope": "^5.1.0", "eslint-utils": "^2.0.0", - "eslint-visitor-keys": "^1.1.0", - "espree": "^7.0.0", + "eslint-visitor-keys": "^1.2.0", + "espree": "^7.1.0", "esquery": "^1.2.0", "esutils": "^2.0.2", "file-entry-cache": "^5.0.1", @@ -1181,9 +1153,9 @@ } }, "chalk": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.0.0.tgz", - "integrity": "sha512-N9oWFcegS0sFr9oh1oz2d7Npos6vNoWW9HvtCg5N1KRFpUhaAhvTv5Y58g880fZaEYSNm3qDz8SU1UrGvp+n7A==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", "dev": true, "requires": { "ansi-styles": "^4.1.0", @@ -1206,9 +1178,9 @@ "dev": true }, "cross-spawn": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.2.tgz", - "integrity": "sha512-PD6G8QG3S4FK/XCGFbEQrDqO2AnMMsy0meR7lerlIOHAAbkuavGU/pOqprrlvfTNjvowivTeBsjebAL0NSoMxw==", + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, "requires": { "path-key": "^3.1.0", @@ -1225,6 +1197,22 @@ "esutils": "^2.0.2" } }, + "eslint-scope": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.0.tgz", + "integrity": "sha512-iiGRvtxWqgtx5m8EyQUJihBloE4EnYeGE/bz1wSPwJE6tZuJUtHlhqDM4Xj2ukE8Dyy1+HCZ4hE0fzIVMzb58w==", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "eslint-visitor-keys": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.2.0.tgz", + "integrity": "sha512-WFb4ihckKil6hu3Dp798xdzSfddwKKU3+nGniKF6HfeW6OLd2OUDEPP7TcHtB5+QXOKg2s6B2DaMPE1Nn/kxKQ==", + "dev": true + }, "globals": { "version": "12.4.0", "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", @@ -1368,31 +1356,32 @@ } }, "eslint-plugin-flowtype": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-flowtype/-/eslint-plugin-flowtype-5.1.0.tgz", - "integrity": "sha512-avZ1nHs0vadDTPvgGbggLWvktqI7urjZ1fcK8P+AXJkTuOSBmNje/vMtbfXgs85d32nMYioD7LoLNZiEULZ8lA==", + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-flowtype/-/eslint-plugin-flowtype-5.1.3.tgz", + "integrity": "sha512-UU+BbIxBflqJ171yxbd/HcOktCmOdhXbchIVIq/yBvKpLZXvfzNDOyJGcnuQYLaH840hdoIdU/bqxhoW6I0rIQ==", "requires": { "lodash": "^4.17.15", "string-natural-compare": "^3.0.1" } }, "eslint-plugin-import": { - "version": "2.20.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.20.2.tgz", - "integrity": "sha512-FObidqpXrR8OnCh4iNsxy+WACztJLXAHBO5hK79T1Hc77PgQZkyDGA5Ag9xAvRpglvLNxhH/zSmZ70/pZ31dHg==", + "version": "2.21.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.21.2.tgz", + "integrity": "sha512-FEmxeGI6yaz+SnEB6YgNHlQK1Bs2DKLM+YF+vuTk5H8J9CLbJLtlPvRFgZZ2+sXiKAlN5dpdlrWOjK8ZoZJpQA==", "requires": { - "array-includes": "^3.0.3", - "array.prototype.flat": "^1.2.1", + "array-includes": "^3.1.1", + "array.prototype.flat": "^1.2.3", "contains-path": "^0.1.0", "debug": "^2.6.9", "doctrine": "1.5.0", - "eslint-import-resolver-node": "^0.3.2", - "eslint-module-utils": "^2.4.1", + "eslint-import-resolver-node": "^0.3.3", + "eslint-module-utils": "^2.6.0", "has": "^1.0.3", "minimatch": "^3.0.4", - "object.values": "^1.1.0", + "object.values": "^1.1.1", "read-pkg-up": "^2.0.0", - "resolve": "^1.12.0" + "resolve": "^1.17.0", + "tsconfig-paths": "^3.9.0" }, "dependencies": { "debug": { @@ -1440,9 +1429,9 @@ } }, "eslint-plugin-prettier": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.3.tgz", - "integrity": "sha512-+HG5jmu/dN3ZV3T6eCD7a4BlAySdN7mLIbJYo0z1cFQuI+r2DiTJEFeF68ots93PsnrMxbzIZ2S/ieX+mkrBeQ==", + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.4.tgz", + "integrity": "sha512-jZDa8z76klRqo+TdGDTFJSavwbnWK2ZpqGKNZ+VvweMW516pDUMmQ2koXvxEE4JhzNvTv+radye/bWGBmA6jmg==", "requires": { "prettier-linter-helpers": "^1.0.0" } @@ -1476,14 +1465,14 @@ } }, "eslint-plugin-react-hooks": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.0.2.tgz", - "integrity": "sha512-kAMRjNztrLW1rK+81X1NwMB2LqG+nc7Q8AibnG8/VyWhQK8SP6JotCFG+HL4u1EjziplxVz4jARdR8gGk8pLDA==" + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.0.4.tgz", + "integrity": "sha512-equAdEIsUETLFNCmmCkiCGq6rkSK5MoJhXFPFYeUebcjKgBmWWcgVOqZyQC8Bv1BwVCnTq9tBxgJFgAJTWoJtA==" }, "eslint-scope": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.0.0.tgz", - "integrity": "sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.0.tgz", + "integrity": "sha512-iiGRvtxWqgtx5m8EyQUJihBloE4EnYeGE/bz1wSPwJE6tZuJUtHlhqDM4Xj2ukE8Dyy1+HCZ4hE0fzIVMzb58w==", "requires": { "esrecurse": "^4.1.0", "estraverse": "^4.1.1" @@ -1503,14 +1492,22 @@ "integrity": "sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==" }, "espree": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-7.0.0.tgz", - "integrity": "sha512-/r2XEx5Mw4pgKdyb7GNLQNsu++asx/dltf/CI8RFi9oGHxmQFgvLbc5Op4U6i8Oaj+kdslhJtVlEZeAqH5qOTw==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.1.0.tgz", + "integrity": "sha512-dcorZSyfmm4WTuTnE5Y7MEN1DyoPYy1ZR783QW1FJoenn7RailyWFsq/UL6ZAAA7uXurN9FIpYyUs3OfiIW+Qw==", "dev": true, "requires": { - "acorn": "^7.1.1", + "acorn": "^7.2.0", "acorn-jsx": "^5.2.0", - "eslint-visitor-keys": "^1.1.0" + "eslint-visitor-keys": "^1.2.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.2.0.tgz", + "integrity": "sha512-WFb4ihckKil6hu3Dp798xdzSfddwKKU3+nGniKF6HfeW6OLd2OUDEPP7TcHtB5+QXOKg2s6B2DaMPE1Nn/kxKQ==", + "dev": true + } } }, "esprima": { @@ -1566,9 +1563,9 @@ } }, "fast-deep-equal": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz", - "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true }, "fast-diff": { @@ -2203,9 +2200,9 @@ "dev": true }, "inquirer": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.1.0.tgz", - "integrity": "sha512-5fJMWEmikSYu0nv/flMc475MhGbB7TSPd/2IpFV4I4rMklboCH2rQjYY5kKiYGHqUF9gvaambupcJFFG9dvReg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.2.0.tgz", + "integrity": "sha512-E0c4rPwr9ByePfNlTIB8z51kK1s2n6jrHuJeEHENl/sbq2G/S1auvibgEwNR4uSyiU+PiYHqSwsgGiXjG8p5ZQ==", "dev": true, "requires": { "ansi-escapes": "^4.2.1", @@ -2458,6 +2455,14 @@ "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", "dev": true }, + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "requires": { + "minimist": "^1.2.0" + } + }, "jsonparse": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", @@ -2687,8 +2692,7 @@ "minimist": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" }, "minimist-options": { "version": "3.0.2", @@ -4012,6 +4016,17 @@ "integrity": "sha1-n5up2e+odkw4dpi8v+sshI8RrbM=", "dev": true }, + "tsconfig-paths": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.9.0.tgz", + "integrity": "sha512-dRcuzokWhajtZWkQsDVKbWyY+jgcLC5sqJhg2PSgf4ZkH2aHPvaOY8YWGhmjb68b5qqTfasSsDO9k7RUiEmZAw==", + "requires": { + "@types/json5": "^0.0.29", + "json5": "^1.0.1", + "minimist": "^1.2.0", + "strip-bom": "^3.0.0" + } + }, "tslib": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.1.tgz", @@ -4078,9 +4093,9 @@ "dev": true }, "v8-compile-cache": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz", - "integrity": "sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.1.tgz", + "integrity": "sha512-8OQ9CL+VWyt3JStj7HX7/ciTL2V3Rl1Wf5OL+SNTm0yK1KvtReVulksyeRnCANHHuUxHlQig+JJDlUhBt1NQDQ==", "dev": true }, "validate-npm-package-license": { diff --git a/package.json b/package.json index ad7cde06..f3afb05c 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "license": "MIT", "devDependencies": { "@types/react": "^16.9.38", - "eslint": "^7.0.0", + "eslint": "^7.2.0", "mocha": "^7.2.0", "npm-run-all": "^4.1.5", "prettier": "^1.19.1", @@ -41,16 +41,16 @@ "typescript": "^3.3.3333" }, "dependencies": { - "@typescript-eslint/eslint-plugin": "^3.0.0", - "@typescript-eslint/parser": "^3.0.0", + "@typescript-eslint/eslint-plugin": "^3.2.0", + "@typescript-eslint/parser": "^3.2.0", "babel-eslint": "^10.1.0", "eslint-config-prettier": "^6.10.1", - "eslint-plugin-flowtype": "^5.1.0", - "eslint-plugin-import": "^2.20.2", + "eslint-plugin-flowtype": "^5.1.3", + "eslint-plugin-import": "^2.21.2", "eslint-plugin-jsx-a11y": "6.2.3", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-prettier": "^3.1.3", + "eslint-plugin-prettier": "^3.1.4", "eslint-plugin-react": "^7.20.0", - "eslint-plugin-react-hooks": "^4.0.2" + "eslint-plugin-react-hooks": "^4.0.4" } } From fe3a36d2350b904d28977e8b287a6edb4b06f480 Mon Sep 17 00:00:00 2001 From: Toru Kobayashi Date: Tue, 16 Jun 2020 00:24:12 +0900 Subject: [PATCH 08/10] test: fix failed tests --- test/base-test.js | 2 +- test/es5-test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/base-test.js b/test/base-test.js index a2b7bffe..b1f64a08 100644 --- a/test/base-test.js +++ b/test/base-test.js @@ -8,9 +8,9 @@ describe("base", () => { "error.js": { errors: [ "no-var", - "no-unused-vars", "no-var", "no-redeclare", + "no-unused-vars", "getter-return", "no-self-assign", "no-import-assign", diff --git a/test/es5-test.js b/test/es5-test.js index df74f79e..1756456d 100644 --- a/test/es5-test.js +++ b/test/es5-test.js @@ -6,7 +6,7 @@ describe("es5", () => { const result = await runLintWithFixtures("es5"); assert.deepStrictEqual(result, { "error.js": { - errors: ["no-unused-vars", "no-redeclare"] + errors: ["no-redeclare", "no-unused-vars"] }, "warning.js": { warnings: ["array-callback-return"] From 048c3118ea2dab217686d6a6b6ff06af479b0362 Mon Sep 17 00:00:00 2001 From: Toru Kobayashi Date: Tue, 16 Jun 2020 00:32:19 +0900 Subject: [PATCH 09/10] test: fix failed tests --- test/base-test.js | 2 -- test/es5-test.js | 2 +- test/fixtures/base/error.js | 1 - test/fixtures/es5/error.js | 1 - 4 files changed, 1 insertion(+), 5 deletions(-) diff --git a/test/base-test.js b/test/base-test.js index b1f64a08..e246dea7 100644 --- a/test/base-test.js +++ b/test/base-test.js @@ -8,8 +8,6 @@ describe("base", () => { "error.js": { errors: [ "no-var", - "no-var", - "no-redeclare", "no-unused-vars", "getter-return", "no-self-assign", diff --git a/test/es5-test.js b/test/es5-test.js index 1756456d..b9560933 100644 --- a/test/es5-test.js +++ b/test/es5-test.js @@ -6,7 +6,7 @@ describe("es5", () => { const result = await runLintWithFixtures("es5"); assert.deepStrictEqual(result, { "error.js": { - errors: ["no-redeclare", "no-unused-vars"] + errors: ["no-unused-vars"] }, "warning.js": { warnings: ["array-callback-return"] diff --git a/test/fixtures/base/error.js b/test/fixtures/base/error.js index dec9c54a..91ec3e44 100644 --- a/test/fixtures/base/error.js +++ b/test/fixtures/base/error.js @@ -1,6 +1,5 @@ import mod from './mod'; -var foo = {}; var foo = {}; const obj = { a: 'a', diff --git a/test/fixtures/es5/error.js b/test/fixtures/es5/error.js index a21998ba..30448998 100644 --- a/test/fixtures/es5/error.js +++ b/test/fixtures/es5/error.js @@ -1,3 +1,2 @@ var obj = {}; -var obj = {}; From a4ece489d9257d1ae22ee4f2c97d21f665cc33ab Mon Sep 17 00:00:00 2001 From: Toru Kobayashi Date: Fri, 19 Jun 2020 13:23:49 +0900 Subject: [PATCH 10/10] deps: update eslint-plugin-jsx-a11y to v6.3.0 --- package-lock.json | 90 ++++++++++++++++++++++++++++++++++++----------- package.json | 2 +- 2 files changed, 71 insertions(+), 21 deletions(-) diff --git a/package-lock.json b/package-lock.json index 01529077..efbe4a51 100644 --- a/package-lock.json +++ b/package-lock.json @@ -70,9 +70,9 @@ "integrity": "sha512-AoeIEJn8vt+d/6+PXDRPaksYhnlbMIiejioBZvvMQsOjW/JYK6k/0dKnvvP3EhK5GfMBWDPtrxRtegWdAcdq9Q==" }, "@babel/runtime": { - "version": "7.9.6", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.9.6.tgz", - "integrity": "sha512-64AF1xY3OAkFHqOb9s4jpgk1Mm5vDZ4L3acHvAml+53nO1XbXLuDodsVpO4OIUsmemlUHMxNdYMNJmsvOwLrvQ==", + "version": "7.10.2", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.10.2.tgz", + "integrity": "sha512-6sF3uQw2ivImfVIl62RZ7MXhO2tap69WeWK57vAaimT6AZbE4FbqjdEJIN1UqoD6wI6B+1n9UiagafH1sxjOtg==", "requires": { "regenerator-runtime": "^0.13.4" } @@ -318,12 +318,23 @@ } }, "aria-query": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-3.0.0.tgz", - "integrity": "sha1-ZbP8wcoRVajJrmTW7uKX8V1RM8w=", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-4.2.0.tgz", + "integrity": "sha512-tpVyXGt6gJVTVwCmu8qgBkDHhvtQ/es80y6J8ziybiwQU/x+LnCy+v8p9CWOTHv3i1BMnH5/IfzMpuTcFPCMQA==", "requires": { - "ast-types-flow": "0.0.7", - "commander": "^2.11.0" + "@babel/runtime": "^7.10.2", + "@babel/runtime-corejs3": "^7.10.2" + }, + "dependencies": { + "@babel/runtime-corejs3": { + "version": "7.10.2", + "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.10.2.tgz", + "integrity": "sha512-+a2M/u7r15o3dV1NEizr9bRi+KUVnrs/qYxF0Z06DAPx/4VCWaz1WA7EcbE+uqGgt39lp5akWGmHsTseIkHkHg==", + "requires": { + "core-js-pure": "^3.0.0", + "regenerator-runtime": "^0.13.4" + } + } } }, "array-find-index": { @@ -374,6 +385,11 @@ "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", "dev": true }, + "axe-core": { + "version": "3.5.5", + "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-3.5.5.tgz", + "integrity": "sha512-5P0QZ6J5xGikH780pghEdbEKijCTrruK9KxtPZCFWUpef0f6GipO+xEZ5GKCb020mmqgbiNO6TcA55CriL784Q==" + }, "axobject-query": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-2.1.2.tgz", @@ -557,7 +573,9 @@ "commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true, + "optional": true }, "compare-func": { "version": "1.3.2", @@ -1055,7 +1073,8 @@ "emoji-regex": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true }, "error-ex": { "version": "1.3.2", @@ -1400,19 +1419,37 @@ } }, "eslint-plugin-jsx-a11y": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.2.3.tgz", - "integrity": "sha512-CawzfGt9w83tyuVekn0GDPU9ytYtxyxyFZ3aSWROmnRRFQFT2BiPJd7jvRdzNDi6oLWaS2asMeYSNMjWTV4eNg==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.3.0.tgz", + "integrity": "sha512-tHSWX2jXlAaiI45YuEPi3KXJ7MihvQWUZMR9UNB4bUVYvAamwr6AwCm5dgOZOV2rC2qVMjBtjNshBE46n4IG6w==", "requires": { - "@babel/runtime": "^7.4.5", - "aria-query": "^3.0.0", - "array-includes": "^3.0.3", + "@babel/runtime": "^7.10.2", + "aria-query": "^4.2.0", + "array-includes": "^3.1.1", "ast-types-flow": "^0.0.7", - "axobject-query": "^2.0.2", - "damerau-levenshtein": "^1.0.4", - "emoji-regex": "^7.0.2", + "axe-core": "^3.5.4", + "axobject-query": "^2.1.2", + "damerau-levenshtein": "^1.0.6", + "emoji-regex": "^9.0.0", "has": "^1.0.3", - "jsx-ast-utils": "^2.2.1" + "jsx-ast-utils": "^2.4.1", + "language-tags": "^1.0.5" + }, + "dependencies": { + "emoji-regex": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.0.0.tgz", + "integrity": "sha512-6p1NII1Vm62wni/VR/cUMauVQoxmLVb9csqQlvLz+hO2gk8U2UYDfXHQSUYIBKmZwAKz867IDqG7B+u0mj+M6w==" + }, + "jsx-ast-utils": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-2.4.1.tgz", + "integrity": "sha512-z1xSldJ6imESSzOjd3NNkieVJKRlKYSOtMG8SFyCj2FIrvSaSuli/WjpBkEzCBoR9bYYYFgqJw61Xhu7Lcgk+w==", + "requires": { + "array-includes": "^3.1.1", + "object.assign": "^4.1.0" + } + } } }, "eslint-plugin-node": { @@ -2478,6 +2515,19 @@ "object.assign": "^4.1.0" } }, + "language-subtag-registry": { + "version": "0.3.20", + "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.20.tgz", + "integrity": "sha512-KPMwROklF4tEx283Xw0pNKtfTj1gZ4UByp4EsIFWLgBavJltF4TiYPc39k06zSTsLzxTVXXDSpbwaQXaFB4Qeg==" + }, + "language-tags": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/language-tags/-/language-tags-1.0.5.tgz", + "integrity": "sha1-0yHbxNowuovzAk4ED6XBRmH5GTo=", + "requires": { + "language-subtag-registry": "~0.3.2" + } + }, "levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", diff --git a/package.json b/package.json index f3afb05c..20f13875 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "eslint-config-prettier": "^6.10.1", "eslint-plugin-flowtype": "^5.1.3", "eslint-plugin-import": "^2.21.2", - "eslint-plugin-jsx-a11y": "6.2.3", + "eslint-plugin-jsx-a11y": "^6.3.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.1.4", "eslint-plugin-react": "^7.20.0",