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

Tool integration - Standard.JS #41

Merged
merged 10 commits into from
Nov 1, 2024
Merged

Tool integration - Standard.JS #41

merged 10 commits into from
Nov 1, 2024

Conversation

philliparaujo
Copy link

@philliparaujo philliparaujo commented Oct 23, 2024

Local installation (Part 1)

Created new branch and ran npm install standard --save-dev.
Ran standard tool on entire directory using npx standard.

Proof

Project 3A installation 1

First screenshot shows the StandardJS tool being locally installed.

Project 3A installation 2

The second screenshot shows that I ran npx standard and put the outputs of the command into a file. Running wc -l on the two files shows the number of lines they have.

Artifacts

The output of running npx standard was redirected to standard.out, but since the output was so big (~250K lines), I sampled the first 10,000 lines in standard-short.out, which can be viewed on GitHub by clicking "View file". The first 10 lines of the output look like:

/home/phillip/NodeBB-group/Gruntfile.js:1:13: Extra semicolon. (semi)
/home/phillip/NodeBB-group/Gruntfile.js:3:29: Extra semicolon. (semi)
/home/phillip/NodeBB-group/Gruntfile.js:4:31: Extra semicolon. (semi)
/home/phillip/NodeBB-group/Gruntfile.js:7:1: Unexpected tab character. (no-tabs)
/home/phillip/NodeBB-group/Gruntfile.js:7:1: Expected indentation of 2 spaces but found 1 tab. (indent)
/home/phillip/NodeBB-group/Gruntfile.js:7:17: Unexpected trailing comma. (comma-dangle)
/home/phillip/NodeBB-group/Gruntfile.js:8:3: Extra semicolon. (semi)
/home/phillip/NodeBB-group/Gruntfile.js:9:35: Extra semicolon. (semi)
/home/phillip/NodeBB-group/Gruntfile.js:10:42: Extra semicolon. (semi)
/home/phillip/NodeBB-group/Gruntfile.js:12:24: Extra semicolon. (semi)

The file path /home/phillip/NodeBB-group is my where I store the local repo for our group. Even though these first few lines only show one file, the outfile has formatting suggestions for many other files, including ones that we edited.

Tool Integration (Part 2)

I added a Github Actions to pushes that triggers StandardJS on a git push or a pull request.

NOTE

Unfortunately, StandardJS formatting is not compatible with eslint formatting. I modified public/src/modules/chat.js to pass when running npx standard, but essentially all other files will fail. Because of this change though, the eslinter fails on that same file. I modified the standard.out file to show what running npx standard looked like before making formatting changes.

Resolves #55

@coveralls
Copy link

coveralls commented Oct 23, 2024

Pull Request Test Coverage Report for Build 11603627880

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 82.643%

Totals Coverage Status
Change from base Build 11448330104: 0.0%
Covered Lines: 22411
Relevant Lines: 25693

💛 - Coveralls

@philliparaujo philliparaujo added the enhancement New feature or request label Oct 24, 2024
@philliparaujo philliparaujo marked this pull request as ready for review October 24, 2024 15:29
@philliparaujo philliparaujo removed the enhancement New feature or request label Oct 24, 2024
Copy link

@KesterTan KesterTan left a comment

Choose a reason for hiding this comment

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

Should we also have the new package.json with standard-js?

@philliparaujo
Copy link
Author

Should we also have the new package.json with standard-js?

Yes but I believe the package.json is git ignored, so if I add standard to the file it won't be saved when I commit it. I asked in class and the professor said screenshots work as installation, at least for now.

Copy link

@heyanuja heyanuja left a comment

Choose a reason for hiding this comment

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

Looks good to me, will assess further when looking to merge

@philliparaujo philliparaujo changed the title Static tool - Standard.JS Tool integration - Standard.JS Oct 31, 2024
Copy link

@katcday katcday left a comment

Choose a reason for hiding this comment

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

Looks good to me! Make sure to include why signals aren't passing.

Copy link

@KesterTan KesterTan left a comment

Choose a reason for hiding this comment

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

LGTM other than the lint/build checks

@philliparaujo philliparaujo merged commit ba0d26f into f24 Nov 1, 2024
0 of 3 checks passed
@philliparaujo philliparaujo deleted the standard-js-tool branch November 15, 2024 21:37
@KesterTan KesterTan linked an issue Nov 16, 2024 that may be closed by this pull request
@KesterTan KesterTan added the enhancement New feature or request label Nov 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integrate Standard JS
5 participants