Skip to content

Commit

Permalink
Merge pull request #29 from 1Hive/feat/aragongh-785
Browse files Browse the repository at this point in the history
  • Loading branch information
0xGabi authored Apr 21, 2022
2 parents e8abd4c + 5646e59 commit 34b75ad
Show file tree
Hide file tree
Showing 40 changed files with 4,404 additions and 3,866 deletions.
16 changes: 13 additions & 3 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,19 @@
"@babel/preset-react"
],
"plugins": [
["styled-components", { "displayName": true }],
"@babel/plugin-transform-runtime",
"@babel/plugin-proposal-class-properties"
"babel-plugin-styled-components",
[
"@babel/plugin-transform-runtime",
{
"corejs": false,
"helpers": true,
"regenerator": true,
"absoluteRuntime": true
}
],
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-optional-chaining",
"@babel/plugin-proposal-nullish-coalescing-operator"
],
"env": {
"test": {
Expand Down
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
src/icons/components/*.js
src/icons/components/*.js
node_modules
26 changes: 21 additions & 5 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"root": true,
"env": {
"browser": true,
"es6": true,
"jest/globals": true
},
"extends": [
"plugin:import/recommended",
"plugin:promise/recommended",
"standard",
"standard-react",
"prettier/react",
"prettier",
"plugin:prettier/recommended"
],
"parser": "babel-eslint",
"parser": "@babel/eslint-parser",
"parserOptions": {
"requireConfigFile": false,
"ecmaFeatures": {
"experimentalObjectRestSpread": true,
"jsx": true
Expand All @@ -22,14 +22,30 @@
},
"plugins": ["prettier", "react", "react-hooks", "import", "promise", "jest"],
"rules": {
"no-unused-vars": "warn",
"no-loss-of-precision": "off",
"lines-between-class-members": "off",
"react/jsx-boolean-value": "off",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"import/no-unresolved": [
"error",
{ "ignore": ["^react(-dom)?$", "^styled-components$"] }
{
"ignore": [
"^react(-dom)?$",
"^styled-components$",
"^react-spring(/renderprops|/web)?$",
"^prop-types$",
"^dayjs$"
]
}
],
"linebreak-style": ["error", "unix"],
"curly": "error"
},
"settings": {
"react": {
"version": "17.0.2"
}
}
}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ yarn-error.log
/stats.html
# testing
coverage

.DS_Store
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run lint-staged
5 changes: 5 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run lint
npm run icons:check
11 changes: 7 additions & 4 deletions devbox/.babelrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
"plugins": [
"@babel/plugin-proposal-class-properties",
["styled-components", { "displayName": true }]
"presets": [
"@babel/preset-env",
"@babel/preset-react"
],
"presets": ["@babel/preset-env", "@babel/preset-react"]
"plugins": [
"babel-plugin-styled-components",
"@babel/plugin-proposal-class-properties"
]
}
2 changes: 0 additions & 2 deletions devbox/apps/Accordion.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import React from 'react'
import styled from 'styled-components'
import { Header, Accordion, GU } from '@1hive/1hive-ui'
import { Center } from '../components/Center'
import { createRandomInt } from '../utils'

const randomInt = createRandomInt()
Expand Down
2 changes: 1 addition & 1 deletion devbox/apps/AppBarTabs.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React, { useEffect, useState } from 'react'
import styled from 'styled-components'
import { AppBar, AppView, TabBar, NavigationBar } from '@1hive/1hive-ui'

const TABS = ['Home', 'Another screen']
Expand Down Expand Up @@ -38,6 +37,7 @@ const App = () => {

const items = tab === null ? ITEMS : ITEMS.slice(0, 1)


return (
<div
css={`
Expand Down
1 change: 0 additions & 1 deletion devbox/apps/Modal.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React, { useState } from 'react'
import styled from 'styled-components'
import { Button, Modal, IconPlus, IconMinus } from '@1hive/1hive-ui'
import Lorem from '../components/Lorem'

Expand Down
4 changes: 1 addition & 3 deletions devbox/apps/NavigationBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ import {
AppView,
ButtonIcon,
Checkbox,
Field,
IconMenu,
NavigationBar,
SidePanel,
Tag,
unselectable,
} from '@1hive/1hive-ui'
Expand Down Expand Up @@ -49,7 +47,7 @@ const MenuButton = () => (

const DemoBadge = () => (
<span css="margin-left: 20px">
<Tag mode="app">ANT</Tag>
<Tag mode="new">ANT</Tag>
</span>
)

Expand Down
20 changes: 12 additions & 8 deletions devbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,22 @@
},
"dependencies": {
"@1hive/1hive-ui": "file:..",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"dayjs": "^1.10.7",
"prop-types": "^15.8.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-is": "^17.0.2",
"react-spring": "8.0.27",
"seedrandom": "^3.0.5",
"styled-components": "^4.4.1"
"styled-components": "^5.3.3"
},
"devDependencies": {
"@babel/core": "^7.8.3",
"@babel/plugin-proposal-class-properties": "^7.8.3",
"@babel/preset-env": "^7.8.3",
"@babel/preset-react": "^7.8.3",
"@babel/core": "^7.16.7",
"@babel/plugin-proposal-class-properties": "^7.16.7",
"@babel/preset-env": "^7.16.7",
"@babel/preset-react": "^7.16.7",
"babel-loader": "^8.0.6",
"babel-plugin-styled-components": "^1.10.6",
"babel-plugin-styled-components": "^2.0.2",
"clean-webpack-plugin": "^3.0.0",
"file-loader": "^5.0.2",
"html-webpack-plugin": "^3.2.0",
Expand Down
Loading

0 comments on commit 34b75ad

Please sign in to comment.