Skip to content

Commit

Permalink
linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gdams committed Sep 18, 2023
1 parent 0499c42 commit 1d5931c
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 71 deletions.
24 changes: 24 additions & 0 deletions .github/linters/.markdown-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
###########################
###########################
## Markdown Linter rules ##
###########################
###########################

# Linter rules doc:
# - https://github.com/DavidAnson/markdownlint
#
# Note:
# To comment out a single error:
# <!-- markdownlint-disable -->
# any violations you want
# <!-- markdownlint-restore -->
#

###############
# Rules by id #
###############
MD013: false # Line length is usually not important and the 80 char limit is way too small anyway
MD026: false # Trailing punctuation in header
MD033: false # Inline HTML is important for multilines and checkboxes within markdown tables
MD034: false # no-bare-urls Bare URL used
MD029: false # Markdown automatically calculates the ordered list order
44 changes: 0 additions & 44 deletions 404.html

This file was deleted.

7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ The next gen download dashboard
## Local run/development steps

- start DownloadStats
```

```bash
npm install
npm start
```
Expand All @@ -17,9 +18,9 @@ npm start
## Deployment

- Compile and generate static files
```

```bash
npm run-script build
```

- serve ./dist

1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
Expand Down
52 changes: 28 additions & 24 deletions src/Graph/Trends.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@ import moment from 'moment'
import { Radio, Slider, Checkbox } from 'antd'
import './Trends.css'

const TypeFilter = ({ defaultValue, onChange, options }) => (
<div className='column'>
<div>Type</div>
<Radio.Group
name='type'
defaultValue={defaultValue}
onChange={onChange}
options={options}
/>
</div>
);

export default class Trends extends Component {
state = {
series: undefined,
Expand Down Expand Up @@ -146,18 +158,14 @@ export default class Trends extends Component {
onChange={e => { args.visible = e.target.checked; updateFunc() }}
/>
</div>
<div className='column'>
<div>Type</div>
<Radio.Group
name='type'
defaultValue={args.type}
onChange={e => { args.type = e.target.value; updateFunc() }}
options={[
{ label: 'Daily', value: 'daily' },
{ label: 'Total', value: 'total' }
]}
/>
</div>
<TypeFilter
defaultValue={args.type}
onChange={e => { args.type = e.target.value; updateFunc() }}
options={[
{ label: 'Daily', value: 'daily' },
{ label: 'Total', value: 'total' }
]}
/>
{this.renderFilters(args, updateFunc)}
</div>
)
Expand All @@ -166,18 +174,14 @@ export default class Trends extends Component {
renderMonthlyFilters (args, updateFunc) {
return (
<div className='filters'>
<div className='column'>
<div>Type</div>
<Radio.Group
name='type'
defaultValue={args.type}
onChange={e => { args.type = e.target.value; updateFunc() }}
options={[
{ label: 'Monthly', value: 'monthly' },
{ label: 'Total', value: 'total' }
]}
/>
</div>
<TypeFilter
defaultValue={args.type}
onChange={e => { args.type = e.target.value; updateFunc() }}
options={[
{ label: 'Monthly', value: 'monthly' },
{ label: 'Total', value: 'total' }
]}
/>
{this.renderFilters(args, updateFunc)}
</div>
)
Expand Down

0 comments on commit 1d5931c

Please sign in to comment.