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

[PLAY-1083] Linter implementation: Kits F - J #3021

Merged
merged 10 commits into from
Jan 22, 2024
Merged

[PLAY-1083] Linter implementation: Kits F - J #3021

merged 10 commits into from
Jan 22, 2024

Conversation

thestephenmarshall
Copy link
Contributor

@thestephenmarshall thestephenmarshall commented Jan 9, 2024

https://nitro.powerhrg.com/runway/backlog_items/PLAY-1083

What does this PR do? A clear and concise description with your runway ticket url.

Task
Run our new linter on kits that start with F - J.

Because
We've implemented a linter config, but most/all of our library files are still failing its ruleset. We need to update all kits in groups to eventually clean up the entire library to confirm with the new linter configs.

Note

I also fixed as many warning as I could.

N/A

💻 yarn run eslint --quiet "./playbook/app/pb_kits/playbook/{pb_f,pb_g,pb_h,pb_i}*/**/*.{js,ts,tsx,jsx}"

yarn run v1.22.15
$ /Users/stephen.marshall/code/playbook/node_modules/.bin/eslint --quiet './playbook/app/pb_kits/playbook/{pb_f,pb_g,pb_h,pb_i}*/**/*.{js,ts,tsx,jsx}'

/Users/stephen.marshall/code/playbook/playbook/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.tsx
  44:21  error  Unexpected empty arrow function                           @typescript-eslint/no-empty-function
  83:30  error  Prop `onClick` must be placed on a new line               react/jsx-max-props-per-line
  84:46  error  Prop `fixedWidth` must be placed on a new line            react/jsx-max-props-per-line
  90:17  error  Expected indentation of 18 space characters but found 16  react/jsx-indent-props
  91:17  error  Expected indentation of 18 space characters but found 16  react/jsx-indent-props
  92:17  error  Expected indentation of 18 space characters but found 16  react/jsx-indent-props
  98:39  error  Prop `cursor` must be placed on a new line                react/jsx-max-props-per-line

/Users/stephen.marshall/code/playbook/playbook/app/pb_kits/playbook/pb_flex/_flex.tsx
  10:10  error  Don't use `object` as a type. The `object` type is currently hard to use ([see this issue](https://github.com/microsoft/TypeScript/issues/21732)).
Consider using `Record<string, unknown>` instead, as it allows you to more easily inspect and use the keys  @typescript-eslint/ban-types

/Users/stephen.marshall/code/playbook/playbook/app/pb_kits/playbook/pb_form_group/_form_group.tsx
  10:10  error  Don't use `object` as a type. The `object` type is currently hard to use ([see this issue](https://github.com/microsoft/TypeScript/issues/21732)).
Consider using `Record<string, unknown>` instead, as it allows you to more easily inspect and use the keys  @typescript-eslint/ban-types

/Users/stephen.marshall/code/playbook/playbook/app/pb_kits/playbook/pb_form_pill/_form_pill.tsx
  34:21  error  Unexpected empty arrow function         @typescript-eslint/no-empty-function
  51:26  error  Prop `id` must be placed on a new line  react/jsx-max-props-per-line

/Users/stephen.marshall/code/playbook/playbook/app/pb_kits/playbook/pb_gauge/_gauge.tsx
   20:10  error  Don't use `Boolean` as a type. Use boolean instead      @typescript-eslint/ban-types
  193:7   error  Expected indentation of 8 space characters but found 6  react/jsx-indent-props
  200:7   error  Expected indentation of 8 space characters but found 6  react/jsx-indent-props
  201:7   error  Expected indentation of 8 space characters but found 6  react/jsx-indent-props

/Users/stephen.marshall/code/playbook/playbook/app/pb_kits/playbook/pb_home_address_street/_home_address_street.tsx
  66:7  error  Expected indentation of 8 space characters but found 6  react/jsx-indent-props
  67:7  error  Expected indentation of 8 space characters but found 6  react/jsx-indent-props
  68:7  error  Expected indentation of 8 space characters but found 6  react/jsx-indent-props
  69:7  error  Expected indentation of 8 space characters but found 6  react/jsx-indent-props

/Users/stephen.marshall/code/playbook/playbook/app/pb_kits/playbook/pb_icon_stat_value/_icon_stat_value.tsx
  16:10  error  Don't use `object` as a type. The `object` type is currently hard to use ([see this issue](https://github.com/microsoft/TypeScript/issues/21732)).
Consider using `Record<string, unknown>` instead, as it allows you to more easily inspect and use the keys  @typescript-eslint/ban-types

/Users/stephen.marshall/code/playbook/playbook/app/pb_kits/playbook/pb_icon_value/_icon_value.tsx
  15:10  error  Don't use `object` as a type. The `object` type is currently hard to use ([see this issue](https://github.com/microsoft/TypeScript/issues/21732)).
Consider using `Record<string, unknown>` instead, as it allows you to more easily inspect and use the keys  @typescript-eslint/ban-types

✖ 21 problems (21 errors, 0 warnings)
  15 errors and 0 warnings potentially fixable with the `--fix` option.

info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Checklist:

  • LABELS Add a label: enhancement, bug, improvement, new kit, deprecated, or breaking. See Changelog & Labels for details.
  • DEPLOY I have added the milano label to show I'm ready for a review.
  • TESTS I have added test coverage to my code.

@thestephenmarshall thestephenmarshall self-assigned this Jan 9, 2024
@thestephenmarshall thestephenmarshall requested a review from a team as a code owner January 9, 2024 17:43
@thestephenmarshall thestephenmarshall added milano 20 MAX - Deploy this PR to a review environment via Milano improvement This is used when your PR contains library upgrades or doc/site improvements. (USED IN CHANGELOG)) labels Jan 9, 2024
Copy link

🎉 Congratulations on creating an Alpha Version!

Your Alpha for Ruby Gems is 13.15.0.pre.alpha.PLAY10831873

Your Alpha for NPM is 13.15.0-alpha.PLAY10831873

@jasperfurniss jasperfurniss added the Ready for Release merged to master, ready for a versioned released label Jan 22, 2024
@jasperfurniss jasperfurniss added this pull request to the merge queue Jan 22, 2024
Merged via the queue into master with commit f53e0c0 Jan 22, 2024
8 checks passed
@jasperfurniss jasperfurniss deleted the PLAY-1083 branch January 22, 2024 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alpha improvement This is used when your PR contains library upgrades or doc/site improvements. (USED IN CHANGELOG)) milano 20 MAX - Deploy this PR to a review environment via Milano Ready for Release merged to master, ready for a versioned released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants