forked from pancakeswap/pancake-frontend
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Monorepo turbo part 1 (pancakeswap#3360)
### What changes Only add uikit and eslint into packages. Use tsconfig path to map uikit, consume it by src. FE code as workspace root now. Can be changed follow by pancakeswap#3359 later ### Note Turbo doesn't do anything at this moment. Keep Lerna only use for packages version and changelog
- Loading branch information
Showing
516 changed files
with
35,115 additions
and
348 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"packages": ["packages/*"], | ||
"version": "independent", | ||
"npmClient": "yarn", | ||
"workspaces": true, | ||
"ignoreChanges": ["**/__tests__/**", "**/*.md", "**/.storybook/**"], | ||
"command": { | ||
"version": { | ||
"conventionalCommits": true, | ||
"message": "chore(release): Publish" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"semi": true, | ||
"printWidth": 120 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Change Log | ||
|
||
All notable changes to this project will be documented in this file. | ||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. | ||
|
||
# [1.2.0](https://github.com/pancakeswap/pancake-toolkit/tree/master/packages/eslint-config-pancake/compare/@pancakeswap/[email protected]...@pancakeswap/[email protected]) (2021-07-09) | ||
|
||
|
||
### Features | ||
|
||
* Migrate ad-hoc FE rules to eslint-config ([#187](https://github.com/pancakeswap/pancake-toolkit/tree/master/packages/eslint-config-pancake/issues/187)) ([75baf17](https://github.com/pancakeswap/pancake-toolkit/tree/master/packages/eslint-config-pancake/commit/75baf175c8316fdfc549bc99e2bc38d65b18c5b6)) | ||
|
||
|
||
|
||
|
||
|
||
# 1.1.0 (2021-05-07) | ||
|
||
|
||
### Features | ||
|
||
* Add eslint package ([#7](https://github.com/pancakeswap/pancake-toolkit/tree/master/packages/eslint-config-pancake/issues/7)) ([0e0454e](https://github.com/pancakeswap/pancake-toolkit/tree/master/packages/eslint-config-pancake/commit/0e0454eb9a63e976934956dc5c66fbef2ce2017a)) | ||
|
||
|
||
|
||
|
||
|
||
## [1.0.1](https://github.com/pancakeswap/pancake-toolkit/tree/master/packages/eslint-config-pancake/compare/@pancakeswap-libs/[email protected]...@pancakeswap-libs/[email protected]) (2021-03-19) | ||
|
||
|
||
### Features | ||
|
||
* Add eslint package ([#7](https://github.com/pancakeswap/pancake-toolkit/tree/master/packages/eslint-config-pancake/issues/7)) ([0e0454e](https://github.com/pancakeswap/pancake-toolkit/tree/master/packages/eslint-config-pancake/commit/0e0454eb9a63e976934956dc5c66fbef2ce2017a)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# eslint-config-pancake | ||
|
||
Pancake Eslint config with: | ||
|
||
- Airbnb config | ||
- Typescript | ||
- Prettier | ||
|
||
## Usage | ||
|
||
``` | ||
npx install-peerdeps --dev @pancakeswap/eslint-config-pancake | ||
``` | ||
|
||
Add `"extends": "@pancakeswap/eslint-config-pancake"` to your eslint config file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
module.exports = { | ||
root: true, | ||
parser: "@typescript-eslint/parser", | ||
parserOptions: { | ||
ecmaVersion: 2017, | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
}, | ||
env: { | ||
es6: true, | ||
browser: true, | ||
}, | ||
settings: { | ||
"import/resolver": { | ||
node: { | ||
extensions: [".js", ".ts", ".jsx", ".tsx"], | ||
}, | ||
}, | ||
"import/extensions": [".js", ".ts", ".jsx", ".tsx"], | ||
}, | ||
extends: [ | ||
"airbnb", | ||
"airbnb/hooks", | ||
"prettier", | ||
"prettier/react", | ||
"prettier/@typescript-eslint", | ||
"plugin:@typescript-eslint/recommended", | ||
], | ||
rules: { | ||
// Typescript | ||
"@typescript-eslint/no-unused-vars": "warn", | ||
"no-use-before-define": "off", | ||
"@typescript-eslint/no-use-before-define": ["warn"], | ||
"no-shadow": "off", | ||
"@typescript-eslint/no-shadow": ["error"], | ||
"no-console": ["warn", { allow: ["info", "warn", "error"] }], | ||
"no-plusplus": 0, | ||
"prefer-destructuring": ["warn", { object: true, array: false }], | ||
"no-underscore-dangle": 0, | ||
// React | ||
"react/jsx-filename-extension": ["error", { extensions: [".tsx"] }], | ||
"react/prop-types": 0, | ||
"react/jsx-props-no-spreading": 0, | ||
"react/no-multi-comp": 0, | ||
"import/extensions": [ | ||
"error", | ||
"ignorePackages", | ||
{ | ||
js: "never", | ||
mjs: "never", | ||
jsx: "never", | ||
ts: "never", | ||
tsx: "never", | ||
}, | ||
], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"name": "@pancakeswap/eslint-config-pancake", | ||
"version": "1.2.0", | ||
"description": "Eslint config for PancakeSwap", | ||
"main": "lib/index.js", | ||
"files": [ | ||
"lib" | ||
], | ||
"repository": "https://github.com/pancakeswap/pancake-toolkit/tree/master/packages/eslint-config-pancake", | ||
"license": "MIT", | ||
"author": "RabbitDoge", | ||
"private": false, | ||
"dependencies": { | ||
"@typescript-eslint/eslint-plugin": "^4.7.0", | ||
"@typescript-eslint/parser": "^4.7.0", | ||
"eslint-config-airbnb": "^18.2.1", | ||
"eslint-config-prettier": "^6.15.0", | ||
"eslint-plugin-import": "^2.22.1", | ||
"eslint-plugin-jsx-a11y": "^6.4.1", | ||
"eslint-plugin-react": "^7.21.5", | ||
"eslint-plugin-react-hooks": "^4.0.0" | ||
}, | ||
"peerDependencies": { | ||
"eslint": "^7.2.0", | ||
"prettier": "^2.1.2" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module.exports = { | ||
stories: ["../src/**/*.stories.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"], | ||
addons: [ | ||
{ | ||
name: "@storybook/addon-essentials", | ||
options: { | ||
backgrounds: false, | ||
}, | ||
}, | ||
"@storybook/addon-links", | ||
"@storybook/addon-a11y", | ||
"themeprovider-storybook/register", | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<link href="https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;600&display=swap" rel="stylesheet"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import React from "react"; | ||
import { withThemesProvider } from "themeprovider-storybook"; | ||
import light from "../src/theme/light"; | ||
import dark from "../src/theme/dark"; | ||
import ResetCSS from "../src/ResetCSS"; | ||
import { ModalProvider } from "../src/widgets/Modal"; | ||
|
||
const globalDecorator = (StoryFn) => ( | ||
<ModalProvider> | ||
<ResetCSS /> | ||
<StoryFn /> | ||
</ModalProvider> | ||
); | ||
|
||
export const parameters = { | ||
actions: { argTypesRegex: "^on[A-Z].*" }, | ||
layout: "fullscreen", | ||
}; | ||
|
||
const themes = [ | ||
{ | ||
name: "Light", | ||
backgroundColor: light.colors.background, | ||
...light, | ||
}, | ||
{ | ||
name: "Dark", | ||
backgroundColor: dark.colors.background, | ||
...dark, | ||
}, | ||
]; | ||
|
||
export const decorators = [globalDecorator, withThemesProvider(themes)]; |
Oops, something went wrong.