Skip to content

Commit

Permalink
feat: ✨ Implementa a tela de solicitacao
Browse files Browse the repository at this point in the history
  • Loading branch information
Wellington Braga committed Sep 21, 2024
1 parent edb2db5 commit ac83376
Show file tree
Hide file tree
Showing 80 changed files with 1,085 additions and 650 deletions.
29 changes: 27 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,26 @@
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:storybook/recommended",
"plugin:sonarjs/recommended-legacy",
"plugin:security/recommended-legacy",
"promise",
"plugin:prettier/recommended",
"plugin:eslint-config-love",
"airbnb"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["@typescript-eslint", "react"],
"plugins": [
"@typescript-eslint",
"react",
"sonarjs",
"simple-import-sort",
"import"
],
"rules": {
"quotes": ["warn", "double"],
"semi": ["warn", "always"],
Expand Down Expand Up @@ -48,6 +60,19 @@
"class-methods-use-this": "off",
"indent": "off",
"max-len": "off",
"import/no-extraneous-dependencies": ["off"]
"import/no-extraneous-dependencies": ["off"],
"promise/always-return": "error",
"promise/no-return-wrap": "error",
"promise/param-names": "error",
"promise/catch-or-return": "error",
"promise/no-native": "off",
"promise/no-nesting": "warn",
"promise/no-promise-in-callback": "warn",
"promise/no-callback-in-promise": "warn",
"promise/avoid-new": "warn",
"promise/no-new-statics": "error",
"promise/no-return-in-finally": "warn",
"promise/valid-params": "warn",
"promise/no-multiple-resolved": "error"
}
}
34 changes: 17 additions & 17 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
import { Preview } from "@storybook/react";
import { withThemeFromJSXProvider } from "@storybook/addon-themes";
import { darkTheme, lightTheme } from "../src/styles/theme/default/index.ts";
import { ThemeProvider } from "styled-components";
import { GlobalStyle } from "../src/styles/globals.tsx";
import {
INITIAL_VIEWPORTS,
MINIMAL_VIEWPORTS
MINIMAL_VIEWPORTS,
} from "@storybook/addon-viewport";
import { Preview } from "@storybook/react";
import { ThemeProvider } from "styled-components";
import { GlobalStyle } from "../src/styles/globals.tsx";
import { darkTheme, lightTheme } from "../src/styles/themes";

export const decorators = [
withThemeFromJSXProvider({
themes: {
light: lightTheme,
dark: darkTheme
dark: darkTheme,
},
defaultTheme: "light",
Provider: ThemeProvider,
GlobalStyles: GlobalStyle
})
GlobalStyles: GlobalStyle,
}),
];

const preview: Preview = {
Expand All @@ -26,15 +26,15 @@ const preview: Preview = {
viewport: {
viewports: {
...INITIAL_VIEWPORTS,
...MINIMAL_VIEWPORTS
}
...MINIMAL_VIEWPORTS,
},
},
actions: { argTypesRegex: "^on[A-Z].*" },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i
}
date: /Date$/i,
},
},
mockAddonConfigs: {
globalMockData: [
Expand All @@ -43,15 +43,15 @@ const preview: Preview = {
url: "http://localhost:0000",
method: "PUT",
status: 200,
response: {}
}
response: {},
},
],
ignoreQueryParams: true, // Whether or not to ignore query parameters globally
refreshStoryOnUpdate: true, // This property re-renders the story if there's any data changes
disableUsingOriginal: false, // This property disables the toggle (on/off) option to use the original endpoint
disable: true // This property disables the panel from all the stories
}
}
disable: true, // This property disables the panel from all the stories
},
},
};

export default preview;
5 changes: 4 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ const nextConfig = {
styledComponents: true,
removeConsole: process.env.NODE_ENV === "production",
},
generateBuildId: () => Promise.resolve(`build-id-${new Date()}`),
generateBuildId: () =>
Promise.resolve(
`build-id-${process.env.NEXT_PUBLIC_RELEASE}-${new Date()}`,
),
reactStrictMode: process.env.NODE_ENV === "development",
pageExtensions: ["mdx", "md", "jsx", "js", "tsx", "ts"],
experimental: {
Expand Down
7 changes: 2 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"dev": "next dev",
"build": "next build",
"lint": "next lint",
"test": "e2e:run",
"test": "jest",
"e2e:open": "playwright test --ui",
"e2e:run": "playwright test",
"e2e:debug": "playwright test --debug",
Expand Down Expand Up @@ -96,8 +96,6 @@
"eslint-config-next": "14.2.13",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.30.0",
"eslint-plugin-jsx-a11y": "^6.10.0",
"eslint-plugin-n": "^17.10.3",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-promise": "^7.1.0",
"eslint-plugin-react": "^7.36.1",
Expand All @@ -106,7 +104,6 @@
"eslint-plugin-simple-import-sort": "^12.1.1",
"eslint-plugin-sonarjs": "^2.0.2",
"eslint-plugin-storybook": "^0.8.0",
"eslint-plugin-tsdoc": "^0.3.0",
"lint-staged": "^15.2.10",
"postcss-styled-syntax": "^0.6.4",
"prettier": "3.3.3",
Expand All @@ -131,4 +128,4 @@
"url": "https://github.com/welllucky/services/issues"
},
"homepage": "https://github.com/welllucky/services#readme"
}
}
47 changes: 0 additions & 47 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ac83376

Please sign in to comment.