Merge pull request #283 from GRA0007/chore/eslint
Specify additional ESlint rules
This commit is contained in:
commit
d9e0094856
1
.github/workflows/deploy_api.yml
vendored
1
.github/workflows/deploy_api.yml
vendored
|
|
@ -12,6 +12,7 @@ jobs:
|
|||
build-and-push:
|
||||
name: Deploy to Fly.io
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'GRA0007/crab.fit'
|
||||
|
||||
defaults:
|
||||
run:
|
||||
|
|
|
|||
1
.github/workflows/deploy_frontend.yml
vendored
1
.github/workflows/deploy_frontend.yml
vendored
|
|
@ -16,6 +16,7 @@ jobs:
|
|||
deploy:
|
||||
name: Deploy to Vercel
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'GRA0007/crab.fit'
|
||||
|
||||
defaults:
|
||||
run:
|
||||
|
|
|
|||
|
|
@ -10,7 +10,16 @@
|
|||
"react-hooks/exhaustive-deps": "off",
|
||||
"space-infix-ops": "warn",
|
||||
"comma-spacing": "warn",
|
||||
"react-hooks/rules-of-hooks": "off"
|
||||
"react-hooks/rules-of-hooks": "off",
|
||||
"eqeqeq": "error",
|
||||
"no-return-await": "warn",
|
||||
"no-var": "error",
|
||||
"prefer-const": "warn",
|
||||
"eol-last": ["warn", "always"],
|
||||
"indent": ["warn", 2],
|
||||
"semi": ["error", "never"],
|
||||
"arrow-parens": ["error", "as-needed"],
|
||||
"jsx-quotes": ["warn", "prefer-double"]
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -22,12 +22,10 @@ const RecentEvents = ({ eventId, times, onImport }: RecentEventsProps) => {
|
|||
const { t, i18n } = useTranslation('event')
|
||||
|
||||
const allRecents = useStore(useRecentsStore, state => state.recents)
|
||||
const recents = useMemo(() =>
|
||||
allRecents
|
||||
const recents = useMemo(() => allRecents
|
||||
?.filter(hasAvailability)
|
||||
.filter(e => e.id !== eventId && e.user.availability.some(a => times.includes(a))) ?? [],
|
||||
[allRecents]
|
||||
)
|
||||
[allRecents])
|
||||
|
||||
const [isOpen, setIsOpen] = useState(false)
|
||||
const [selected, setSelected] = useState<string>()
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ const Month = ({ value, onChange }: MonthProps) => {
|
|||
</div>
|
||||
|
||||
{hasPastDates && <div className={styles.warningLabel}>
|
||||
<AlertTriangle size='1.2em' />
|
||||
<AlertTriangle size="1.2em" />
|
||||
<span>{t('form.dates.warnings.date_in_past')}</span>
|
||||
</div>}
|
||||
</>
|
||||
|
|
|
|||
|
|
@ -43,6 +43,6 @@ const ToggleField = <TValue extends string>({
|
|||
</div>
|
||||
)}
|
||||
</div>
|
||||
</Wrapper>
|
||||
</Wrapper>
|
||||
|
||||
export default ToggleField
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@
|
|||
"select_all": "Select all",
|
||||
"select_none": "Select none",
|
||||
"select_invert": "Invert selection",
|
||||
|
||||
"google_cal": "Sync with Google Calendar",
|
||||
"outlook_cal": "Sync with Outlook Calendar",
|
||||
"integration": {
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ export const detectBrowser = () => {
|
|||
const isChrome = !!window.chrome
|
||||
|
||||
// Edge (based on chromium) detection
|
||||
// eslint-disable-next-line eqeqeq
|
||||
const isEdgeChromium = isChrome && (navigator.userAgent.indexOf("Edg") != -1)
|
||||
|
||||
if (isEdgeChromium) return 'edge_chromium'
|
||||
|
|
|
|||
Loading…
Reference in a new issue