Skip to content
This repository was archived by the owner on May 25, 2020. It is now read-only.

[WIP] Upgrade to Modus-React #214

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 0 additions & 40 deletions .babelrc

This file was deleted.

3 changes: 3 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SOURCE_DIR=src
BUILD_DIR=build
SOURCEMAPS=false
48 changes: 0 additions & 48 deletions .eslintrc

This file was deleted.

4 changes: 4 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
root: true
extends:
- '@modus/eslint-config-modus'

2 changes: 1 addition & 1 deletion app/components/AppError/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @flow

import React from 'react';
import styles from './style.scss';
import styles from './style.module.scss';

const AppError = () => (
<div className={styles.errorScreen}>
Expand Down
2 changes: 1 addition & 1 deletion app/components/Balance/BalanceRow.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @flow
import * as React from 'react';

import styles from './style.scss';
import styles from './style.module.scss';

type BalanceProps = {
children: React.Node,
Expand Down
2 changes: 1 addition & 1 deletion app/components/Balance/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import * as React from 'react';
import type { FormattedAmount } from 'utils/formatAmount';

import styles from './style.scss';
import styles from './style.module.scss';

type BalanceProps = {
title: string,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,4 @@
text-align: center;
}
}

}
2 changes: 1 addition & 1 deletion app/components/BudgetGridRow/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as React from 'react';
import formatAmount from 'utils/formatAmount';
import type { Transaction } from 'modules/transactions';
import type { Categories } from 'modules/categories';
import styles from './style.scss';
import styles from './style.module.scss';

type BudgetGridRowProps = {
transaction: Transaction,
Expand Down
2 changes: 1 addition & 1 deletion app/components/Chart/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import * as React from 'react';

import styles from './styles.scss';
import styles from './styles.module.scss';

type ChartProps = {
width: number,
Expand Down
3 changes: 3 additions & 0 deletions app/components/Chart/styles.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.mainSvg {
filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.16));
}
3 changes: 0 additions & 3 deletions app/components/Chart/styles.scss

This file was deleted.

2 changes: 1 addition & 1 deletion app/components/DonutChart/DonutChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type { TransactionSummary } from 'selectors/transactions';
import { arc, pie, scaleOrdinal, schemeCategory10 } from 'd3';
import { shuffle } from 'utils/array';
import Path from './Path';
import styles from './styles.scss';
import styles from './styles.module.scss';

const randomScheme = shuffle(schemeCategory10);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.donutChart {
display: flex;
height: 100%;
height: 100%;
justify-content: center;
align-content: flex-start;
flex-flow: wrap;
flex-flow: wrap;
}
2 changes: 1 addition & 1 deletion app/components/Header/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as React from 'react';
import OnIdle from '@modus/react-idle';
import NavLink from 'components/NavLink';
import Logo from './Logo';
import styles from './style.scss';
import styles from './style.module.scss';

const GitHubButton = React.lazy(() => import('components/GitHubButton' /* webpackChunkName: "gh-btn" */));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
border: 1px solid $lightgray;
text-decoration: none;

&:active, &.selected {
&:active,
&.selected {
color: $black;
text-decoration: underline;
box-shadow: 0 1px 4px 1px $darkgray;
Expand Down
2 changes: 1 addition & 1 deletion app/components/Legend/LegendItem.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @flow
import * as React from 'react';
import formatAmount from 'utils/formatAmount';
import styles from './styles.scss';
import styles from './styles.module.scss';

type LegendItemProps = {
color: string,
Expand Down
2 changes: 1 addition & 1 deletion app/components/Legend/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as React from 'react';
import cx from 'classnames';
import type { TransactionSummary } from 'selectors/transactions';
import LegendItem from './LegendItem';
import styles from './styles.scss';
import styles from './styles.module.scss';

type LegendType = {
data: TransactionSummary[],
Expand Down
2 changes: 1 addition & 1 deletion app/components/Loading/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// @flow
import * as React from 'react';
import s from './styles.scss';
import s from './styles.module.scss';

const Loading = () => (
<div className={s.timelineItem}>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
@-webkit-keyframes placeHolderShimmer {
0% {
background-position: -468px 0
background-position: -468px 0;
}
100% {
background-position: 468px 0
background-position: 468px 0;
}
}

@keyframes placeHolderShimmer {
0% {
background-position: -468px 0
background-position: -468px 0;
}
100% {
background-position: 468px 0
background-position: 468px 0;
}
}

Expand All @@ -27,7 +27,7 @@
min-width: 300px;
max-width: 472px;
width: 90vw;
box-shadow: 0 1px 4px rgba(0, 0, 0, .16);
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.16);
}

.animatedBackground {
Expand Down Expand Up @@ -136,4 +136,4 @@
.contentThirdEnd {
left: 300px;
top: 88px;
}
}
2 changes: 1 addition & 1 deletion app/components/ReportsPanel/ReportsTabbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import * as React from 'react';

import NavLink from 'components/NavLink';
import styles from './style.scss';
import styles from './style.module.scss';

const ReportsTabbar = () => (
<div className={styles.tabbar}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
border-right: $border;
}

&:active, &.selected {
&:active,
&.selected {
color: $white;
background-color: $mediumgray;
}
Expand Down
2 changes: 1 addition & 1 deletion app/components/StackedChart/StackedChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { max, scaleBand, scaleLinear, scaleOrdinal, schemeCategory10 } from 'd3'
import { shuffle } from 'utils/array';
import Bar from './Bar';
import Xaxis from './Xaxis';
import styles from './styles.scss';
import styles from './styles.module.scss';

const outflowScheme = shuffle([...schemeCategory10.slice(0, 2), ...schemeCategory10.slice(3)]);
const inflowScheme = ['#2ca02c']; // inflow always green
Expand Down
2 changes: 1 addition & 1 deletion app/components/StackedChart/Xaxis.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import * as React from 'react';
import type { TransactionSummary } from 'selectors/transactions';
import formatAmount from 'utils/formatAmount';
import styles from './styles.scss';
import styles from './styles.module.scss';

type XaxisProps = {
transform?: string,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
}

.xAxis {
font-size: 16px;
font-family: $font-default;
font-weight: bold;
text-anchor: middle;
font-size: 16px;
font-family: $font-default;
font-weight: bold;
text-anchor: middle;

.value {
font-size: 16px;
font-size: 16px;
}
}
2 changes: 1 addition & 1 deletion app/containers/App/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import ErrorBoundary from 'components/ErrorBoundary';
import Header from 'components/Header';
import Budget from 'routes/Budget';
import Reports from 'routes/Reports';
import './style.scss';
import './style.module.scss';

const AppError = React.lazy(() => import('components/AppError' /* webpackChunkName: "error-msg" */));

Expand Down
2 changes: 1 addition & 1 deletion app/containers/BudgetGrid/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { getCategories } from 'selectors/categories';
import EntryFormRow from 'containers/EntryFormRow';
import type { Transaction } from 'modules/transactions';
import BudgetGridRow from 'components/BudgetGridRow';
import styles from './style.scss';
import styles from './style.module.scss';

type BudgetGridProps = {
transactions: Transaction[],
Expand Down
2 changes: 1 addition & 1 deletion app/containers/EntryFormRow/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Form from 'components/Form';
import Field from 'components/Field';
import DataSelector from 'components/DataSelector';
import type { FormData } from 'components/Form';
import styles from './style.scss';
import styles from './style.module.scss';

type EntryFormRowProps = {
defaultCategoryId: string,
Expand Down
1 change: 1 addition & 0 deletions app/src
13 changes: 13 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// eslint-ignore-next-line
module.exports = {
presets: ['@modus/babel-preset-react', '@babel/preset-flow'],
plugins: ['@babel/plugin-syntax-dynamic-import', '@babel/plugin-proposal-object-rest-spread'],
env: {
development: {
plugins: ['react-hot-loader/babel'],
},
test: {
plugins: ['@babel/plugin-transform-modules-commonjs', 'dynamic-import-node'],
},
},
};
Loading