Skip to content

Commit 53397fa

Browse files
committed
fix linting with vscode settings.json change
1 parent 67195b5 commit 53397fa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+635
-648
lines changed

.vscode/settings.json

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,18 @@
11
{
2-
"editor.formatOnSave": true,
3-
"eslint.autoFixOnSave": true,
4-
"eslint.validate": ["javascript", { "language": "typescript", "autoFix": true }],
5-
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
6-
"files.exclude": {
7-
"build": false // set this to true to hide the "out" folder with the compiled JS files
8-
},
9-
"search.exclude": {
10-
"build": true // set this to false to include "out" folder in search results
11-
},
12-
// styles
13-
"workbench.colorCustomizations": {
14-
"activityBar.background": "#000000",
15-
"titleBar.activeBackground": "#000000",
16-
"titleBar.activeForeground": "#FFFFFF"
17-
},
18-
"cSpell.ignoreWords": ["camelcase"],
19-
"files.exclude": {
20-
".vscode-test/**": true,
21-
"*.vsix": true
22-
}
2+
"editor.formatOnSave": true,
3+
"editor.codeActionsOnSave": {
4+
"source.organizeImports": true,
5+
"source.fixAll": true
6+
},
7+
"files.exclude": {
8+
"build": false, // set this to true to hide the "out" folder with the compiled JS files
9+
".vscode-test/**": true,
10+
"*.vsix": true
11+
},
12+
// styles
13+
"workbench.colorCustomizations": {
14+
"activityBar.background": "#000000",
15+
"titleBar.activeBackground": "#000000",
16+
"titleBar.activeForeground": "#FFFFFF"
17+
}
2318
}

web-app/.storybook/addons.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
import '@storybook/addon-actions/register'
22
import '@storybook/addon-knobs/register'
3-
import '@storybook/addon-links/register'
3+
import '@storybook/addon-links/register'

web-app/.storybook/config.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
1-
import {configure, addParameters} from '@storybook/react'
1+
import { configure } from '@storybook/react'
22
import '../src/styles/index.css'
33

44
// setup acquireVsCodeApi mock
55
// @ts-ignore
66
global.acquireVsCodeApi = () => ({
7-
postMessage(event: string) {
8-
console.log('postMessage', event)
9-
}
7+
postMessage(event: string) {
8+
console.log('postMessage', event)
9+
},
1010
})
1111

12-
1312
// automatically import all files ending in *.stories.tsx
1413
const req = require.context('../stories', true, /\.stories\.tsx$/)
1514

1615
function loadStories() {
17-
req.keys().forEach(req)
16+
req.keys().forEach(req)
1817
}
1918

2019
configure(loadStories, module)
21-

web-app/.vscode/settings.json

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,19 @@
1-
{}
1+
{
2+
"editor.formatOnSave": true,
3+
"editor.codeActionsOnSave": {
4+
"source.organizeImports": true,
5+
"source.fixAll": true
6+
},
7+
"files.exclude": {
8+
"build": false, // set this to true to hide the "out" folder with the compiled JS files
9+
".vscode-test/**": true,
10+
"*.vsix": true
11+
},
12+
// styles
13+
"workbench.colorCustomizations": {
14+
"activityBar.background": "#000000",
15+
"titleBar.activeBackground": "#000000",
16+
"titleBar.activeForeground": "#FFFFFF"
17+
}
18+
}
19+

web-app/src/App.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
import * as React from 'react'
21
import { ApolloProvider } from '@apollo/react-hooks'
3-
2+
import * as React from 'react'
43
import ErrorBoundary from './components/ErrorBoundary'
5-
import client from './services/apollo'
64
import Routes from './Routes'
5+
import client from './services/apollo'
76

87
const App = () => (
98
<ErrorBoundary>

web-app/src/Routes.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
import * as React from 'react'
22
import * as CR from 'typings'
3-
import Workspace from './components/Workspace'
4-
53
import Router from './components/Router'
6-
import LoadingPage from './containers/LoadingPage'
4+
import Workspace from './components/Workspace'
75
import ContinuePage from './containers/Continue'
6+
import LoadingPage from './containers/LoadingPage'
87
import NewPage from './containers/New'
98
import OverviewPage from './containers/Overview'
10-
import LevelSummaryPage from './containers/Tutorial/LevelPage'
119
import CompletedPage from './containers/Tutorial/CompletedPage'
10+
import LevelSummaryPage from './containers/Tutorial/LevelPage'
1211

1312
const { Route } = Router
1413

web-app/src/components/Button/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import * as React from 'react'
21
import { Button as AlifdButton } from '@alifd/next'
2+
import * as React from 'react'
33

44
interface Props {
55
style?: React.CSSProperties

web-app/src/components/Card/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import * as React from 'react'
21
import { Card as AlifdCard } from '@alifd/next'
2+
import * as React from 'react'
33

44
const styles = {
55
card: {
Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
11
import * as React from 'react'
22

33
const styles = {
4-
box: {
5-
display: 'flex',
6-
alignItems: 'center',
7-
justifyContent: 'center',
8-
},
9-
input: {
10-
border: '1px solid black',
11-
},
12-
loading: {
13-
backgroundColor: 'red',
14-
},
4+
box: {
5+
display: 'flex',
6+
alignItems: 'center',
7+
justifyContent: 'center',
8+
},
9+
input: {
10+
border: '1px solid black',
11+
},
12+
loading: {
13+
backgroundColor: 'red',
14+
},
1515
}
1616

1717
interface Props {
18-
status: 'COMPLETE' | 'INCOMPLETE' | 'ACTIVE'
18+
status: 'COMPLETE' | 'INCOMPLETE' | 'ACTIVE'
1919
}
2020

2121
const Checkbox = (props: Props) => {
22-
const onChange = () => {
23-
/* read only */
24-
}
22+
const onChange = () => {
23+
/* read only */
24+
}
2525

26-
const checked = props.status === 'COMPLETE'
26+
const checked = props.status === 'COMPLETE'
2727

28-
return (
29-
<div style={styles.box}>
30-
<label>
31-
<input style={styles.input} type="checkbox" checked={checked} onChange={onChange} />
32-
</label>
33-
</div>
34-
)
28+
return (
29+
<div style={styles.box}>
30+
<label>
31+
<input style={styles.input} type="checkbox" checked={checked} onChange={onChange} />
32+
</label>
33+
</div>
34+
)
3535
}
3636

3737
export default Checkbox

web-app/src/components/Debugger/index.tsx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@ import * as React from 'react'
22
import * as T from 'typings'
33

44
interface Props extends T.MachineContext {
5-
state: string
6-
children: React.ReactElement
5+
state: string
6+
children: React.ReactElement
77
}
88

99
const Debugger = ({ state, children, env, position, progress, processes, tutorial }: Props) => (
10-
<div style={{ backgroundColor: '#FFFF99', color: 'black', padding: '.5rem' }}>
11-
<h4>state: {state}</h4>
12-
<p>MachineId: {env.machineId}</p>
13-
<p>SessionId: {env.sessionId}</p>
14-
<p>tutorial: {tutorial ? tutorial.id : 'none'}</p>
15-
<p style={{ backgroundColor: 'khaki', padding: '.5rem' }}>position: {JSON.stringify(position)}</p>
16-
<p style={{ backgroundColor: 'moccasin', padding: '.5rem' }}>progress: {JSON.stringify(progress)}</p>
17-
<p style={{ backgroundColor: 'beige', padding: '.5rem' }}>processes: {JSON.stringify(processes)}</p>
18-
{children}
19-
</div>
10+
<div style={{ backgroundColor: '#FFFF99', color: 'black', padding: '.5rem' }}>
11+
<h4>state: {state}</h4>
12+
<p>MachineId: {env.machineId}</p>
13+
<p>SessionId: {env.sessionId}</p>
14+
<p>tutorial: {tutorial ? tutorial.id : 'none'}</p>
15+
<p style={{ backgroundColor: 'khaki', padding: '.5rem' }}>position: {JSON.stringify(position)}</p>
16+
<p style={{ backgroundColor: 'moccasin', padding: '.5rem' }}>progress: {JSON.stringify(progress)}</p>
17+
<p style={{ backgroundColor: 'beige', padding: '.5rem' }}>processes: {JSON.stringify(processes)}</p>
18+
{children}
19+
</div>
2020
)
2121

2222
export default Debugger

0 commit comments

Comments
 (0)