diff options
author | Markus Hatvan <markus_hatvan@aon.at> | 2021-07-30 10:54:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-30 14:24:54 +0530 |
commit | f4b4416ea52d564bc2dbe543a82084ed98843ccc (patch) | |
tree | 7ca6b23571c86458a6b799746c91a7191de02715 /packages/ui/src/badge | |
parent | 5.6.1-nightly.8 [skip ci] (diff) | |
download | ferdium-app-f4b4416ea52d564bc2dbe543a82084ed98843ccc.tar.gz ferdium-app-f4b4416ea52d564bc2dbe543a82084ed98843ccc.tar.zst ferdium-app-f4b4416ea52d564bc2dbe543a82084ed98843ccc.zip |
chore: migrate from tslint to @typescript-eslint (#1706)
- update .eslintrc to work for .js and .ts
- update devDependencies
- lint properly both root /src and nested /packages
- update webhint recommended setting for tsconfig.json to shrink output
- Manage all eslint rules from the repo root
- escape single quotes in scripts to please windows build
Co-authored-by: Vijay A <avijayr@protonmail.com>
Diffstat (limited to 'packages/ui/src/badge')
-rw-r--r-- | packages/ui/src/badge/ProBadge.tsx | 11 | ||||
-rw-r--r-- | packages/ui/src/badge/index.tsx | 9 |
2 files changed, 5 insertions, 15 deletions
diff --git a/packages/ui/src/badge/ProBadge.tsx b/packages/ui/src/badge/ProBadge.tsx index 73db47068..63d5d673a 100644 --- a/packages/ui/src/badge/ProBadge.tsx +++ b/packages/ui/src/badge/ProBadge.tsx | |||
@@ -3,7 +3,7 @@ import classnames from 'classnames'; | |||
3 | import React, { Component } from 'react'; | 3 | import React, { Component } from 'react'; |
4 | import injectStyle from 'react-jss'; | 4 | import injectStyle from 'react-jss'; |
5 | 5 | ||
6 | import { Badge, Icon } from '../'; | 6 | import { Badge, Icon } from '..'; |
7 | import { Theme } from '../../../theme'; | 7 | import { Theme } from '../../../theme'; |
8 | import { IWithStyle } from '../typings/generic'; | 8 | import { IWithStyle } from '../typings/generic'; |
9 | 9 | ||
@@ -34,13 +34,8 @@ const styles = (theme: Theme) => ({ | |||
34 | 34 | ||
35 | class ProBadgeComponent extends Component<IProps> { | 35 | class ProBadgeComponent extends Component<IProps> { |
36 | render() { | 36 | render() { |
37 | const { | 37 | const { classes, badgeClasses, iconClasses, inverted, className } = |
38 | classes, | 38 | this.props; |
39 | badgeClasses, | ||
40 | iconClasses, | ||
41 | inverted, | ||
42 | className, | ||
43 | } = this.props; | ||
44 | 39 | ||
45 | return ( | 40 | return ( |
46 | <Badge | 41 | <Badge |
diff --git a/packages/ui/src/badge/index.tsx b/packages/ui/src/badge/index.tsx index 0ba383673..5dd735879 100644 --- a/packages/ui/src/badge/index.tsx +++ b/packages/ui/src/badge/index.tsx | |||
@@ -13,7 +13,7 @@ interface IProps extends IWithStyle { | |||
13 | 13 | ||
14 | const badgeStyles = (theme: Theme) => { | 14 | const badgeStyles = (theme: Theme) => { |
15 | const styles = {}; | 15 | const styles = {}; |
16 | Object.keys(theme.styleTypes).map((style) => { | 16 | Object.keys(theme.styleTypes).map(style => { |
17 | Object.assign(styles, { | 17 | Object.assign(styles, { |
18 | [style]: { | 18 | [style]: { |
19 | background: theme.styleTypes[style].accent, | 19 | background: theme.styleTypes[style].accent, |
@@ -51,12 +51,7 @@ class BadgeComponent extends Component<IProps> { | |||
51 | }; | 51 | }; |
52 | 52 | ||
53 | render() { | 53 | render() { |
54 | const { | 54 | const { classes, children, type, className } = this.props; |
55 | classes, | ||
56 | children, | ||
57 | type, | ||
58 | className, | ||
59 | } = this.props; | ||
60 | 55 | ||
61 | return ( | 56 | return ( |
62 | <div | 57 | <div |