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

chore: linting fixes and improvements #427

Merged
merged 3 commits into from
Sep 7, 2023

Conversation

luis-almeida
Copy link
Contributor

Description

I have just realised that we were only running the checks workflow on PRs against master.
This means that our all the PRs on v4-alpha were unchecked. In this PR I editing the action so checks run on PRs against all branches.

Keeping consistency around file/folder naming, app structure or export/import patterns is hard.
In this PR I'm also adding bringing in eslint-plugin-check-file to check for file and folder name patterns. This is an alternative approach to using ls-lint tried in #426.

Screenshots

Checklist

  • 📗 all commit messages follow the conventional commits standard
  • ⬅️ changes are compatible with RTL direction
  • ♿ Changes to the UI are tested for accessibility and compliant with WCAG 2.1.
  • 📝 changes are tested in Chrome, Firefox, Safari and Edge
  • 📱 changes are responsive and tested in mobile
  • 👍 PR is approved by @zendesk/vikings

@luis-almeida luis-almeida requested a review from a team as a code owner September 5, 2023 10:30
"check-file/filename-naming-convention": [
"error",
{
"src/**/*.{js,ts,tsx}": `@(${CAMEL_CASE}|${PASCAL_CASE})`,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately this is the only way to support multiple pattern per file name: dukeluo/eslint-plugin-check-file#28 (comment)

I converted the file to js so we could at least name the variables but we can always inline the regex and keep it .eslintrc.json

@luis-almeida luis-almeida merged commit 5779dbd into v4-alpha Sep 7, 2023
@luis-almeida luis-almeida deleted the luis.eslint_fixes_and_checks branch September 7, 2023 14:12
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