mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-11 13:45:25 +03:00
re-enable web linter
This commit is contained in:
parent
0f658c6327
commit
0f6c4304eb
6
.github/workflows/pull_request.yml
vendored
6
.github/workflows/pull_request.yml
vendored
@ -40,9 +40,9 @@ jobs:
|
|||||||
node-version: 16.x
|
node-version: 16.x
|
||||||
- run: npm install
|
- run: npm install
|
||||||
working-directory: ./web
|
working-directory: ./web
|
||||||
# - name: Lint
|
- name: Lint
|
||||||
# run: npm run lint
|
run: npm run lint
|
||||||
# working-directory: ./web
|
working-directory: ./web
|
||||||
|
|
||||||
web_test:
|
web_test:
|
||||||
name: Web - Test
|
name: Web - Test
|
||||||
|
|||||||
@ -45,6 +45,7 @@ function WsWithConfig({ children }: WsWithConfigType) {
|
|||||||
return <WsProvider>{children}</WsProvider>;
|
return <WsProvider>{children}</WsProvider>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// eslint-disable-next-line react-refresh/only-export-components
|
||||||
export function useApiHost() {
|
export function useApiHost() {
|
||||||
return baseUrl;
|
return baseUrl;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,6 +12,7 @@ type ColorScheme =
|
|||||||
| "theme-red"
|
| "theme-red"
|
||||||
| "theme-default";
|
| "theme-default";
|
||||||
|
|
||||||
|
// eslint-disable-next-line react-refresh/only-export-components
|
||||||
export const colorSchemes: ColorScheme[] = [
|
export const colorSchemes: ColorScheme[] = [
|
||||||
"theme-blue",
|
"theme-blue",
|
||||||
"theme-gold",
|
"theme-gold",
|
||||||
@ -25,6 +26,7 @@ export const colorSchemes: ColorScheme[] = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
// Helper function to generate friendly color scheme names
|
// Helper function to generate friendly color scheme names
|
||||||
|
// eslint-disable-next-line react-refresh/only-export-components
|
||||||
export const friendlyColorSchemeName = (className: string): string => {
|
export const friendlyColorSchemeName = (className: string): string => {
|
||||||
const words = className.split("-").slice(1); // Exclude the first word (e.g., 'theme')
|
const words = className.split("-").slice(1); // Exclude the first word (e.g., 'theme')
|
||||||
return words
|
return words
|
||||||
@ -136,6 +138,7 @@ export function ThemeProvider({
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// eslint-disable-next-line react-refresh/only-export-components
|
||||||
export const useTheme = () => {
|
export const useTheme = () => {
|
||||||
const context = useContext(ThemeProviderContext);
|
const context = useContext(ThemeProviderContext);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user