CodeYourFuture / curriculum

The CYF Curriculum
https://curriculum.codeyourfuture.io
Other
28 stars 31 forks source link

Include vscode extension file in Module repos #368

Open SallyMcGrath opened 9 months ago

SallyMcGrath commented 9 months ago

Which module(s) and week(s) does this change affect? Module(s): all Week(s): n/a

What is the work that needs to be done?

We spend a lot of time asking/begging/demanding trainees install Prettier and it really annoys me.

We can include a vscode recommended extensions file in their coursework repos to nag them for me.

Why is this work important to do?

Our general recs are

Current recs

Name ID Purpose
Prettier esbenp.prettier-vscode Code formatter - Format your code automatically
ESLint dbaeumer.vscode-eslint Linter - Tells you when your code is wrong
Code Spell Checker streetsidesoftware.code-spell-checker Tells you when you've spelt something wrong
GitLens β€” Git supercharged eamodio.gitlens Connect with GitHub/Git
Live Server ritwickdey.LiveServer Run your code in the browser
Live Share MS-vsliveshare.vsliveshare Share your project with a team

Possible additions

Additional context

Who might need to know about this change?

40thieves commented 9 months ago

I was under the impression that we already had a collection of extensions somewhere - but I think it needed some manual intervention to install.

The other thought I had was a Github Action to run Prettier and fail the build if it doesn't pass - unless we already have this? If that's the case then could we make the error more "obvious" - perhaps post a comment on their PR?

40thieves commented 9 months ago

Aha found it: https://github.com/CodeYourFuture/cyf-extension-pack

Looks like we link to it from https://docs.codeyourfuture.io/leaders/joining-the-course/getting-setup#extensions, which is itself linked to from https://curriculum.codeyourfuture.io/guides/code-style-guide/.

Haven't had a poke through the "new" setup though. Ah, linked to from here: https://curriculum.codeyourfuture.io/html-css/prep/

SallyMcGrath commented 9 months ago

We do have an extension pack (as linked in the ticket) but the problem is they don't install it. The recommended extensions file prompts them when they open the repo in VSCode.

pseudopilot commented 1 month ago

Here is the list of repos I'm going to update. Please let me know if I miss something.

ITP: https://github.com/CodeYourFuture/Module-User-Focused-Data https://github.com/CodeYourFuture/Module-Structuring-and-Testing-Data https://github.com/CodeYourFuture/Module-Data-Groups https://github.com/CodeYourFuture/Module-Data-Flows

The Current Curriculum: https://github.com/CodeYourFuture/Module-HTML-CSS https://github.com/CodeYourFuture/Module-JS1 https://github.com/CodeYourFuture/Module-JS2 https://github.com/CodeYourFuture/Module-JS3 https://github.com/CodeYourFuture/Module-React https://github.com/CodeYourFuture/Module-Servers https://github.com/CodeYourFuture/Module-Databases

Projects: https://github.com/CodeYourFuture/group-project-bookshelf https://github.com/CodeYourFuture/CYF-Code-Review-Group-Project/tree/master https://github.com/CodeYourFuture/group-project-jsf-time https://github.com/CodeYourFuture/terminal-tic-tac-toe https://github.com/CodeYourFuture/1000-Paper-Cranes https://github.com/CodeYourFuture/Codewars-API-Project https://github.com/CodeYourFuture/GitHub-Activity-Project https://github.com/CodeYourFuture/CLI-Treasure-Hunt

pseudopilot commented 1 month ago

I have a bash script to make it fast (which I tested with one repo already). But I can't push to the other repos yet. To make me eligible to push my branch to the first repo @illicitonion set ITP team as maintainers of the repo. Either we need to do it for all the repos or I can just hand the script to anybody who has full access already.

JayMayer commented 1 month ago

@pseudopilot Thanks for the adding these! I'm wondering when in the curriculum we should ask trainees to explore this fancy new approach and install recommended extensions.

We introduce VS Code at a different time to cloning a Git repo. That leaves a backlog task in Sprint 3 which mentions the existing extension pack. Unless there's alternative suggestions, I'll make the edit to the backlog issue and ask trainees to:

  1. In VS Code, open the Extensions pane (View > Extensions)
  2. Search for @recommended in the search bar
  3. Click on the button for "Install Workspace Recommended Extensions" (displayed as download arrow inside a cloud icon)

P.S.: It's possible to get VS Code to suggest the CYF extensions pack with:

{
  "recommendations": [
    "CodeYourFuture.cyf-extension-pack"
  ]
}

... however I'm not a fan in this case. It hides what is going on, showing only the extension pack in the Extensions pane, and not each individual extension to be installed.

pseudopilot commented 1 month ago

@JayMayer , thank you. Honestly I didn't know we could use an extensions pack in recommendation. πŸ˜ƒ Now I know 😎