PhoenicisOrg / scripts

Phoenicis scripts
GNU Lesser General Public License v3.0
64 stars 49 forks source link

Use "ESlint Runner" GitHub action #1193

Closed plata closed 4 years ago

plata commented 4 years ago

see https://github.com/marketplace/actions/eslint-runner-action

I hope that this will make it easier for unexperienced users to understand why Codacy fails and adhere to our coding rules

plata commented 4 years ago

@madoar do you think this will work with #1192?

madoar commented 4 years ago

I don't know.

I think it is fine to contain both in the same PR. Do you want to add my changes from #1192 to this PR?

plata commented 4 years ago

I'm wondering because of

npm ci --no-audit --prefer-offline

Let's keep the changes separated. Nevertheless, if you add the package.json here as well, we can see if it will work (and then merge this PR after the other one).

madoar commented 4 years ago

I never did any changes to a PR of someone else. Do you know how I can push to someone elses branch?

plata commented 4 years ago

It's just a branch in this repo (not in my fork). Shouldn't be a problem to edit it.

plata commented 4 years ago

Can we fix the error?

npm ERR! cipm can only install packages with an existing package-lock.json or npm-shrinkwrap.json with lockfileVersion >= 1. Run an install with npm@5 or later to generate it, then try again.

madoar commented 4 years ago

It seems to work

plata commented 4 years ago

But it doesn't show the annotations in #1169 like I would expect.

madoar commented 4 years ago

Is it using the correct eslint configuration file?

plata commented 4 years ago

I don't know. It's detecting errors but it doesn't show them somehow.

plata commented 4 years ago

Or it's an error in the node execution?

madoar commented 4 years ago

This is hard to tell. The issue is that I'm not sure where the given output:

##[error]Validation Failed
##[error]Node run failed with exit code 1

is coming from. It could be either eslint or the action. Additionally I don't know what arguments eslint is run with

plata commented 4 years ago

I don't know. It's here: https://github.com/tinovyatkin/action-eslint/tree/master/src

madoar commented 4 years ago

My best bet is that either we use eslint somehow unconventional or the developer of the action. I think the action fails at

https://github.com/tinovyatkin/action-eslint/blob/07dd0b93c96ec0d081d6be631230729df668b061/src/main.ts#L105

but I'm not 100\% sure

plata commented 4 years ago

@tinovyatkin any idea what's happening here?

madoar commented 4 years ago

@plata how should we continue here? Do we want to to continue with the Codacy comments or should we add another service?

plata commented 4 years ago

Let's go for Codacy.