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

Lint with awesome-lint via GitHub Actions #1794

Closed
wants to merge 3 commits into from

Conversation

Richienb
Copy link
Contributor

@Richienb Richienb commented Jun 15, 2020

See #1696

Fixes #1619
Fixes #1675

// @sindresorhus

@sindresorhus
Copy link
Owner

Any comments on #1696 (comment) ?

@ibnesayeed
Copy link
Contributor

Any comments on #1696 (comment) ?

I do not see a reason why it will not pass. What issues do you anticipate will happen when merged? As far as I know, actions/checkout@v2 had a breaking change, but that was taken care by setting the fetch-depth to 0.

@Scrum
Copy link

Scrum commented Jul 23, 2020

When trying to install awesome-lint globally i faced the problem:

checkPermissions Missing write access to /usr/local/lib/node_modules

I managed to solve this by setting a custom global scope. This is how my solution looks like:

name: Awesome readme lint
on:
  pull_request:
    types: [opened, synchronize]
    branches:
      - main
jobs:
  build:
    name: awesome readme lint
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - run: |
          mkdir ~/.npm-global
          npm config set prefix '~/.npm-global'
          PATH=~/.npm-global/bin:$PATH
          npm install --global awesome-lint
          awesome-lint

probonopd added a commit to AppImageCommunity/awesome-appimage that referenced this pull request Aug 3, 2020
@probonopd
Copy link
Contributor

I was able to run the linter by just adding the one file from this pull request to my repository at AppImageCommunity/awesome-appimage@1494277 without any further changes. The linter seems to work since it has found some issues.

So to me, this appears to get the job done! 👍

@RayBB
Copy link
Contributor

RayBB commented Aug 16, 2020

@probonopd your solution looks good!

You could make it a bit shorter by using npx like this if you want to save one step.

probonopd added a commit to AppImageCommunity/awesome-appimage that referenced this pull request Aug 16, 2020
@KeyboardInterrupt
Copy link
Contributor

Having this makes total sense, I set up awesome-lint on awesome-ansible as well, although slightly different.
The main difference is that I use npx directly, as described here in the awesome-lint projects readme.

👍

@sindresorhus
Copy link
Owner

I do not see a reason why it will not pass. What issues do you anticipate will happen when merged? As far as I know, actions/checkout@v2 had a breaking change, but that was taken care by setting the fetch-depth to 0.

I think I explained it pretty clearly in the linked comment. The readme here does not pass all the awesome-lint rules.

@sindresorhus
Copy link
Owner

@Richienb Are you interested in finishing this or should I close?

@Richienb
Copy link
Contributor Author

I'm just coming back to this now and I'll continue working on this.

@fityanos

This comment has been minimized.

@Richienb

This comment has been minimized.

with:
node-version: 12
- run: npm install --global awesome-lint
- run: awesome-lint

Choose a reason for hiding this comment

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

Could just use npx awesome-lint per the docs, seem redundant having multiple steps.

@zrosenbauer
Copy link

@Richienb you trying to finish this up? I'd be happy to jump in and help here. I'm assuming @sindresorhus we could use the remark comments to filter out some of the issues with the list?

Screen Shot 2021-02-10 at 7 32 42 PM

I was able to add <!--lint ignore awesome-github awesome-heading--> to nix majority of those. Need to fix code of conduct still...

@Richienb
Copy link
Contributor Author

Richienb commented Mar 7, 2021

I'll close this PR if #1851 gets merged

@zrosenbauer
Copy link

I'll close this PR if #1851 gets merged

Fixed in #1962

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

I don't have a Awersome list but if i'm correct that is good

@pgollucci
Copy link

I am about to submit the awesome-projen list based on projen. I am also the creator of p6-projen-project-awesome-list which uses projen to setup a repo as an awesome-list and "obsoletes" yeoman with a more general purpose tool.

It already includes awesome-lint in the the GitHub Action workflow. As far as I know, it also sets up the repo in 100% compliance out of the box.

@pgollucci
Copy link

https://github.com/p6m7g8/awesome-projen
https://github.com/p6m7g8/p6-projen-project-awesome-list
https://github.com/projen/projen

projen is related to awesome-cdk and awesome-cdk8s and awesome-terraform-cdk

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.

Lint Awesome itself
10 participants