From 8ac70d4e9490d33ddac608062cc8aed4f5f56b2f Mon Sep 17 00:00:00 2001 From: JounQin Date: Thu, 9 Apr 2020 03:37:58 +0000 Subject: [PATCH 1/2] fix: use prettier-linter-helpers instead of eslint-plugin-prettier --- package.json | 4 ++-- src/prettierRule.ts | 2 +- yarn.lock | 19 ++++++++++++++----- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index b6fee280..e96a40c3 100644 --- a/package.json +++ b/package.json @@ -27,14 +27,14 @@ "release": "standard-version" }, "dependencies": { - "eslint-plugin-prettier": "^2.2.0", "lines-and-columns": "^1.1.6", + "prettier-linter-helpers": "^1.0.0", "tslib": "^1.7.1" }, "devDependencies": { - "@types/eslint-plugin-prettier": "2.2.0", "@types/node": "4.9.3", "@types/prettier": "2.0.0", + "@types/prettier-linter-helpers": "npm:@types/eslint-plugin-prettier", "codecov": "3.6.5", "nyc": "11.9.0", "prettier": "2.0.4", diff --git a/src/prettierRule.ts b/src/prettierRule.ts index 738bd3c6..454731fe 100644 --- a/src/prettierRule.ts +++ b/src/prettierRule.ts @@ -1,4 +1,4 @@ -import * as utils from 'eslint-plugin-prettier'; +import * as utils from 'prettier-linter-helpers'; import LineAndColumn from 'lines-and-columns'; import * as path from 'path'; import * as prettier from 'prettier'; diff --git a/yarn.lock b/yarn.lock index 57307e05..21ec3670 100644 --- a/yarn.lock +++ b/yarn.lock @@ -22,14 +22,15 @@ version "1.0.0" resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.0.0.tgz#9c13c2574c92d4503b005feca8f2e16cc1611506" -"@types/eslint-plugin-prettier@2.2.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@types/eslint-plugin-prettier/-/eslint-plugin-prettier-2.2.0.tgz#26170ee65ce05d811f3ef6fc2987acd525066c7f" - "@types/node@4.9.3": version "4.9.3" resolved "https://registry.yarnpkg.com/@types/node/-/node-4.9.3.tgz#a24697a8157ab517996afe0c88fa716550ae419a" +"@types/prettier-linter-helpers@npm:@types/eslint-plugin-prettier": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@types/eslint-plugin-prettier/-/eslint-plugin-prettier-2.2.0.tgz#26170ee65ce05d811f3ef6fc2987acd525066c7f" + integrity sha512-x/+VXokaYVDxXw6GyDwBhMRkow8HAXlqYKZGpOdMwNcCZvthpEXiDXAQsi2NJOQJqWiqvXK9OI4l67jdyWt3fw== + "@types/prettier@2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.0.0.tgz#dc85454b953178cc6043df5208b9e949b54a3bc4" @@ -798,9 +799,10 @@ fast-deep-equal@^1.0.0: version "1.1.0" resolved "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614" -fast-diff@^1.1.1: +fast-diff@^1.1.1, fast-diff@^1.1.2: version "1.2.0" resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" + integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== fast-json-stable-stringify@^2.0.0: version "2.0.0" @@ -1904,6 +1906,13 @@ preserve@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" +prettier-linter-helpers@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b" + integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w== + dependencies: + fast-diff "^1.1.2" + prettier@2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.0.4.tgz#2d1bae173e355996ee355ec9830a7a1ee05457ef" From 65fcb3d0b28239af0279fd54f4ace918dc06d20b Mon Sep 17 00:00:00 2001 From: JounQin Date: Sat, 11 Apr 2020 05:49:47 +0000 Subject: [PATCH 2/2] chore: use @types/prettier-linter-helpers directly --- .travis.yml | 10 ---------- package.json | 4 ++-- yarn.lock | 8 ++++---- 3 files changed, 6 insertions(+), 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index e2eb3805..8410842e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,16 +15,6 @@ script: - yarn run build - yarn run test -- > # yarn and tslint-test do not work on node 4 - if [ "$TRAVIS_NODE_VERSION" = "6" ]; then - echo '{ "presets": [["@babel/preset-env", { "targets": { "node": "4" } }]] }' > .babelrc.test.json - npm install @babel/cli @babel/core @babel/preset-env - node_modules/.bin/babel node_modules/@babel/code-frame/lib --out-dir node_modules/@babel/code-frame/lib --config-file ./.babelrc.test.json - node_modules/.bin/babel node_modules/@babel/highlight/lib --out-dir node_modules/@babel/highlight/lib --config-file ./.babelrc.test.json - nvm install 4 - npm run test - fi - after_script: - node_modules/.bin/codecov diff --git a/package.json b/package.json index e96a40c3..0327f5d5 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "devDependencies": { "@types/node": "4.9.3", "@types/prettier": "2.0.0", - "@types/prettier-linter-helpers": "npm:@types/eslint-plugin-prettier", + "@types/prettier-linter-helpers": "1.0.0", "codecov": "3.6.5", "nyc": "11.9.0", "prettier": "2.0.4", @@ -52,7 +52,7 @@ "codecov/**/har-validator": "5.1.0" }, "engines": { - "node": ">= 4" + "node": ">= 6" }, "files": [ "/rules/**/*" diff --git a/yarn.lock b/yarn.lock index 21ec3670..a7d058df 100644 --- a/yarn.lock +++ b/yarn.lock @@ -26,10 +26,10 @@ version "4.9.3" resolved "https://registry.yarnpkg.com/@types/node/-/node-4.9.3.tgz#a24697a8157ab517996afe0c88fa716550ae419a" -"@types/prettier-linter-helpers@npm:@types/eslint-plugin-prettier": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@types/eslint-plugin-prettier/-/eslint-plugin-prettier-2.2.0.tgz#26170ee65ce05d811f3ef6fc2987acd525066c7f" - integrity sha512-x/+VXokaYVDxXw6GyDwBhMRkow8HAXlqYKZGpOdMwNcCZvthpEXiDXAQsi2NJOQJqWiqvXK9OI4l67jdyWt3fw== +"@types/prettier-linter-helpers@1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@types/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#04d307e41c3c33ecd1e1e3adc3f79cd2bd3c98e7" + integrity sha512-lMw2L2FDbcRI0XwdGfY4CJynlBKaDkwMTX0loAjgS6ipZEcMcK2Jmi/Ms08PCX82+iYmDCLhqxghI+sUVGc70w== "@types/prettier@2.0.0": version "2.0.0"