mirror of
https://github.com/movie-web/native-app.git
synced 2025-09-13 16:33:26 +00:00
fix lint
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
import { useTheme } from "tamagui";
|
import { useTheme } from "tamagui";
|
||||||
|
|
||||||
interface SvgTabBarIconProps {
|
interface SvgTabBarIconProps {
|
||||||
@@ -12,7 +11,9 @@ export default function SvgTabBarIcon({
|
|||||||
children,
|
children,
|
||||||
}: SvgTabBarIconProps) {
|
}: SvgTabBarIconProps) {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const fillColor = focused ? theme.tabBarIconFocused.val : theme.tabBarIcon.val;
|
const fillColor = focused
|
||||||
|
? theme.tabBarIconFocused.val
|
||||||
|
: theme.tabBarIcon.val;
|
||||||
|
|
||||||
if (React.isValidElement(children)) {
|
if (React.isValidElement(children)) {
|
||||||
return React.cloneElement(children, { fillColor } as React.Attributes);
|
return React.cloneElement(children, { fillColor } as React.Attributes);
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
import { FontAwesome } from "@expo/vector-icons";
|
import { FontAwesome } from "@expo/vector-icons";
|
||||||
|
|
||||||
import { useTheme } from "tamagui";
|
import { useTheme } from "tamagui";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
@@ -8,6 +7,6 @@ type Props = {
|
|||||||
|
|
||||||
export default function TabBarIcon({ focused, ...rest }: Props) {
|
export default function TabBarIcon({ focused, ...rest }: Props) {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const color = focused ? theme.tabBarIconFocused.val : theme.tabBarIcon.val
|
const color = focused ? theme.tabBarIconFocused.val : theme.tabBarIcon.val;
|
||||||
return <FontAwesome color={color} size={24} {...rest} />;
|
return <FontAwesome color={color} size={24} {...rest} />;
|
||||||
}
|
}
|
||||||
|
File diff suppressed because one or more lines are too long
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"extends": "@movie-web/tsconfig/base.json",
|
"extends": "@movie-web/tsconfig/base.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json"
|
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json",
|
||||||
},
|
},
|
||||||
"include": ["*.ts", "src"],
|
"include": ["*.ts", "src"],
|
||||||
"exclude": ["node_modules"]
|
"exclude": ["node_modules"],
|
||||||
}
|
}
|
||||||
|
@@ -38,6 +38,7 @@ const config = {
|
|||||||
"**/.eslintrc.cjs",
|
"**/.eslintrc.cjs",
|
||||||
"dist",
|
"dist",
|
||||||
"pnpm-lock.yaml",
|
"pnpm-lock.yaml",
|
||||||
|
"tamagui-web.css",
|
||||||
],
|
],
|
||||||
reportUnusedDisableDirectives: true,
|
reportUnusedDisableDirectives: true,
|
||||||
};
|
};
|
||||||
|
@@ -3,9 +3,7 @@
|
|||||||
|
|
||||||
/** @type { PrettierConfig | SortImportsConfig } */
|
/** @type { PrettierConfig | SortImportsConfig } */
|
||||||
const config = {
|
const config = {
|
||||||
plugins: [
|
plugins: ["@ianvs/prettier-plugin-sort-imports"],
|
||||||
"@ianvs/prettier-plugin-sort-imports",
|
|
||||||
],
|
|
||||||
importOrder: [
|
importOrder: [
|
||||||
"<TYPES>",
|
"<TYPES>",
|
||||||
"^(react/(.*)$)|^(react$)|^(react-native(.*)$)",
|
"^(react/(.*)$)|^(react$)|^(react-native(.*)$)",
|
||||||
@@ -22,6 +20,7 @@ const config = {
|
|||||||
],
|
],
|
||||||
importOrderParserPlugins: ["typescript", "jsx", "decorators-legacy"],
|
importOrderParserPlugins: ["typescript", "jsx", "decorators-legacy"],
|
||||||
importOrderTypeScriptVersion: "4.4.0",
|
importOrderTypeScriptVersion: "4.4.0",
|
||||||
|
ignorePatterns: ["tamagui-web.css"],
|
||||||
};
|
};
|
||||||
|
|
||||||
export default config;
|
export default config;
|
||||||
|
Reference in New Issue
Block a user