From 4ab355364e355e3b612d75a3e0de2839aca698b8 Mon Sep 17 00:00:00 2001 From: hughhhh Date: Fri, 15 Oct 2021 17:26:06 -0400 Subject: [PATCH 1/3] save --- .pre-commit-config.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 80202bebfab9a..0c254afdfae97 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -48,3 +48,8 @@ repos: hooks: - id: black language_version: python3 + - repo: https://github.com/pre-commit/mirrors-prettier + rev: v2.2.1 # Use the sha or tag you want to point at + hooks: + - id: prettier + - args: ["'./{src,spec,cypress-base}/**/*{.js,.jsx,.ts,.tsx,.css,.less,.scss,.sass}'"] \ No newline at end of file From 4b36f716813d4d65cc7aab08b59b781d1c27b5d5 Mon Sep 17 00:00:00 2001 From: hughhhh Date: Fri, 15 Oct 2021 17:56:45 -0400 Subject: [PATCH 2/3] fix --- .github/workflows/superset-frontend.yml | 2 +- .pre-commit-config.yaml | 2 +- superset-frontend/.storybook/storybook.css | 2 +- superset-frontend/cypress-base/cypress.json | 4 +--- superset-frontend/cypress-base/tsconfig.json | 2 +- superset-frontend/src/common/components/.eslintrc | 6 +++--- superset-frontend/src/components/.eslintrc | 4 +--- superset-frontend/tsconfig.json | 2 +- 8 files changed, 10 insertions(+), 14 deletions(-) diff --git a/.github/workflows/superset-frontend.yml b/.github/workflows/superset-frontend.yml index afdcb889effc4..fbcc272f573bc 100644 --- a/.github/workflows/superset-frontend.yml +++ b/.github/workflows/superset-frontend.yml @@ -31,7 +31,7 @@ jobs: if: steps.check.outcome == 'failure' uses: actions/setup-node@v2 with: - node-version: '16' + node-version: "16" - name: Install dependencies if: steps.check.outcome == 'failure' uses: ./.github/actions/cached-dependencies diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0c254afdfae97..c41a680f9534a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -52,4 +52,4 @@ repos: rev: v2.2.1 # Use the sha or tag you want to point at hooks: - id: prettier - - args: ["'./{src,spec,cypress-base}/**/*{.js,.jsx,.ts,.tsx,.css,.less,.scss,.sass}'"] \ No newline at end of file + files: 'superset-frontend' \ No newline at end of file diff --git a/superset-frontend/.storybook/storybook.css b/superset-frontend/.storybook/storybook.css index ce5f7a12419be..b4e2fce55b7df 100644 --- a/superset-frontend/.storybook/storybook.css +++ b/superset-frontend/.storybook/storybook.css @@ -1,3 +1,3 @@ -body{ +body { background: transparent; } diff --git a/superset-frontend/cypress-base/cypress.json b/superset-frontend/cypress-base/cypress.json index db4c628d1c212..4e37441d75d30 100644 --- a/superset-frontend/cypress-base/cypress.json +++ b/superset-frontend/cypress-base/cypress.json @@ -5,9 +5,7 @@ "numTestsKeptInMemory": 0, "experimentalFetchPolyfill": true, "requestTimeout": 10000, - "ignoreTestFiles": [ - "**/!(*.test.js|*.test.ts)" - ], + "ignoreTestFiles": ["**/!(*.test.js|*.test.ts)"], "video": false, "videoUploadOnPasses": false, "viewportWidth": 1280, diff --git a/superset-frontend/cypress-base/tsconfig.json b/superset-frontend/cypress-base/tsconfig.json index d047e2640fad7..e983ed3a3ecd0 100644 --- a/superset-frontend/cypress-base/tsconfig.json +++ b/superset-frontend/cypress-base/tsconfig.json @@ -8,7 +8,7 @@ "lib": ["es2019", "DOM"], "types": ["cypress"], "allowJs": true, - "noEmit": true, + "noEmit": true }, "files": ["cypress/support/index.d.ts"], "include": ["node_modules/cypress", "cypress/**/*.ts"] diff --git a/superset-frontend/src/common/components/.eslintrc b/superset-frontend/src/common/components/.eslintrc index 586abc67e8d22..84622e9fb2684 100644 --- a/superset-frontend/src/common/components/.eslintrc +++ b/superset-frontend/src/common/components/.eslintrc @@ -23,9 +23,9 @@ { "paths": [ { - "name": "@superset-ui/core", - "importNames": ["supersetTheme"], - "message": "Please use the theme directly from the ThemeProvider rather than importing supersetTheme." + "name": "@superset-ui/core", + "importNames": ["supersetTheme"], + "message": "Please use the theme directly from the ThemeProvider rather than importing supersetTheme." } ] } diff --git a/superset-frontend/src/components/.eslintrc b/superset-frontend/src/components/.eslintrc index a01df155ac687..84622e9fb2684 100644 --- a/superset-frontend/src/components/.eslintrc +++ b/superset-frontend/src/components/.eslintrc @@ -24,9 +24,7 @@ "paths": [ { "name": "@superset-ui/core", - "importNames": [ - "supersetTheme" - ], + "importNames": ["supersetTheme"], "message": "Please use the theme directly from the ThemeProvider rather than importing supersetTheme." } ] diff --git a/superset-frontend/tsconfig.json b/superset-frontend/tsconfig.json index ed0ce53498744..f0ef1971071d9 100644 --- a/superset-frontend/tsconfig.json +++ b/superset-frontend/tsconfig.json @@ -7,7 +7,7 @@ "forceConsistentCasingInFileNames": true, "importHelpers": false, "jsx": "preserve", - "lib": ["dom", "dom.iterable", "esnext"], + "lib": ["dom", "dom.iterable", "esnext"], "module": "esnext", "moduleResolution": "node", "noImplicitAny": true, From af91bfb5f9b5c736029e7a36a7e334106fa5d4fe Mon Sep 17 00:00:00 2001 From: hughhhh Date: Mon, 18 Oct 2021 14:21:35 -0400 Subject: [PATCH 3/3] fix pre-commit --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c41a680f9534a..a3c5fd6da43a9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -52,4 +52,4 @@ repos: rev: v2.2.1 # Use the sha or tag you want to point at hooks: - id: prettier - files: 'superset-frontend' \ No newline at end of file + files: 'superset-frontend'