diff options
author | 2021-07-30 10:54:54 +0200 | |
---|---|---|
committer | 2021-07-30 14:24:54 +0530 | |
commit | f4b4416ea52d564bc2dbe543a82084ed98843ccc (patch) | |
tree | 7ca6b23571c86458a6b799746c91a7191de02715 /packages/ui/src/headline/index.tsx | |
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/headline/index.tsx')
-rw-r--r-- | packages/ui/src/headline/index.tsx | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/packages/ui/src/headline/index.tsx b/packages/ui/src/headline/index.tsx index 11b6125cd..bf3d4418c 100644 --- a/packages/ui/src/headline/index.tsx +++ b/packages/ui/src/headline/index.tsx | |||
@@ -37,13 +37,7 @@ const styles = (theme: Theme) => ({ | |||
37 | 37 | ||
38 | class HeadlineComponent extends Component<IProps> { | 38 | class HeadlineComponent extends Component<IProps> { |
39 | render() { | 39 | render() { |
40 | const { | 40 | const { classes, level, className, children, id } = this.props; |
41 | classes, | ||
42 | level, | ||
43 | className, | ||
44 | children, | ||
45 | id, | ||
46 | } = this.props; | ||
47 | 41 | ||
48 | return React.createElement( | 42 | return React.createElement( |
49 | `h${level}`, | 43 | `h${level}`, |
@@ -63,7 +57,12 @@ class HeadlineComponent extends Component<IProps> { | |||
63 | 57 | ||
64 | const Headline = injectStyle(styles)(HeadlineComponent); | 58 | const Headline = injectStyle(styles)(HeadlineComponent); |
65 | 59 | ||
66 | const createH = (level: number) => (props: Omit<IProps, 'classes' | 'theme'>) => <Headline level={level} {...props}>{props.children}</Headline>; | 60 | const createH = (level: number) => (props: Omit<IProps, 'classes' | 'theme'>) => |
61 | ( | ||
62 | <Headline level={level} {...props}> | ||
63 | {props.children} | ||
64 | </Headline> | ||
65 | ); | ||
67 | 66 | ||
68 | export const H1 = createH(1); | 67 | export const H1 = createH(1); |
69 | export const H2 = createH(2); | 68 | export const H2 = createH(2); |