Skip to content

Commit 298be1a

Browse files
committed
fix(linting): Make the demo page dependencies lint
1 parent 3fc81ec commit 298be1a

File tree

4 files changed

+87
-80
lines changed

4 files changed

+87
-80
lines changed

demo/demo_app.js

+74-67
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
/* eslint no-console: 'off' */
12
import {React, render} from '../src/imports';
23
import {WSHeader, WSDropdown, WSNotification, WSDatePicker, WSInlineEdit, WSWeekPicker, WSTilesChart} from '../src/index';
3-
import {dashboardMockData} from './mockdata'
4+
import {dashboardMockData} from './mockdata';
45
import './index.scss';
56

67
// Used to enable React Developer Tools
@@ -12,7 +13,7 @@ render(
1213
appName="Demo Page"
1314
clientId="stups_abba-frontend-release_180e00be-2b66-4e44-ac95-37f10068c015"
1415
links={[
15-
{label: 'Link', href: '#LinkValue', onClick: (value) => console.log(value)},
16+
{label: 'Link', href: '#LinkValue', onClick: value => console.log(value)},
1617
{
1718
label: 'Link2',
1819
href: '#2222',
@@ -40,94 +41,100 @@ render(
4041
/>
4142
<div className="container">
4243
<br />
43-
<WSDatePicker onChange={(date) => console.log('New Date:', date)} value={Date.now()}/>
44+
<WSDatePicker onChange={date => console.log('New Date:', date)} value={Date.now()} />
4445
<br />
4546
<br />
46-
<WSWeekPicker onChange={({year, week}) => console.log('New week selected:', week)}/>
47+
<WSWeekPicker onChange={({week}) => console.log('New week selected:', week)} />
4748
<br />
4849
<br />
49-
<WSDropdown text="Multiple" type="button" width="500px" placeholder="Filter values.." filterable multiple items={[
50-
'New',
51-
'New From Template',
52-
'Open',
53-
'Test value 1',
54-
'Open Recent',
55-
'Save'
56-
]}/>
50+
<WSDropdown
51+
text="Multiple" type="button" width="500px" placeholder="Filter values.." filterable multiple items={[
52+
'New',
53+
'New From Template',
54+
'Open',
55+
'Test value 1',
56+
'Open Recent',
57+
'Save'
58+
]}
59+
/>
5760
<br />
58-
<WSDropdown text="Simple Wide" type="select" items={[
59-
'New',
60-
{
61-
label: 'New From Template',
62-
children: [
63-
'item 2.1',
64-
{
65-
label: 'item 2.2',
66-
children: [
67-
'item 2.3.1',
68-
'item 2.3.2',
69-
'item 2.3.3',
70-
'item 2.3.4'
71-
]
72-
}
73-
]
74-
},
75-
'Open',
76-
'Open Recent',
77-
'Save'
78-
]}/>
79-
<br/>
80-
<WSDropdown text="Simple Wide" type="select" filterable items={[
81-
'New',
82-
{
83-
label: 'New From Template',
84-
children: [
85-
'item 2.1',
86-
{
87-
label: 'item 2.2',
88-
children: [
89-
'item 2.3.1',
90-
'item 2.3.2',
91-
'item 2.3.3',
92-
'item 2.3.4'
93-
]
94-
}
95-
]
96-
},
97-
'Open',
98-
'Open Recent',
99-
'Save'
100-
]}/>
61+
<WSDropdown
62+
text="Simple Wide" type="select" items={[
63+
'New',
64+
{
65+
label: 'New From Template',
66+
children: [
67+
'item 2.1',
68+
{
69+
label: 'item 2.2',
70+
children: [
71+
'item 2.3.1',
72+
'item 2.3.2',
73+
'item 2.3.3',
74+
'item 2.3.4'
75+
]
76+
}
77+
]
78+
},
79+
'Open',
80+
'Open Recent',
81+
'Save'
82+
]}
83+
/>
84+
<br />
85+
<WSDropdown
86+
text="Simple Wide" type="select" filterable items={[
87+
'New',
88+
{
89+
label: 'New From Template',
90+
children: [
91+
'item 2.1',
92+
{
93+
label: 'item 2.2',
94+
children: [
95+
'item 2.3.1',
96+
'item 2.3.2',
97+
'item 2.3.3',
98+
'item 2.3.4'
99+
]
100+
}
101+
]
102+
},
103+
'Open',
104+
'Open Recent',
105+
'Save'
106+
]}
107+
/>
101108
<br />
102-
<WSDropdown text="Input" type="select" width="50%" placeholder="tasd" value="222" inputOnly/>
109+
<WSDropdown text="Input" type="select" width="50%" placeholder="tasd" value="222" inputOnly />
103110
<br />
104111
<WSNotification />
105112
<br />
106113
<div style={{width: '60%'}}>
107-
<WSInlineEdit text="Some text to check"/>
114+
<WSInlineEdit text="Some text to check" />
108115
</div>
109116
<br />
110117
<table style={{width: '50%'}}>
111118
<tbody>
112119
<tr>
113-
<td><WSInlineEdit text="Some text to check" onUpdate={text => console.log(text)}/></td>
114-
<td><WSInlineEdit text="Some text to check" onUpdate={text => console.log(text)}/></td>
115-
<td><WSInlineEdit text="Some text to check" onUpdate={text => console.log(text)}/></td>
116-
<td><WSInlineEdit text="Some text to check" onUpdate={text => console.log(text)}/></td>
120+
<td><WSInlineEdit text="Some text to check" onUpdate={text => console.log(text)} /></td>
121+
<td><WSInlineEdit text="Some text to check" onUpdate={text => console.log(text)} /></td>
122+
<td><WSInlineEdit text="Some text to check" onUpdate={text => console.log(text)} /></td>
123+
<td><WSInlineEdit text="Some text to check" onUpdate={text => console.log(text)} /></td>
117124
</tr>
118125
<tr>
119-
<td><WSInlineEdit text="Some text to check" onUpdate={text => console.log(text)}/></td>
120-
<td><WSInlineEdit text="Some text to check" onUpdate={text => console.log(text)}/></td>
121-
<td colSpan="2"><WSInlineEdit text="Some text to check" onUpdate={text => console.log(text)}/></td>
126+
<td><WSInlineEdit text="Some text to check" onUpdate={text => console.log(text)} /></td>
127+
<td><WSInlineEdit text="Some text to check" onUpdate={text => console.log(text)} /></td>
128+
<td colSpan="2"><WSInlineEdit text="Some text to check" onUpdate={text => console.log(text)} /></td>
122129
</tr>
123130
<tr>
124-
<td><WSInlineEdit text="Some text to check" onUpdate={text => console.log(text)}/></td>
125-
<td colSpan="3"><WSInlineEdit text="Some text to check" onUpdate={text => console.log(text)}/></td>
131+
<td><WSInlineEdit text="Some text to check" onUpdate={text => console.log(text)} /></td>
132+
<td colSpan="3"><WSInlineEdit text="Some text to check" onUpdate={text => console.log(text)} /></td>
126133
</tr>
127134
</tbody>
128135
</table>
129136
<br />
130-
<WSTilesChart title="Chart title" data={dashboardMockData.data} width={100} height={100}/>
137+
<WSTilesChart title="Chart title" data={dashboardMockData.data} width={100} height={100} />
131138
</div>
132139
</div>
133140
, document.querySelector('#app-holder'));

demo/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8">
5-
<title>Preact Demo</title>
5+
<title>Fabric Components Demo</title>
66
<script src="https://use.typekit.net/dpb6nzw.js"></script>
77
<script>try{Typekit.load({ async: true });}catch(e){}</script>
88
</head>

demo/mockdata.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ export const dashboardMockData = {
66
moreThan1Day: ['t', 'r', 'g', 'l', '5', '6']
77
}
88
}
9-
}
9+
};

webpack.config.preact.js

+11-11
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,31 @@ module.exports = {
44
entry: './demo/demo_app.js',
55
output: {
66
filename: 'bundle.js',
7-
path: path.resolve(__dirname, 'demo'),
7+
path: path.resolve(__dirname, 'demo')
88
},
99
module: {
1010
rules: [{
1111
test: /\.js$/,
1212
use: [{
1313
loader: 'babel-loader',
14-
options: { babelrc: true },
14+
options: {babelrc: true}
1515
}],
16-
exclude: [/node_modules/],
16+
exclude: [/node_modules/]
1717
},
1818
{
1919
test: /\.scss$/,
2020
use: [{
21-
loader: 'style-loader', // creates style nodes from JS strings
21+
loader: 'style-loader' // creates style nodes from JS strings
2222
}, {
23-
loader: 'css-loader', // translates CSS into CommonJS
23+
loader: 'css-loader' // translates CSS into CommonJS
2424
}, {
25-
loader: 'sass-loader', // compiles Sass to CSS
26-
}],
25+
loader: 'sass-loader' // compiles Sass to CSS
26+
}]
2727
},
2828
{
2929
test: /\.(png|woff|woff2|eot|ttf|svg)$/,
30-
loader: 'url-loader?limit=100000',
31-
}],
30+
loader: 'url-loader?limit=100000'
31+
}]
3232
},
3333
resolve: {
3434
alias: {
@@ -39,6 +39,6 @@ module.exports = {
3939
devServer: {
4040
contentBase: path.join(__dirname, 'demo'),
4141
compress: true,
42-
port: 8080,
43-
},
42+
port: 8080
43+
}
4444
};

0 commit comments

Comments
 (0)