Skip to content

Commit

Permalink
UIAPPS-78 Fix format, lint, and test scripts
Browse files Browse the repository at this point in the history
This at least should get CI passing again.

There are a couple parts to this. First, the `examples/sentiment`
package didn't have either a `format` or `lint` script. We add a
`format` script (but don't run it), and a `lint` script that exits with
0. The code style in the `examples/sentiment` package doesn't match up
with the rest of this repo, so it will have to be fixed before we add
an actual `lint` script that does something useful.

Another part of this is that the `lint` script for
`packages/ui-extensions-sdk` broke after pulling in the code from the
`apps` repo. It's unclear why, but `eslint-plugin-prettier` seems to
have some issue with being in a monorepo when run under yarn v1 and not
at the top-level:
prettier/eslint-plugin-prettier#396. While we
could upgrade to yarn v3, we hold off on making that change at the
moment.

Finally, we add a few ignore files so the format/lint scripts are useful
in development (where there might be artifacts in the respective
directories).
  • Loading branch information
joneshf-dd committed Dec 10, 2021
1 parent c95254f commit e67dfee
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions examples/sentiment/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build
1 change: 1 addition & 0 deletions examples/sentiment/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build
4 changes: 3 additions & 1 deletion examples/sentiment/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"format": "prettier --write .",
"lint": "echo TODO: Add lint script",
"test": "react-scripts test --passWithNoTests --watchAll=false",
"eject": "react-scripts eject"
},
"eslintConfig": {
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,8 @@
"workspaces": [
"examples/*",
"packages/*"
]
],
"devDependencies": {
"eslint-plugin-prettier": "3.1.4"
}
}
1 change: 1 addition & 0 deletions packages/ui-extensions-sdk/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist
1 change: 1 addition & 0 deletions packages/ui-extensions-sdk/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist
1 change: 0 additions & 1 deletion packages/ui-extensions-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
"eslint-plugin-import": "2.22.1",
"eslint-plugin-jest": "24.1.0",
"eslint-plugin-no-storage": "1.0.2",
"eslint-plugin-prettier": "3.1.4",
"express": "^4.17.1",
"jest": "^26.6.2",
"prettier": "2.1.2",
Expand Down

0 comments on commit e67dfee

Please sign in to comment.