From dff70e0d1130e09f94d569dde06e0c5f144e2313 Mon Sep 17 00:00:00 2001 From: Nima Izadi Date: Fri, 23 Aug 2024 11:15:13 -0400 Subject: [PATCH] Revert "Format code with prettier take 2 (#728)" (#729) --- .github/workflows/prettier.yml | 50 ------ .prettierrc | 6 - package.json | 1 - src/StaticPages/AboutPage.tsx | 18 +-- src/StaticPages/NotFoundPage.tsx | 2 +- src/StaticPages/SponsorshipPage.tsx | 22 +-- src/StaticPages/TeamPage.tsx | 12 +- src/components/Alert/Alert.tsx | 10 +- src/components/App/App.tsx | 20 +-- src/components/Footer/Footer.tsx | 24 +-- src/components/GithubStar/GithubStar.tsx | 14 +- src/components/Head/Head.tsx | 48 +++--- src/components/Header/Header.tsx | 8 +- .../SponsoredConference.tsx | 4 +- .../TwitterFollowButton.tsx | 10 +- src/scenes/ConferenceForm/ConferenceForm.tsx | 152 +++++++++--------- .../ConferenceForm/components/ServerError.tsx | 6 +- src/scenes/ConferenceList/ConferenceList.tsx | 46 +++--- .../components/CFPHeader/CFPHeader.tsx | 4 +- .../ConferenceItem/ConferenceItem.tsx | 30 ++-- .../ConferenceList/ConferenceList.tsx | 6 +- .../NewsletterForm/NewsletterForm.tsx | 48 +++--- .../OpenCollectiveContribution.tsx | 6 +- 23 files changed, 245 insertions(+), 302 deletions(-) delete mode 100644 .github/workflows/prettier.yml delete mode 100644 .prettierrc diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml deleted file mode 100644 index 24ce9387..00000000 --- a/.github/workflows/prettier.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Format Code with Prettier - -on: - pull_request: - branches: - - "main" - -jobs: - format: - runs-on: ubuntu-latest - - steps: - - name: Check out repository - uses: actions/checkout@v3 - with: - # ref: ${{ github.head_ref }} - token: ${{ secrets.GITHUB_TOKEN }} - fetch-depth: 0 - - - name: Set up Node.js - uses: actions/setup-node@v3 - with: - node-version-file: ".nvmrc" - cache: "npm" - - - name: Install dependencies - run: npm ci - - - name: Run Prettier - run: npm run prettier - - - name: Check for changes - id: check_changes - run: | - if [ -n "$(git status --porcelain)" ]; then - echo "changes_detected=true" >> $GITHUB_ENV - else - echo "changes_detected=false" >> $GITHUB_ENV - fi - - - name: Commit and Push changes - if: env.changes_detected == 'true' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - git config --global user.name "github-actions[bot]" - git config --global user.email "github-actions[bot]@users.noreply.github.com" - git add . - git commit -m "chore: fix formatting issues" - git push origin HEAD:${{ github.head_ref }} diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index 8cc2c27e..00000000 --- a/.prettierrc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "semi": false, - "singleQuote": true, - "tabWidth": 2, - "useTabs": false - } diff --git a/package.json b/package.json index c4cb41bb..40d30f27 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,6 @@ "test": "node scripts/test.js", "lint": "eslint .", "format": "eslint --fix .", - "prettier": "npx prettier --write \"**/*.{ts,tsx,}\"", "precommit": "lint-staged", "predeploy": "npm run build", "prepare": "husky" diff --git a/src/StaticPages/AboutPage.tsx b/src/StaticPages/AboutPage.tsx index e274e631..df950aae 100644 --- a/src/StaticPages/AboutPage.tsx +++ b/src/StaticPages/AboutPage.tsx @@ -4,8 +4,8 @@ export default function AboutPage() { return (

@@ -17,16 +17,16 @@ export default function AboutPage() { All the data about the conferences is available on{' '} GitHub {' '} and anyone can submit a new event using{' '} - + the form {' '} or by - + sending a pull request. {' '} Confs.tech is a non-profit initiative and we don’t charge for adding a @@ -35,15 +35,15 @@ export default function AboutPage() {

If you want to help us with the website or want to give discounts to Confs.tech visitors,{' '} - email us. + email us.

With{' '} - + ❤️ {' '} - – · ·{' '} - + – · ·{' '} +

) diff --git a/src/StaticPages/NotFoundPage.tsx b/src/StaticPages/NotFoundPage.tsx index c7bb659e..6ad93725 100644 --- a/src/StaticPages/NotFoundPage.tsx +++ b/src/StaticPages/NotFoundPage.tsx @@ -2,7 +2,7 @@ import { Page } from 'src/components' export default function NotFoundPage() { return ( - +

This page does not exist.

) diff --git a/src/StaticPages/SponsorshipPage.tsx b/src/StaticPages/SponsorshipPage.tsx index d87de4d2..26c09ad7 100644 --- a/src/StaticPages/SponsorshipPage.tsx +++ b/src/StaticPages/SponsorshipPage.tsx @@ -32,8 +32,8 @@ export default function SponsorshipPage() { return (

@@ -54,7 +54,7 @@ export default function SponsorshipPage() {

{sponsorshipAvailability[0]}
{sponsorshipAvailability[1] ? ( - + Available ) : ( @@ -75,7 +75,7 @@ export default function SponsorshipPage() { sponsorship once the donation has been collected.
We collect money through our{' '} - + OpenCollective account . All funds are used to cover the operation costs related to running @@ -86,14 +86,14 @@ export default function SponsorshipPage() {

How do I get an invoice for my payment?

Since you will be paying through our{' '} - + OpenCollective account {' '} you will be able to get a receipt there, directly. You can find the details on how to do it{' '} in their help center. @@ -107,28 +107,28 @@ export default function SponsorshipPage() {

Past sponsors

Thank you to our past sponsors. - + ❤️

  • - + dotConferences
  • - + DevTernity
  • - + TestCon Europe
  • - + BigData Europe
  • diff --git a/src/StaticPages/TeamPage.tsx b/src/StaticPages/TeamPage.tsx index 6fb1c09e..4992405b 100644 --- a/src/StaticPages/TeamPage.tsx +++ b/src/StaticPages/TeamPage.tsx @@ -140,9 +140,9 @@ export default function TeamPage() { return (

    @@ -201,7 +201,7 @@ export default function TeamPage() {

    Reach out to join our team! @@ -215,14 +215,14 @@ export default function TeamPage() {

    Confs.tech contributors

    Conference Data contributors

    diff --git a/src/components/Alert/Alert.tsx b/src/components/Alert/Alert.tsx index 6732e9aa..bfa13c7e 100644 --- a/src/components/Alert/Alert.tsx +++ b/src/components/Alert/Alert.tsx @@ -11,12 +11,12 @@ const Alert: React.FC = ({ children }) => {

    {' '} {children} diff --git a/src/components/App/App.tsx b/src/components/App/App.tsx index e509fd91..1a16d09c 100644 --- a/src/components/App/App.tsx +++ b/src/components/App/App.tsx @@ -13,19 +13,19 @@ export default function App() {

    - } /> - } /> - } /> + } /> + } /> + } /> } /> - } /> - } /> - } /> - } /> - } /> - } /> + } /> + } /> + } /> + } /> + } /> + } /> } />
    diff --git a/src/components/Footer/Footer.tsx b/src/components/Footer/Footer.tsx index 1e56cc96..2871800e 100644 --- a/src/components/Footer/Footer.tsx +++ b/src/components/Footer/Footer.tsx @@ -16,39 +16,39 @@ const Footer = () => {

    - + Add a conference - + About Confs.tech - + Our Team - + Sponsor - + Confs.tech on GitHub - + Follow us on Twitter

    - - - + + +

    Sponsor: Search by Algolia

    @@ -57,7 +57,7 @@ const Footer = () => { const HiddenLinks = () => { return ( -
    +
    {Object.keys(TOPICS).map((topic) => { return (

    diff --git a/src/components/GithubStar/GithubStar.tsx b/src/components/GithubStar/GithubStar.tsx index 8703b837..9a9c942c 100644 --- a/src/components/GithubStar/GithubStar.tsx +++ b/src/components/GithubStar/GithubStar.tsx @@ -11,17 +11,17 @@ const GithubStar = () => { return ( <> - +

    Star diff --git a/src/components/Head/Head.tsx b/src/components/Head/Head.tsx index fd929677..5354131a 100644 --- a/src/components/Head/Head.tsx +++ b/src/components/Head/Head.tsx @@ -12,54 +12,54 @@ const Head = () => { return ( <> - + Find your next tech conference | JavaScript, UX, Ruby and more - + - - - + + + - - - + + + - + {/* */} - + ) diff --git a/src/components/Header/Header.tsx b/src/components/Header/Header.tsx index 3bf6d1c0..f1e545b0 100644 --- a/src/components/Header/Header.tsx +++ b/src/components/Header/Header.tsx @@ -19,22 +19,22 @@ const Header: React.FC = ({
    - -
    {backButton && ( - + Back to the conferences )} diff --git a/src/components/SponsoredConference/SponsoredConference.tsx b/src/components/SponsoredConference/SponsoredConference.tsx index dc2a7b82..a0376ba7 100644 --- a/src/components/SponsoredConference/SponsoredConference.tsx +++ b/src/components/SponsoredConference/SponsoredConference.tsx @@ -42,7 +42,7 @@ const SponsoredConference = () => {
    - + {sponsorConference.name} @@ -50,7 +50,7 @@ const SponsoredConference = () => {

    {sponsorConference.conferenceDate}

    {sponsorConference.tagline}

    - + sponsored
    diff --git a/src/components/TwitterFollowButton/TwitterFollowButton.tsx b/src/components/TwitterFollowButton/TwitterFollowButton.tsx index 368f44a3..397c52cc 100644 --- a/src/components/TwitterFollowButton/TwitterFollowButton.tsx +++ b/src/components/TwitterFollowButton/TwitterFollowButton.tsx @@ -23,15 +23,15 @@ const Twitter = () => {
    Follow @ConfsTech diff --git a/src/scenes/ConferenceForm/ConferenceForm.tsx b/src/scenes/ConferenceForm/ConferenceForm.tsx index ae6a71d6..bd2a7207 100644 --- a/src/scenes/ConferenceForm/ConferenceForm.tsx +++ b/src/scenes/ConferenceForm/ConferenceForm.tsx @@ -294,13 +294,13 @@ const ConferenceForm: React.FC = () => { return ( -