diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 674f2a4d..2ca8dc3c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,7 +48,7 @@ jobs: - name: Install Dependencies run: cd ../../ && yarn - name: Check rescript lint - run: yarn lint + run: yarn lint:rescript - name: Check javascript, typescript, and markdown lint uses: creyD/prettier_action@v4.2 with: @@ -79,7 +79,7 @@ jobs: name: Components lint runs-on: ubuntu-latest needs: pre_check - if: ${{ (needs.pre_check.outputs.should_skip_components != 'true') || (needs.pre_check.outputs.should_skip_lang != 'true') }} + if: ${{ needs.pre_check.outputs.should_skip_components != 'true' }} defaults: run: shell: bash @@ -92,7 +92,7 @@ jobs: dry: true prettier_options: --check . - components-build-test: + components-bundle-build: name: Components bundle and build runs-on: ubuntu-latest needs: pre_check @@ -116,7 +116,7 @@ jobs: name: Website lint runs-on: ubuntu-latest needs: pre_check - if: ${{ (needs.pre_check.outputs.should_skip_website != 'true') || (needs.pre_check.outputs.should_skip_lang != 'true') || (needs.pre_check.outputs.should_skip_components != 'true') }} + if: ${{ needs.pre_check.outputs.should_skip_website != 'true' }} defaults: run: shell: bash diff --git a/package.json b/package.json index a527e1fa..9601796a 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,9 @@ "scripts": { "nodeclean": "rm -r node_modules && rm -r packages/*/node_modules" }, + "devDependencies": { + "prettier": "^2.6.2" + }, "workspaces": [ "packages/*" ], diff --git a/packages/components/package.json b/packages/components/package.json index 22bf24a4..c16a42b8 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -32,7 +32,9 @@ "start": "cross-env REACT_APP_FAST_REFRESH=false && start-storybook -p 6006 -s public", "build": "tsc -b && build-storybook -s public", "bundle": "webpack", - "all": "yarn bundle && yarn build" + "all": "yarn bundle && yarn build", + "lint": "prettier --check .", + "format": "prettier --write ." }, "eslintConfig": { "extends": [ @@ -76,7 +78,6 @@ "@storybook/preset-create-react-app": "^4.1.0", "@storybook/react": "^6.4.20", "@types/webpack": "^4.41.32", - "prettier": "^2.6.2", "react-codejar": "^1.1.2", "ts-loader": "^9.2.8", "webpack": "^5.72.0", diff --git a/packages/squiggle-lang/package.json b/packages/squiggle-lang/package.json index 1c710978..044edfe3 100644 --- a/packages/squiggle-lang/package.json +++ b/packages/squiggle-lang/package.json @@ -11,8 +11,10 @@ "test": "jest", "test:watch": "jest --watchAll", "coverage": "rm -f *.coverage; yarn clean; BISECT_ENABLE=yes yarn build; yarn test; bisect-ppx-report html", - "lint": "./lint.sh", - "format": "rescript format -all", + "lint:rescript": "./lint.sh", + "lint:prettier": "prettier --check .", + "lint": "yarn lint:rescript && yarn lint:prettier", + "format": "rescript format -all && prettier --write .", "all": "yarn build && yarn bundle && yarn test" }, "keywords": [ diff --git a/packages/website/package.json b/packages/website/package.json index 8744677b..a80076bb 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -6,7 +6,9 @@ "start": "docusaurus start", "build": "docusaurus build", "clean": "docusaurus clear", - "all": "yarn build" + "all": "yarn build", + "lint": "prettier --check .", + "format": "prettier --write ." }, "dependencies": { "@docusaurus/core": "2.0.0-beta.18", diff --git a/yarn.lock b/yarn.lock index 007e0c31..a82fa91e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4025,7 +4025,7 @@ dependencies: "@types/react" "*" -"@types/react@*": +"@types/react@*", "@types/react@^16.9.19", "@types/react@^17.0.43", "@types/react@^18.0.1": version "17.0.44" resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.44.tgz#c3714bd34dd551ab20b8015d9d0dbec812a51ec7" integrity sha512-Ye0nlw09GeMp2Suh8qoOv0odfgCoowfM/9MG6WeRD60Gq9wS90bdkdRtYbRkNhXOpG4H+YXGvj4wOWhAC0LJ1g== @@ -4034,24 +4034,6 @@ "@types/scheduler" "*" csstype "^3.0.2" -"@types/react@^16.9.19": - version "16.14.24" - resolved "https://registry.yarnpkg.com/@types/react/-/react-16.14.24.tgz#f2c5e9fa78f83f769884b83defcf7924b9eb5c82" - integrity sha512-e7U2WC8XQP/xfR7bwhOhNFZKPTfW1ph+MiqtudKb8tSV8RyCsovQx2sNVtKoOryjxFKpHPPC/yNiGfdeVM5Gyw== - dependencies: - "@types/prop-types" "*" - "@types/scheduler" "*" - csstype "^3.0.2" - -"@types/react@^18.0.1": - version "18.0.1" - resolved "https://registry.yarnpkg.com/@types/react/-/react-18.0.1.tgz#1b2e02fb7613212518733946e49fb963dfc66e19" - integrity sha512-VnWlrVgG0dYt+NqlfMI0yUYb8Rdl4XUROyH+c6gq/iFCiZ805Vi//26UW38DHnxQkbDhnrIWTBiy6oKZqL11cw== - dependencies: - "@types/prop-types" "*" - "@types/scheduler" "*" - csstype "^3.0.2" - "@types/resolve@1.17.1": version "1.17.1" resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-1.17.1.tgz#3afd6ad8967c77e4376c598a82ddd58f46ec45d6"