-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PLAY-1083] Linter implementation: Kits F - J (#3021)
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](microsoft/TypeScript#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](microsoft/TypeScript#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](microsoft/TypeScript#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](microsoft/TypeScript#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: - [x] **LABELS** Add a label: `enhancement`, `bug`, `improvement`, `new kit`, `deprecated`, or `breaking`. See [Changelog & Labels](https://github.com/powerhome/playbook/wiki/Changelog-&-Labels) for details. - [x] **DEPLOY** I have added the `milano` label to show I'm ready for a review. - [x] **TESTS** I have added test coverage to my code.
- Loading branch information
1 parent
6a8f9ff
commit f53e0c0
Showing
11 changed files
with
87 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export type GenericObject = Record<string, unknown> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
export * from './base' | ||
export * from './colors' | ||
export * from './data' | ||
export * from './display' | ||
export * from './sizes' | ||
export * from './spacing' |