mirror of
https://git.netzspielplatz.de/docker-multiarch/openwrt-firmware-selector.git
synced 2025-11-08 22:09:25 +00:00
Add ESLint to maintain code style. Add pre-commit hook to lint prior.
ESLint is used with the standard react plugin. It detects all kinds of issues ranging from misspells, indentation, variable-naming, etc. A pre-commit hook is added to git. Prior commiting, ESlint will run to validate that everything is OK and the user will have the option to fix it. Signed-off-by: Sudhanshu Gautam <me@sudhanshug.com>
This commit is contained in:
parent
d30cf925b1
commit
9475f4092a
13 changed files with 1116 additions and 1036 deletions
|
|
@ -39,46 +39,46 @@ export default function Header() {
|
|||
const id = open ? 'simple-popper' : undefined;
|
||||
|
||||
return (
|
||||
<AppBar position="static">
|
||||
<Toolbar>
|
||||
<Typography edge="start" variant="h6">{t(
|
||||
'OpenWrt Firmware Selector Wizard')}</Typography>
|
||||
<div style={{flexGrow: 1}} />
|
||||
<Button aria-describedby={id} color="secondary" variant="contained"
|
||||
onClick={openChangeLanguagePopper} href="#">
|
||||
{t('Change Language')}
|
||||
<LanguageIcon/>
|
||||
</Button>
|
||||
<Popper
|
||||
id={id}
|
||||
open={open}
|
||||
anchorEl={anchorEl}
|
||||
transition
|
||||
disablePortal={true}
|
||||
>
|
||||
{({TransitionProps}) => (
|
||||
<Fade {...TransitionProps} timeout={350}>
|
||||
<Paper className="language-selector-popper">
|
||||
<FormControl component="fieldset">
|
||||
<FormLabel component="legend">Change Language</FormLabel>
|
||||
<br/>
|
||||
<RadioGroup
|
||||
aria-label="Language"
|
||||
name="language"
|
||||
value={value}
|
||||
onChange={changeLanguage}
|
||||
>
|
||||
<FormControlLabel value="en" control={<Radio/>}
|
||||
label={t('English')}/>
|
||||
<FormControlLabel value="de" control={<Radio/>}
|
||||
label={t('German')}/>
|
||||
</RadioGroup>
|
||||
</FormControl>
|
||||
</Paper>
|
||||
</Fade>
|
||||
)}
|
||||
</Popper>
|
||||
</Toolbar>
|
||||
</AppBar>
|
||||
<AppBar position="static">
|
||||
<Toolbar>
|
||||
<Typography edge="start" variant="h6">{t(
|
||||
'OpenWrt Firmware Selector Wizard')}</Typography>
|
||||
<div style={{flexGrow: 1}} />
|
||||
<Button aria-describedby={id} color="secondary" variant="contained"
|
||||
onClick={openChangeLanguagePopper} href="#">
|
||||
{t('Change Language')}
|
||||
<LanguageIcon/>
|
||||
</Button>
|
||||
<Popper
|
||||
id={id}
|
||||
open={open}
|
||||
anchorEl={anchorEl}
|
||||
transition
|
||||
disablePortal={true}
|
||||
>
|
||||
{({TransitionProps}) => (
|
||||
<Fade {...TransitionProps} timeout={350}>
|
||||
<Paper className="language-selector-popper">
|
||||
<FormControl component="fieldset">
|
||||
<FormLabel component="legend">Change Language</FormLabel>
|
||||
<br/>
|
||||
<RadioGroup
|
||||
aria-label="Language"
|
||||
name="language"
|
||||
value={value}
|
||||
onChange={changeLanguage}
|
||||
>
|
||||
<FormControlLabel value="en" control={<Radio/>}
|
||||
label={t('English')}/>
|
||||
<FormControlLabel value="de" control={<Radio/>}
|
||||
label={t('German')}/>
|
||||
</RadioGroup>
|
||||
</FormControl>
|
||||
</Paper>
|
||||
</Fade>
|
||||
)}
|
||||
</Popper>
|
||||
</Toolbar>
|
||||
</AppBar>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue