Skip to content

Commit

Permalink
feat: Add prettier to pre-commit workflow (apache#17134)
Browse files Browse the repository at this point in the history
* save

* fix

* fix pre-commit
  • Loading branch information
hughhhh authored and Emmanuel Bavoux committed Nov 14, 2021
1 parent 18588b3 commit 9ce5457
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/superset-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
files: 'superset-frontend'
2 changes: 1 addition & 1 deletion superset-frontend/.storybook/storybook.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
body{
body {
background: transparent;
}
4 changes: 1 addition & 3 deletions superset-frontend/cypress-base/cypress.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/cypress-base/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
6 changes: 3 additions & 3 deletions superset-frontend/src/common/components/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -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."
}
]
}
Expand Down
4 changes: 1 addition & 3 deletions superset-frontend/src/components/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -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."
}
]
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 9ce5457

Please sign in to comment.