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

Added lint through GH Action #23

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

RishiKumarRay
Copy link
Contributor

#3

@braaar
Copy link
Owner

braaar commented Jan 24, 2022

The action says this:

Run sibiraj-s/action-eslint@v2
Notice: No files found. Skipping.

Is something not set up properly, perhaps?

https://github.com/braaar/jam-assistant/runs/4920799004?check_suite_focus=true#step:5:1

@braaar
Copy link
Owner

braaar commented Jan 24, 2022

Perhaps we need an .eslintrc?

@RishiKumarRay
Copy link
Contributor Author

@braaar exactly i feel so too, we need that file

@braaar
Copy link
Owner

braaar commented Jan 24, 2022

I can set up eslint later and then we'll merge this action afterwards

@RishiKumarRay
Copy link
Contributor Author

@braaar I tried adding eslint file , maybe you can have a lookout at that file and check it if there are any changes

@braaar
Copy link
Owner

braaar commented Jan 24, 2022

@braaar I tried adding eslint file , maybe you can have a lookout at that file and check it if there are any changes

Careful! In this project we are using yarn, so we don't want that npm package-lock.json file.

Where did you source this eslint config? Can you describe how strict it is, which types of rules it has set up?

Personally I like very strict linting which throws errors for almost everything. I don't like having a bunch of linter warnings just sitting around.

@RishiKumarRay
Copy link
Contributor Author

@braaar maybe i haven't done properly , it seems to add lint and preety you have to add lint and preety file so let me know when you add this than i will work on the github actions of that

@braaar
Copy link
Owner

braaar commented Jan 24, 2022

@braaar maybe i haven't done properly , it seems to add lint and preety you have to add lint and preety file so let me know when you add this than i will work on the github actions of that

Sounds good. We'll take it one step at a time, no worries.

Copy link

@simenandre simenandre left a comment

Choose a reason for hiding this comment

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

Should probably remove package-lock.json

Comment on lines +1 to +32
{
"extends": [
"eslint:recommended",
"plugin:import/errors",
"plugin:react/recommended",
"plugin:jsx-a11y/recommended"
],
"plugins": ["react", "import", "jsx-a11y"],
"rules": {
"react/prop-types": 0,
"indent": ["error", 2],
"linebreak-style": 1,
"quotes": ["error", "double"]
},
"parserOptions": {
"ecmaVersion": 2021,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"env": {
"es6": true,
"browser": true,
"node": true
},
"settings": {
"react": {
"version": "detect"
}
}
}

Choose a reason for hiding this comment

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

Suggested change
{
"extends": [
"eslint:recommended",
"plugin:import/errors",
"plugin:react/recommended",
"plugin:jsx-a11y/recommended"
],
"plugins": ["react", "import", "jsx-a11y"],
"rules": {
"react/prop-types": 0,
"indent": ["error", 2],
"linebreak-style": 1,
"quotes": ["error", "double"]
},
"parserOptions": {
"ecmaVersion": 2021,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"env": {
"es6": true,
"browser": true,
"node": true
},
"settings": {
"react": {
"version": "detect"
}
}
}
{
"extends": "@bjerk/eslint-config"
}

Comment on lines +18 to +22
- uses: sibiraj-s/action-eslint@v2
with:
eslint-args: '--ignore-path=.gitignore --quiet'
extensions: 'js,jsx,ts,tsx'
annotations: true

Choose a reason for hiding this comment

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

Suggested change
- uses: sibiraj-s/action-eslint@v2
with:
eslint-args: '--ignore-path=.gitignore --quiet'
extensions: 'js,jsx,ts,tsx'
annotations: true
- run: yarn lint

Should probably use a NPM script, no need for a special Github Action.

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.

3 participants