Skip to content

Commit c80eea1

Browse files
committed
Run prettier and separate dependencies
1 parent b349f63 commit c80eea1

File tree

160 files changed

+3001
-2395
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

160 files changed

+3001
-2395
lines changed

.storybook/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const config: StorybookConfig = {
1515
getAbsolutePath("@storybook/addon-docs"),
1616
getAbsolutePath("@storybook/addon-onboarding"),
1717
getAbsolutePath("@storybook/addon-a11y"),
18-
getAbsolutePath('@storybook/addon-themes'),
18+
getAbsolutePath("@storybook/addon-themes"),
1919
],
2020
framework: {
2121
name: getAbsolutePath("@storybook/react-vite"),

.storybook/manager.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
import { addons } from 'storybook/manager-api';
2-
import { create } from 'storybook/theming';
1+
import { addons } from "storybook/manager-api";
2+
import { create } from "storybook/theming";
33

44
addons.setConfig({
55
theme: create({
6-
base: 'light',
7-
brandTitle: '<span id="fur-title">frappe-ui-react</span> <span id="fur-version">(v1.0.0-beta.0)</span>', // update version as per package.json
6+
base: "light",
7+
brandTitle:
8+
'<span id="fur-title">frappe-ui-react</span> <span id="fur-version">(v1.0.0-beta.0)</span>', // update version as per package.json
89
brandUrl: undefined, // disables link on the title
9-
brandImage: undefined
10+
brandImage: undefined,
1011
}),
11-
});
12+
});

.storybook/modeDecorator.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import { withThemeByClassName } from '@storybook/addon-themes';
1+
import { withThemeByClassName } from "@storybook/addon-themes";
22

33
export const decorators = [
44
withThemeByClassName({
55
themes: {
6-
light: '', // Class name for light mode
7-
dark: 'dark', // Class name for dark mode
6+
light: "", // Class name for light mode
7+
dark: "dark", // Class name for dark mode
88
},
9-
defaultTheme: 'light', // Default theme
9+
defaultTheme: "light", // Default theme
1010
}),
1111
];

.storybook/preview.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import type { Preview } from "@storybook/react-vite";
2-
import {decorators} from "./modeDecorator";
32
import "@rtcamp/frappe-ui-react/theme.css";
43

4+
import { decorators } from "./modeDecorator";
5+
56
const preview: Preview = {
67
decorators,
78
parameters: {

.storybook/vitest.setup.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import * as a11yAddonAnnotations from "@storybook/addon-a11y/preview";
2-
import { setProjectAnnotations } from '@storybook/react-vite';
3-
import * as projectAnnotations from './preview';
2+
import { setProjectAnnotations } from "@storybook/react-vite";
3+
4+
import * as projectAnnotations from "./preview";
45

56
// This is an important step to apply the right configuration when testing your stories.
67
// More info at: https://storybook.js.org/docs/api/portable-stories/portable-stories-vitest#setprojectannotations
7-
setProjectAnnotations([a11yAddonAnnotations, projectAnnotations]);
8+
setProjectAnnotations([a11yAddonAnnotations, projectAnnotations]);

babel.config.cjs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
module.exports = function (api) {
2-
const isProduction = api.env('production');
2+
const isProduction = api.env("production");
33

44
return {
55
presets: [
6-
['@babel/preset-env'],
6+
["@babel/preset-env"],
77
[
8-
'@babel/preset-react',
8+
"@babel/preset-react",
99
{
1010
development: !isProduction,
11-
runtime: 'automatic',
11+
runtime: "automatic",
1212
},
1313
],
14-
'@babel/preset-typescript',
14+
"@babel/preset-typescript",
1515
],
1616
plugins: [
17-
['@babel/plugin-transform-react-jsx', {runtime: 'automatic'}],
18-
['babel-plugin-styled-components'],
17+
["@babel/plugin-transform-react-jsx", { runtime: "automatic" }],
18+
["babel-plugin-styled-components"],
1919
],
2020
sourceMaps: true,
2121
};

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
"publish:remote": "npm run publish:remote -w @rtcamp/frappe-ui-react",
2323
"build:publish:remote": "npm run build && npm run publish:remote",
2424
"local-registry:start": "bash ./bin/setup-local-registry.sh",
25-
"local-registry:stop": "bash ./bin/stop-local-registry.sh"
25+
"local-registry:stop": "bash ./bin/stop-local-registry.sh",
26+
"pretty": "prettier --write \"./**/*.{js,jsx,mjs,cjs,ts,tsx,json}\""
2627
},
2728
"devDependencies": {
2829
"@babel/plugin-transform-react-jsx": "^7.22.5",

packages/frappe-ui-react/src/@types/index.d.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,18 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
declare module '*.svg' {
16+
declare module "*.svg" {
1717
// eslint-disable-next-line @typescript-eslint/no-require-imports
18-
import React = require('react');
18+
import React = require("react");
1919
const ReactComponent: React.FC<React.SVGProps<SVGSVGElement>>;
2020
export default ReactComponent;
2121
}
2222

23-
declare module '*.svg?react' {
24-
import * as React from 'react';
23+
declare module "*.svg?react" {
24+
import * as React from "react";
2525

2626
const ReactComponent: React.FunctionComponent<
27-
React.ComponentProps<'svg'> & {
27+
React.ComponentProps<"svg"> & {
2828
title?: string;
2929
titleId?: string;
3030
desc?: string;
@@ -43,7 +43,7 @@ type BulletListItem = {
4343
pubDate?: string;
4444
};
4545

46-
declare module 'entities/decode' {
46+
declare module "entities/decode" {
4747
// eslint-disable-next-line @typescript-eslint/no-explicit-any
4848
type EntityDecoder = any;
4949
export { EntityDecoder };
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
export type SizeTypes = {sm: string; md: string};
1+
export type SizeTypes = { sm: string; md: string };
22

33
export type TextInputTypes =
4-
| 'date'
5-
| 'datetime-local'
6-
| 'email'
7-
| 'file'
8-
| 'month'
9-
| 'number'
10-
| 'password'
11-
| 'search'
12-
| 'tel'
13-
| 'text'
14-
| 'time'
15-
| 'url'
16-
| 'week'
17-
| 'range';
4+
| "date"
5+
| "datetime-local"
6+
| "email"
7+
| "file"
8+
| "month"
9+
| "number"
10+
| "password"
11+
| "search"
12+
| "tel"
13+
| "text"
14+
| "time"
15+
| "url"
16+
| "week"
17+
| "range";

packages/frappe-ui-react/src/components/alert/alert.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import React, { useMemo } from "react";
2+
23
import type { AlertProps } from "./types";
34

45
const Alert: React.FC<AlertProps> = ({
@@ -11,7 +12,7 @@ const Alert: React.FC<AlertProps> = ({
1112
const classes = useMemo(() => {
1213
const typeClasses: { [type: string]: string } = {
1314
warning: "text-ink-gray-7 bg-surface-blue-1",
14-
}
15+
};
1516
return typeClasses[type] || typeClasses["warning"];
1617
}, [type]);
1718

0 commit comments

Comments
 (0)