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

EPMGCIP-179: Configure linters #31

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

Conversation

Dzmitry-Yaniuk
Copy link
Collaborator

https://jira.epam.com/jira/browse/EPMGCIP-179

Code changes

  • Extended .gitignore to exclude MS and JetBrains IDE working settings;
  • Extended .eslint.json file with multiple rules ESLint rules for TypeScript, JavaScript and React;
  • Added .prettierignore file with folders to exclude some directories from checking for Prettier;
  • Added alias for messages folder in tsconfig.json;
  • Run linters fixes across all app files;

Notes

  • Would be great if there is a chance to double check this PR locally before merging to base branch;
  • Rules extending is welcomed!

@@ -1,5 +1,5 @@
const config = {
'*.{js,jsx,ts,tsx}': ['eslint --fix --max-warnings 100', 'prettier --write'],
'*.{js,jsx,ts,tsx}': ['eslint --fix --max-warnings 30', 'prettier --write'],
Copy link
Collaborator

Choose a reason for hiding this comment

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

@Dzmitry-Yaniuk
What do you think about decreasing warnings to '0'? It was '0' before switching to nextjs, so I guess we can try to continue doing that.

@@ -71,12 +72,41 @@
"pathGroupsExcludedImportTypes": ["react"]
}
],
"max-depth": ["warn", 1],
Copy link
Collaborator

Choose a reason for hiding this comment

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

What do you think about increasing it a little bit to 2 or 3?

"next/core-web-vitals",
"eslint:recommended",
"prettier",
"plugin:@typescript-eslint/recommended"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Previously we also used this plugins:

'plugin:jest/recommended',
'plugin:react-hooks/recommended',
'airbnb',
'airbnb/hooks',
'airbnb-typescript'

Maybe there is a sense to add them as well. What do you think about that?

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