Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor/cleanup #172

Merged
merged 173 commits into from
May 14, 2020
Merged

Refactor/cleanup #172

merged 173 commits into from
May 14, 2020

Conversation

vassbence
Copy link
Collaborator

@vassbence vassbence commented Mar 5, 2020

This will fix #171.

@vercel
Copy link

vercel bot commented Mar 5, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/vercel/hyper-site/q7ss2b8ul
✅ Preview: https://hyper-site-git-fork-vassbence-master.vercel.now.sh

@vassbence vassbence mentioned this pull request Mar 5, 2020
@vassbence vassbence changed the title Refactoring Refactor Mar 5, 2020
@vassbence vassbence changed the title Refactor Refactor/cleanup Mar 5, 2020
@vassbence vassbence changed the title Refactor/cleanup [WIP] Refactor/cleanup Mar 5, 2020
@vercel-team
Copy link

vercel-team commented Mar 5, 2020

Comment on lines -13 to -23
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.js": [
"prettier --write",
"git add"
]
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reason to remove this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Husky did not work with [id] named pages, it was a known bug, I can re add it in a sec, if they have since fixed it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's a config you can use:

// lint-staged.config.js

const escape = require('shell-quote').quote

module.exports = {
  '**/*.{js,ts,tsx}': filenames => {
    const escapedFileNames = filenames
      .map(filename => `"${escape([filename])}"`)
      .join(' ')

    return [
      `eslint --max-warnings 0 ${filenames.join(' ')}`,
      `prettier --write ${escapedFileNames}`,
      `git add ${escapedFileNames}`
    ]
  }
}


const formatFileName = (path) => path.replace(/^\/+|\/+$/g, '')

export default () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add SSG to this page too 🙏

The source code won't change that much for plugins, and you can add unstable_revalidate to SSG, the page will be revalidated in the background after X seconds

Copy link
Member

@lfades lfades left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GREAT

Copy link
Contributor

@pacocoursey pacocoursey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing!

@pacocoursey pacocoursey merged commit be57908 into vercel:master May 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Low audit scores
4 participants