From 8bb4a443a79e1882bac04bf6af1ed6060653dba2 Mon Sep 17 00:00:00 2001 From: sapphi-red Date: Fri, 8 Jul 2022 15:58:37 +0900 Subject: [PATCH] remove eslint-plugin-prettier --- .eslintrc.js | 2 +- .github/workflows/main.yaml | 16 ++++++++++ .prettierignore | 2 ++ package-lock.json | 64 ------------------------------------- package.json | 4 +-- 5 files changed, 21 insertions(+), 67 deletions(-) create mode 100644 .prettierignore diff --git a/.eslintrc.js b/.eslintrc.js index 8280a840..1489d323 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -3,7 +3,7 @@ module.exports = { extends: [ 'eslint:recommended', 'plugin:@typescript-eslint/recommended', - 'plugin:prettier/recommended' + 'prettier' ], overrides: [ { diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 2f5a99b0..f753ec2c 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -36,6 +36,22 @@ jobs: run: npm ci - name: run lint run: npm run lint + format: + name: run format + runs-on: ubuntu-latest + needs: [packages] + steps: + - name: checkout + uses: actions/checkout@v2 + - name: setup Node + uses: actions/setup-node@v2 + with: + node-version: 16.x + cache: npm + - name: npm ci + run: npm ci + - name: run format + run: npx prettier --check . type-check: name: run type-check runs-on: ubuntu-latest diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..de4d1f00 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,2 @@ +dist +node_modules diff --git a/package-lock.json b/package-lock.json index ee8de5d5..42d93a24 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,7 +25,6 @@ "eslint": "^8.19.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-lit": "^1.6.1", - "eslint-plugin-prettier": "^4.0.0", "prettier": "^2.7.1", "rollup-plugin-brotli": "^3.1.0", "sass": "^1.53.0", @@ -1119,27 +1118,6 @@ "eslint": ">= 5" } }, - "node_modules/eslint-plugin-prettier": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.0.0.tgz", - "integrity": "sha512-98MqmCJ7vJodoQK359bqQWaxOE0CS8paAz/GgjaZLyex4TTk3g9HugoO89EqWCrFiOqn9EVvcoo7gZzONCWVwQ==", - "dev": true, - "dependencies": { - "prettier-linter-helpers": "^1.0.0" - }, - "engines": { - "node": ">=6.0.0" - }, - "peerDependencies": { - "eslint": ">=7.28.0", - "prettier": ">=2.0.0" - }, - "peerDependenciesMeta": { - "eslint-config-prettier": { - "optional": true - } - } - }, "node_modules/eslint-scope": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", @@ -1303,12 +1281,6 @@ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true }, - "node_modules/fast-diff": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", - "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", - "dev": true - }, "node_modules/fast-glob": { "version": "3.2.7", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.7.tgz", @@ -2007,18 +1979,6 @@ "url": "https://github.com/prettier/prettier?sponsor=1" } }, - "node_modules/prettier-linter-helpers": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", - "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", - "dev": true, - "dependencies": { - "fast-diff": "^1.1.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", @@ -3269,15 +3229,6 @@ "requireindex": "^1.2.0" } }, - "eslint-plugin-prettier": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.0.0.tgz", - "integrity": "sha512-98MqmCJ7vJodoQK359bqQWaxOE0CS8paAz/GgjaZLyex4TTk3g9HugoO89EqWCrFiOqn9EVvcoo7gZzONCWVwQ==", - "dev": true, - "requires": { - "prettier-linter-helpers": "^1.0.0" - } - }, "eslint-scope": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", @@ -3374,12 +3325,6 @@ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true }, - "fast-diff": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", - "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", - "dev": true - }, "fast-glob": { "version": "3.2.7", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.7.tgz", @@ -3908,15 +3853,6 @@ "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", "dev": true }, - "prettier-linter-helpers": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", - "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", - "dev": true, - "requires": { - "fast-diff": "^1.1.2" - } - }, "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", diff --git a/package.json b/package.json index c9fbc014..7984fa69 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,8 @@ "serve": "vite preview", "type-check": "tsc --noEmit", "lint": "eslint --cache .", - "lint:fix": "eslint --fix --cache ." + "lint:fix": "eslint --fix --cache .", + "format": "prettier --cache --write ." }, "devDependencies": { "@types/throttle-debounce": "^5.0.0", @@ -18,7 +19,6 @@ "eslint": "^8.19.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-lit": "^1.6.1", - "eslint-plugin-prettier": "^4.0.0", "prettier": "^2.7.1", "rollup-plugin-brotli": "^3.1.0", "sass": "^1.53.0",