From 49815032b16b98dd613c3369695ea5b840c394f0 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Mon, 30 Sep 2019 17:19:18 +0900 Subject: [PATCH 01/10] Added more test logging in config.yml --- .circleci/config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index f02a3a80f..9683ca91f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -105,6 +105,8 @@ jobs: - attach_workspace: at: "." + - run: ls test -l + - run: ls test/tests -l - run: npm run test:unit -- --coverage tsc: From 7e8331474cc16ef1e5d24398b73ffb148d49f5b9 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Mon, 30 Sep 2019 17:20:59 +0900 Subject: [PATCH 02/10] Added more test logging in config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9683ca91f..4d902f051 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -105,7 +105,7 @@ jobs: - attach_workspace: at: "." - - run: ls test -l + - run: ls test/tests -l - run: ls test/tests -l - run: npm run test:unit -- --coverage From 524bbd3c8d3e7de5b44f12117b598f1b5bd2629c Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Mon, 30 Sep 2019 17:22:35 +0900 Subject: [PATCH 03/10] Added logging to the right place... --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4d902f051..5d926b804 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -91,6 +91,8 @@ jobs: - attach_workspace: at: "." + - run: ls test/tests -l + - run: ls test/tests -l - run: npm run test:end-to-end test-unit: @@ -105,8 +107,6 @@ jobs: - attach_workspace: at: "." - - run: ls test/tests -l - - run: ls test/tests -l - run: npm run test:unit -- --coverage tsc: From 81794ac34cd28ea14f102358bdfa78a654f82b4d Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Mon, 30 Sep 2019 17:23:58 +0900 Subject: [PATCH 04/10] ls 'test/tests/custom eslint path' -l --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5d926b804..f038ddf7a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -92,7 +92,7 @@ jobs: at: "." - run: ls test/tests -l - - run: ls test/tests -l + - run: ls 'test/tests/custom eslint path' -l - run: npm run test:end-to-end test-unit: From 1157bdf91fd9eab3c2319c39056b36b761649c26 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Mon, 30 Sep 2019 17:25:54 +0900 Subject: [PATCH 05/10] Added missing .log files from tests --- test/tests/custom eslint path/tslint-to-eslint-config.log | 2 ++ test/tests/custom package path/tslint-to-eslint-config.log | 2 ++ test/tests/custom typescript path/tslint-to-eslint-config.log | 2 ++ test/tests/missing tslint.json/tslint-to-eslint-config.log | 0 test/tests/standalone tslint.json/tslint-to-eslint-config.log | 2 ++ 5 files changed, 8 insertions(+) create mode 100644 test/tests/custom eslint path/tslint-to-eslint-config.log create mode 100644 test/tests/custom package path/tslint-to-eslint-config.log create mode 100644 test/tests/custom typescript path/tslint-to-eslint-config.log create mode 100644 test/tests/missing tslint.json/tslint-to-eslint-config.log create mode 100644 test/tests/standalone tslint.json/tslint-to-eslint-config.log diff --git a/test/tests/custom eslint path/tslint-to-eslint-config.log b/test/tests/custom eslint path/tslint-to-eslint-config.log new file mode 100644 index 000000000..f76acb2ca --- /dev/null +++ b/test/tests/custom eslint path/tslint-to-eslint-config.log @@ -0,0 +1,2 @@ +no-implicit-dependencies does not yet have an ESLint equivalent. +strict-boolean-expressions does not yet have an ESLint equivalent. diff --git a/test/tests/custom package path/tslint-to-eslint-config.log b/test/tests/custom package path/tslint-to-eslint-config.log new file mode 100644 index 000000000..f76acb2ca --- /dev/null +++ b/test/tests/custom package path/tslint-to-eslint-config.log @@ -0,0 +1,2 @@ +no-implicit-dependencies does not yet have an ESLint equivalent. +strict-boolean-expressions does not yet have an ESLint equivalent. diff --git a/test/tests/custom typescript path/tslint-to-eslint-config.log b/test/tests/custom typescript path/tslint-to-eslint-config.log new file mode 100644 index 000000000..f76acb2ca --- /dev/null +++ b/test/tests/custom typescript path/tslint-to-eslint-config.log @@ -0,0 +1,2 @@ +no-implicit-dependencies does not yet have an ESLint equivalent. +strict-boolean-expressions does not yet have an ESLint equivalent. diff --git a/test/tests/missing tslint.json/tslint-to-eslint-config.log b/test/tests/missing tslint.json/tslint-to-eslint-config.log new file mode 100644 index 000000000..e69de29bb diff --git a/test/tests/standalone tslint.json/tslint-to-eslint-config.log b/test/tests/standalone tslint.json/tslint-to-eslint-config.log new file mode 100644 index 000000000..f76acb2ca --- /dev/null +++ b/test/tests/standalone tslint.json/tslint-to-eslint-config.log @@ -0,0 +1,2 @@ +no-implicit-dependencies does not yet have an ESLint equivalent. +strict-boolean-expressions does not yet have an ESLint equivalent. From 0e4a4c9e0ac709de0c74bb4bc1fe943bbf3d2d98 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Mon, 30 Sep 2019 17:34:28 +0900 Subject: [PATCH 06/10] Added missing period, maybe, to testRegex --- test/jest.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/jest.config.js b/test/jest.config.js index 7b1c51589..1a3276a99 100644 --- a/test/jest.config.js +++ b/test/jest.config.js @@ -1,5 +1,5 @@ module.exports = { moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"], - testRegex: "test(.*)\\test\\.ts$", + testRegex: "test(.*)\\.test\\.ts$", testEnvironment: "node", }; From 41ee53fd4d90507f7e69580134c411e78a7eb729 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Mon, 30 Sep 2019 17:48:21 +0900 Subject: [PATCH 07/10] Meh removing backslashes altogether --- test/jest.config.js | 2 +- test/tests/custom package path/tslint-to-eslint-config.log | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/test/jest.config.js b/test/jest.config.js index 1a3276a99..76cc908f7 100644 --- a/test/jest.config.js +++ b/test/jest.config.js @@ -1,5 +1,5 @@ module.exports = { moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"], - testRegex: "test(.*)\\.test\\.ts$", + testRegex: "test(.*).test.ts$", testEnvironment: "node", }; diff --git a/test/tests/custom package path/tslint-to-eslint-config.log b/test/tests/custom package path/tslint-to-eslint-config.log index f76acb2ca..e69de29bb 100644 --- a/test/tests/custom package path/tslint-to-eslint-config.log +++ b/test/tests/custom package path/tslint-to-eslint-config.log @@ -1,2 +0,0 @@ -no-implicit-dependencies does not yet have an ESLint equivalent. -strict-boolean-expressions does not yet have an ESLint equivalent. From 58011c48e3919130a466ef3fdc95159c4e5c4791 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Mon, 30 Sep 2019 17:55:26 +0900 Subject: [PATCH 08/10] And some missing log and json files --- .gitignore | 3 +- test/tests/custom package path/.eslintrc.json | 31 ++++++++++++ .../tslint-to-eslint-config.log | 2 + .../custom typescript path/.eslintrc.json | 31 ++++++++++++ test/tests/missing tslint.json/.eslintrc.json | 50 +++++++++++++++++++ 5 files changed, 116 insertions(+), 1 deletion(-) create mode 100644 test/tests/custom package path/.eslintrc.json create mode 100644 test/tests/custom typescript path/.eslintrc.json create mode 100644 test/tests/missing tslint.json/.eslintrc.json diff --git a/.gitignore b/.gitignore index 7b7044a9b..54654c847 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,5 @@ node_modules/ src/**/*.js test/*.js ~test/jest.config.js -test/tests/**/.eslintrc* +!test/tests/**/.eslintrc* +!test/tests/**/*.log diff --git a/test/tests/custom package path/.eslintrc.json b/test/tests/custom package path/.eslintrc.json new file mode 100644 index 000000000..06585f8f1 --- /dev/null +++ b/test/tests/custom package path/.eslintrc.json @@ -0,0 +1,31 @@ +module.exports = { + env: { + es6: true, + node: true, + }, + parser: "@typescript-eslint/parser", + parserOptions: { + project: "tsconfig.json", + sourceType: "module", + }, + plugins: ["@typescript-eslint", "@typescript-eslint/tslint"], + rules: { + "@typescript-eslint/array-type": "error", + "@typescript-eslint/interface-name-prefix": "error", + "no-magic-numbers": "off", + "prefer-template": "off", + "@typescript-eslint/tslint/config": [ + "error", + { + rules: { + "no-implicit-dependencies": [true, "dev"], + "strict-boolean-expressions": [ + true, + "allow-boolean-or-undefined", + "allow-number", + ], + }, + }, + ], + }, +}; diff --git a/test/tests/custom package path/tslint-to-eslint-config.log b/test/tests/custom package path/tslint-to-eslint-config.log index e69de29bb..f76acb2ca 100644 --- a/test/tests/custom package path/tslint-to-eslint-config.log +++ b/test/tests/custom package path/tslint-to-eslint-config.log @@ -0,0 +1,2 @@ +no-implicit-dependencies does not yet have an ESLint equivalent. +strict-boolean-expressions does not yet have an ESLint equivalent. diff --git a/test/tests/custom typescript path/.eslintrc.json b/test/tests/custom typescript path/.eslintrc.json new file mode 100644 index 000000000..3dc1ec1c1 --- /dev/null +++ b/test/tests/custom typescript path/.eslintrc.json @@ -0,0 +1,31 @@ +module.exports = { + env: { + browser: true, + node: true, + }, + parser: "@typescript-eslint/parser", + parserOptions: { + project: "tsconfig.json", + sourceType: "module", + }, + plugins: ["@typescript-eslint", "@typescript-eslint/tslint"], + rules: { + "@typescript-eslint/array-type": "error", + "@typescript-eslint/interface-name-prefix": "error", + "no-magic-numbers": "off", + "prefer-template": "off", + "@typescript-eslint/tslint/config": [ + "error", + { + rules: { + "no-implicit-dependencies": [true, "dev"], + "strict-boolean-expressions": [ + true, + "allow-boolean-or-undefined", + "allow-number", + ], + }, + }, + ], + }, +}; diff --git a/test/tests/missing tslint.json/.eslintrc.json b/test/tests/missing tslint.json/.eslintrc.json new file mode 100644 index 000000000..9e8bc631d --- /dev/null +++ b/test/tests/missing tslint.json/.eslintrc.json @@ -0,0 +1,50 @@ +{ + "env": { + "es6": true, + "node": true + }, + "parser": "@typescript-eslint/parser", + "parserOptions": { + "project": "tsconfig.json", + "sourceType": "module" + }, + "plugins": [ + "@typescript-eslint", + "@typescript-eslint/tslint" + ], + "rules": { + "@typescript-eslint/array-type": "error", + "@typescript-eslint/interface-name-prefix": "error", + "@typescript-eslint/member-ordering": "off", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-param-reassign": "off", + "@typescript-eslint/no-parameter-properties": "off", + "@typescript-eslint/no-use-before-declare": "off", + "@typescript-eslint/promise-function-async": "off", + "@typescript-eslint/unbound-method": "off", + "arrow-body-style": "off", + "default-case": "off", + "linebreak-style": "off", + "no-bitwise": "off", + "no-empty": "off", + "no-empty-functions": "off", + "no-magic-numbers": "off", + "prefer-template": "off", + "@typescript-eslint/tslint/config": [ + "error", + { + "rules": { + "no-implicit-dependencies": [ + true, + "dev" + ], + "strict-boolean-expressions": [ + true, + "allow-boolean-or-undefined", + "allow-number" + ] + } + } + ] + } +} From b18fa036a16c35c156659a48f6b3711fd94c04f2 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Mon, 30 Sep 2019 18:24:17 +0900 Subject: [PATCH 09/10] Added ts-node install to test-end-to-end --- .circleci/config.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f038ddf7a..8f9899ad9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -91,8 +91,7 @@ jobs: - attach_workspace: at: "." - - run: ls test/tests -l - - run: ls 'test/tests/custom eslint path' -l + - run: npm i -g ts-node - run: npm run test:end-to-end test-unit: From 0f57013b8f75f403dc0cd35c10857bfcee4fa831 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Mon, 30 Sep 2019 18:26:01 +0900 Subject: [PATCH 10/10] Remove test-end-to-end from running --- .circleci/config.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8f9899ad9..cd83ede4b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -144,9 +144,6 @@ workflows: - prettier: requires: - build - - test-end-to-end: - requires: - - build - test-unit: requires: - build