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

CONTRIBUTING.md: Amend linting note about npm script file path #29323

Merged
merged 1 commit into from
Jan 16, 2025

Conversation

MaoShizhong
Copy link
Contributor

Because

Currently, the linting guide has a note about running the npm run lint/fix:* scripts in the repo root else it won't find the correct config files. This is technically incorrect (which is my own mistake!) because npm scripts always run from the package root. Linting issues when users' terminals are in a subdirectory actually come from the file path, which they're often writing relative to their terminal location and not the package root, and has nothing to do with their current terminal location.

i.e. they can be inside ./javascript/testing_javascript and as long as they run with a path relative to root, they'll be fine e.g. npm run lint:lesson -- ./javascript/testing_javascript/test_basics.md

This PR

  • Fixes linting warning to be about file path and not terminal cwd

Issue

N/A

Pull Request Requirements

  • I have thoroughly read and understand The Odin Project curriculum contributing guide
  • The title of this PR follows the location of change: brief description of change format, e.g. Intro to HTML and CSS lesson: Fix link text
  • The Because section summarizes the reason for this PR
  • The This PR section has a bullet point list describing the changes in this PR
  • If this PR addresses an open issue, it is linked in the Issue section
  • If any lesson files are included in this PR, they have been previewed with the Markdown preview tool to ensure it is formatted correctly
  • If any lesson files are included in this PR, they follow the Layout Style Guide

Copy link
Contributor

@JoshDevHub JoshDevHub left a comment

Choose a reason for hiding this comment

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

Nice fix. And also thank you for teaching me something new! 😆

@JoshDevHub JoshDevHub merged commit 11b2994 into TheOdinProject:main Jan 16, 2025
2 checks passed
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.

2 participants