-
Notifications
You must be signed in to change notification settings - Fork 55
2440/uni merge #2536
2440/uni merge #2536
Changes from all commits
83b70f3
aa97ec0
711b2ca
f3bcf64
ac962fb
ac2642f
06a8151
7aa0f50
8784a76
e68e1af
e5a1cb4
064a73c
5d97cbf
1b10c88
27843f6
1127e74
99f6818
850a20f
d54783a
8e3b2cb
fd81926
1efda07
5dec0cf
c3321ae
b77e7de
053000e
034b3e3
8a37c42
567fb01
b501974
8ac3ed1
6404ee6
8d822fd
e9407bb
6a4f067
b878d76
c9642c6
52128a2
5236065
2b69974
7f9c56b
bbdb5f3
3153db9
cee4b8c
ffe2bd3
ffe334c
8d54b01
1f89a46
c7633d9
8d145b9
9fb0d42
98e62b4
d1e0812
779625a
ce96873
b50d10c
5671700
47aff6f
b0265c0
a598a15
06536bc
043fb95
4a8f1d9
0d0ad63
ed24706
5bf2b81
7aecf5d
b6a47c7
c641cec
7055d60
ab8c1e3
c82b4fa
4b762ef
14c91f9
1c73719
e5be3eb
1b78cee
fc63707
800b5e0
e19e849
d060782
05b2711
7b90fe1
921310e
8064dd8
6e22389
ee32418
5c0246c
efa3d55
43931dd
a323a5c
1c278d5
2aa1e40
781e774
610f7d3
96a122d
c595ba9
bb27b7a
55b3782
2efc1fb
707abd0
3b3db6f
0ec2dd4
f95275d
290f4bc
c3d6727
5bc21be
58778b5
3acd993
37f273a
b5a72cd
440ac0c
8289670
c9c5969
fad55b8
da36e63
fd16053
6630825
e2c013a
108feac
c30eb89
75ecc58
b336868
5175cb6
ff16d3f
69ed701
02a7725
9cb19dd
1af34ae
88712b5
c5ea01c
92b7ca8
26275ca
b5d27e2
f47fcc9
b4aac94
8404c60
636abe3
01c467b
acbcd37
5fe89b9
a7fb7dc
897e7f4
b042d2b
59c5989
7de63ab
41ef961
82c3068
79bdc0c
da8884d
0f51991
b152b11
ae664dc
a60ea70
4c966ca
6a602cf
30e3018
1297aa5
8018d1b
7a3bb8d
0e709c2
90c59f3
48b3efc
de5f054
369f8c9
248bc07
a33187c
12bc595
8ac3b83
0d852b6
4fe35ea
dfad7b8
b2a30b9
27cdbd0
5b5e765
1e16ac8
26a44fb
c9faafe
ccdf1e7
83c99b8
c25d2b8
fc34912
ad08047
7900f01
90e5979
c28034e
05eb5cb
9eb497b
7b69be3
aa7a392
51fb0c5
414056f
6c186f9
279130c
14dbd8e
5bde1a7
e5152a0
b923ee0
16a8d10
facde30
91a4faf
5751a87
731e504
f535a5b
60c992c
301ba12
c42f092
f725733
a9e1950
7d3d65a
f2d0c3e
200a692
108af03
fffc31c
e0e11e9
eeec0b8
fbacd62
5c6543f
86cef40
74cea22
5c71889
1a1c978
725b998
53fb908
ebe4b63
bad2bdf
9a7e473
24504df
24dd3b8
151e7da
2083af6
a868eaa
0322a36
78e084e
b9fbd92
fb2e468
78c793f
ec405c0
d42ce84
2916b2e
052ece2
b671874
3d33f77
7d74d64
dcb5f3e
0fc1af9
7bb3f74
d2c7ded
573e360
625df57
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,21 +8,50 @@ | |
"jsx": true | ||
} | ||
}, | ||
"ignorePatterns": ["node_modules/**/*", ".github/*", "src/components/RateToggle/index.tsx"], | ||
"settings": { | ||
"react": { | ||
"version": "detect" | ||
} | ||
}, | ||
"ignorePatterns": [ | ||
"src/lib/", | ||
"__fixtures__", | ||
".github/*", | ||
"src/components/RateToggle/index.tsx", | ||
"src/types/v3", | ||
"src/abis/types", | ||
"src/locales/**/*.js", | ||
"src/locales/**/en-US.po", | ||
"src/state/data/generated.ts", | ||
"node_modules", | ||
"coverage", | ||
"build", | ||
"dist", | ||
".DS_Store", | ||
".env.local", | ||
".env.development.local", | ||
".env.test.local", | ||
".env.production.local", | ||
".idea/", | ||
".vscode/", | ||
"package-lock.json", | ||
"yarn.lock" | ||
], | ||
"extends": [ | ||
"react-app", | ||
"plugin:react/recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:react-hooks/recommended", | ||
"prettier/@typescript-eslint", | ||
"plugin:cypress/recommended", | ||
"plugin:prettier/recommended", | ||
"plugin:jsx-a11y/recommended" | ||
], | ||
"plugins": ["simple-import-sort", "unused-imports"], | ||
"rules": { | ||
"unused-imports/no-unused-imports": "error", | ||
// "simple-import-sort/imports": "error", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. they removed this or we did? tbh i always liked this rule but it can get noisy |
||
// "simple-import-sort/exports": "error", | ||
"@typescript-eslint/explicit-function-return-type": "off", | ||
"prettier/prettier": "error", | ||
"@typescript-eslint/no-explicit-any": "off", | ||
|
@@ -35,10 +64,6 @@ | |
"error", | ||
{ | ||
"paths": [ | ||
{ | ||
"name": "lodash", | ||
"message": "Please import from 'lodash/module' directly to support tree-shaking." | ||
}, | ||
{ | ||
"name": "ethers", | ||
"message": "Please import from '@ethersproject/module' directly to support tree-shaking." | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Widgets | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 14 | ||
registry-url: https://registry.npmjs.org | ||
|
||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
|
||
- uses: actions/cache@v2 | ||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
|
||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Build | ||
run: yarn widgets:build |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -145,10 +145,15 @@ jobs: | |
- name: Run linters | ||
uses: wearerequired/lint-action@v1 | ||
with: | ||
eslint: true | ||
prettier: true | ||
github_token: ${{ secrets.github_token }} | ||
eslint: true | ||
eslint_args: "-c .eslintrc.json ." | ||
auto_fix: ${{ github.event_name == 'pull_request' }} | ||
prettier: true | ||
|
||
- name: Run eslint | ||
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.owner.login != github.repository_owner }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. weird rule, don't run eslint if the owner is opening a PR? |
||
run: yarn eslint . | ||
|
||
build: | ||
name: Build apps | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
{ | ||
"staticPath": "public", | ||
"watchDirs": ["src"], | ||
"webpack": { | ||
"configPath": "./cosmos.webpack.config" | ||
} | ||
"configPath": "react-scripts/config/webpack.config", | ||
"overridePath": "cosmos.override.js" | ||
}, | ||
"port": 5001 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. so cosmos stuff willa lso be run on yarn start? seems bulkier. but ill give it a go later. just a note |
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* eslint-disable @typescript-eslint/no-var-requires */ | ||
const HtmlWebpackPlugin = require('html-webpack-plugin') | ||
const { DefinePlugin } = require('webpack') | ||
|
||
// Renders the cosmos fixtures in isolation, instead of using public/index.html. | ||
module.exports = (webpackConfig) => ({ | ||
...webpackConfig, | ||
plugins: webpackConfig.plugins.map((plugin) => { | ||
if (plugin instanceof HtmlWebpackPlugin) { | ||
return new HtmlWebpackPlugin({ | ||
templateContent: '<body></body>', | ||
}) | ||
} | ||
if (plugin instanceof DefinePlugin) { | ||
return new DefinePlugin({ | ||
...plugin.definitions, | ||
'process.env': { | ||
...plugin.definitions['process.env'], | ||
REACT_APP_IS_WIDGET: true, | ||
REACT_APP_LOCALES: '"../locales"', | ||
}, | ||
}) | ||
} | ||
return plugin | ||
}), | ||
}) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/// <reference types="cypress" /> | ||
/// <reference types="Cypress" /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ?? 🤔 |
||
|
||
declare namespace Cypress { | ||
interface Chainable<Subject> { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is already concerning, why is .env no longer ignored?