Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit66d806b

Browse files
committed
prettier linting
1 parent155735a commit66d806b

File tree

33 files changed

+770
-772
lines changed

33 files changed

+770
-772
lines changed

‎.vscode/settings.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@
2929
},
3030
"search.exclude": {
3131
"out":true// set this to false to include "out" folder in search results
32-
},
33-
"prettier.eslintIntegration":true,
32+
},
3433

3534
// styles
3635
"editor.formatOnSave":true,

‎web-app/.eslintrc.js

Lines changed: 59 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,61 @@
11
module.exports={
2-
parser:'typescript-eslint-parser',
3-
//extends: [
4-
// 'plugin:react/recommended', // Uses the recommended rules from @eslint-plugin-react
5-
// 'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin
6-
// 'prettier/@typescript-eslint', // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
7-
// 'plugin:prettier/recommended', // Enables eslint-plugin-prettier and displays prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
8-
//],
9-
parserOptions:{
10-
ecmaVersion:2018,// Allows for the parsing of modern ECMAScript features
11-
sourceType:'module',// Allows for the use of imports
12-
ecmaFeatures:{
13-
jsx:true,// Allows for the parsing of JSX
14-
useJSXTextNode:true,
15-
},
16-
},
17-
rules:{
18-
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
19-
// e.g.
20-
'arrow-parens':0,
21-
'comma-dangle':0,
22-
'global-require':0,
23-
'import/no-extraneous-dependencies':0,
24-
'import/no-named-as-default':0,
25-
'import/prefer-default-export':0,
26-
'jsx-a11y/href-no-hash':0,
27-
quotes:['error','single'],
28-
'no-tabs':0,
29-
'react/jsx-curly-spacing':0,
30-
'react/jsx-indent-props':'off',
31-
'react/prop-types':0,
32-
'react/sort-comp':0,
33-
'react/prefer-stateless-function':0,
34-
semi:['error','never'],
35-
'object-curly-newline':0,
36-
'react/jsx-indent':'off',
37-
'class-methods-use-this':0,
38-
indent:'off',
39-
'implicit-arrow-linebreak':'off',
40-
'function-paren-newline':'off',
41-
'lines-between-class-members':'off',
42-
'no-unreachable':'off',
43-
'import/no-unresolved':'off',
44-
'no-unused-vars':'off',
45-
'no-confusing-arrow':'off',
46-
'no-restricted-syntax':'off',
47-
'react/jsx-one-expression-per-line':'off',
48-
'guard-for-in':'off',
49-
'no-nested-ternary':'off',
50-
'no-underscore-dangle':'off',
51-
'react/destructuring-assignment':'off',
52-
'no-return-assign':'off',
53-
'no-case-declarations':'off',
54-
'react/no-array-index-key':'off',
55-
},
56-
settings:{
57-
react:{
58-
version:'detect',// Tells eslint-plugin-react to automatically detect the version of React to use
59-
},
60-
},
2+
parser:'typescript-eslint-parser',
3+
extends:[
4+
// 'plugin:react/recommended', // Uses the recommended rules from @eslint-plugin-react
5+
// 'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin
6+
// 'prettier/@typescript-eslint', // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
7+
// 'plugin:prettier/recommended', // Enables eslint-plugin-prettier and displays prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
8+
],
9+
parserOptions:{
10+
ecmaVersion:2018,// Allows for the parsing of modern ECMAScript features
11+
sourceType:'module',// Allows for the use of imports
12+
ecmaFeatures:{
13+
jsx:true,// Allows for the parsing of JSX
14+
useJSXTextNode:true,
15+
},
16+
},
17+
rules:{
18+
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
19+
// e.g.
20+
'arrow-parens':0,
21+
'comma-dangles':0,
22+
'global-require':0,
23+
'import/no-extraneous-dependencies':0,
24+
'import/no-named-as-default':0,
25+
'import/prefer-default-export':0,
26+
'jsx-a11y/href-no-hash':0,
27+
quotes:['error','single'],
28+
'no-tabs':0,
29+
'react/jsx-curly-spacing':0,
30+
'react/jsx-indent-props':'off',
31+
'react/prop-types':0,
32+
'react/sort-comp':0,
33+
'react/prefer-stateless-function':0,
34+
semi:['error','never'],
35+
'object-curly-newline':0,
36+
'react/jsx-indent':'off',
37+
'class-methods-use-this':0,
38+
indent:'off',
39+
'implicit-arrow-linebreak':'off',
40+
'function-paren-newline':'off',
41+
'lines-between-class-members':'off',
42+
'no-unreachable':'off',
43+
'import/no-unresolved':'off',
44+
'no-unused-vars':'off',
45+
'no-confusing-arrow':'off',
46+
'no-restricted-syntax':'off',
47+
'react/jsx-one-expression-per-line':'off',
48+
'guard-for-in':'off',
49+
'no-nested-ternary':'off',
50+
'no-underscore-dangle':'off',
51+
'react/destructuring-assignment':'off',
52+
'no-return-assign':'off',
53+
'no-case-declarations':'off',
54+
'react/no-array-index-key':'off',
55+
},
56+
settings:{
57+
react:{
58+
version:'detect',// Tells eslint-plugin-react to automatically detect the version of React to use
59+
},
60+
},
6161
}

‎web-app/.prettierrc.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module.exports={
2-
printWidth:120,
3-
semi:false,
4-
singleQuote:true,
5-
tabWidth:2,
6-
trailingComma:'all',
2+
printWidth:120,
3+
semi:false,
4+
singleQuote:true,
5+
tabWidth:2,
6+
trailingComma:'all',
77
}

‎web-app/src/App.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@ import ErrorBoundary from './components/ErrorBoundary'
55
importclientfrom'./services/apollo'
66
importRoutesfrom'./Routes'
77

8-
98
constApp=()=>(
10-
<ErrorBoundary>
11-
<ApolloProviderclient={client}>
12-
<Routes/>
13-
</ApolloProvider>
14-
</ErrorBoundary>
9+
<ErrorBoundary>
10+
<ApolloProviderclient={client}>
11+
<Routes/>
12+
</ApolloProvider>
13+
</ErrorBoundary>
1514
)
1615

1716
exportdefaultApp

‎web-app/src/Routes.tsx

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -15,36 +15,36 @@ const { Route } = Router
1515
consttempSend=(action:any)=>console.log('sent')
1616

1717
constRoutes=()=>{
18-
return(
19-
<Workspace>
20-
<Router>
21-
<Routepath={['Start.Startup','Start.Authenticate','Start.NewOrContinue']}>
22-
<LoadingPagetext="Launching..."/>
23-
</Route>
24-
<Routepath="Start.SelectTutorial">
25-
<NewPagesend={tempSend}/>
26-
</Route>
27-
<Routepath="Start.ContinueTutorial">
28-
<ContinuePagesend={tempSend}context={{}asCR.MachineContext}/>
29-
</Route>
30-
<Routepath="Tutorial.Initialize">
31-
<LoadingPagetext="Initializing..."/>
32-
</Route>
33-
<Routepath="Tutorial.LoadNext">
34-
<LoadingPagetext="Loading..."/>
35-
</Route>
36-
<Routepath="Tutorial.Summary">
37-
<OverviewPagesend={tempSend}context={{}asCR.MachineContext}/>
38-
</Route>
39-
<Routepath="Tutorial.Level">
40-
<LevelSummaryPagesend={tempSend}context={{}asCR.MachineContext}/>
41-
</Route>
42-
<Routepath="Tutorial.Completed">
43-
<CompletedPagesend={tempSend}context={{}asCR.MachineContext}/>
44-
</Route>
45-
</Router>
46-
</Workspace>
47-
)
18+
return(
19+
<Workspace>
20+
<Router>
21+
<Routepath={['Start.Startup','Start.Authenticate','Start.NewOrContinue']}>
22+
<LoadingPagetext="Launching..."/>
23+
</Route>
24+
<Routepath="Start.SelectTutorial">
25+
<NewPagesend={tempSend}/>
26+
</Route>
27+
<Routepath="Start.ContinueTutorial">
28+
<ContinuePagesend={tempSend}context={{}asCR.MachineContext}/>
29+
</Route>
30+
<Routepath="Tutorial.Initialize">
31+
<LoadingPagetext="Initializing..."/>
32+
</Route>
33+
<Routepath="Tutorial.LoadNext">
34+
<LoadingPagetext="Loading..."/>
35+
</Route>
36+
<Routepath="Tutorial.Summary">
37+
<OverviewPagesend={tempSend}context={{}asCR.MachineContext}/>
38+
</Route>
39+
<Routepath="Tutorial.Level">
40+
<LevelSummaryPagesend={tempSend}context={{}asCR.MachineContext}/>
41+
</Route>
42+
<Routepath="Tutorial.Completed">
43+
<CompletedPagesend={tempSend}context={{}asCR.MachineContext}/>
44+
</Route>
45+
</Router>
46+
</Workspace>
47+
)
4848
}
4949

5050
exportdefaultRoutes

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@ import * as React from 'react'
22
import{ButtonasAlifdButton}from'@alifd/next'
33

44
interfaceProps{
5-
style?:React.CSSProperties
6-
children:string|React.ReactNode
7-
disabled?:boolean
8-
type?:'primary'|'secondary'|'normal'
9-
onClick?:()=>void
5+
style?:React.CSSProperties
6+
children:string|React.ReactNode
7+
disabled?:boolean
8+
type?:'primary'|'secondary'|'normal'
9+
onClick?:()=>void
1010
}
1111

1212
constButton=(props:Props)=>(
13-
<AlifdButtononClick={props.onClick}type={props.type}disabled={props.disabled}style={props.style}>
14-
{props.children}
15-
</AlifdButton>
13+
<AlifdButtononClick={props.onClick}type={props.type}disabled={props.disabled}style={props.style}>
14+
{props.children}
15+
</AlifdButton>
1616
)
1717

1818
exportdefaultButton

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

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,27 @@ import * as React from 'react'
22
import{CardasAlifdCard}from'@alifd/next'
33

44
conststyles={
5-
card:{
6-
display:'flex',
7-
width:'100%',
8-
},
5+
card:{
6+
display:'flex',
7+
width:'100%',
8+
},
99
}
1010

1111
interfaceProps{
12-
children:React.ReactNode
13-
onClick?:()=>void
14-
style?:React.CSSProperties
12+
children:React.ReactNode
13+
onClick?:()=>void
14+
style?:React.CSSProperties
1515
}
1616

1717
constCard=(props:Props)=>(
18-
<AlifdCard
19-
showTitleBullet={false}
20-
contentHeight="auto"
21-
onClick={props.onClick}
22-
style={{ ...styles.card, ...props.style}}
23-
>
24-
{props.children}
25-
</AlifdCard>
18+
<AlifdCard
19+
showTitleBullet={false}
20+
contentHeight="auto"
21+
onClick={props.onClick}
22+
style={{ ...styles.card, ...props.style}}
23+
>
24+
{props.children}
25+
</AlifdCard>
2626
)
2727

2828
exportdefaultCard
Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
11
import*asReactfrom'react'
22

33
conststyles={
4-
box:{
5-
display:'flex',
6-
alignItems:'center',
7-
justifyContent:'center',
8-
},
9-
input:{
10-
border:'1px solid black',
11-
backgroundColor:'yellow',
12-
},
4+
box:{
5+
display:'flex',
6+
alignItems:'center',
7+
justifyContent:'center',
8+
},
9+
input:{
10+
border:'1px solid black',
11+
backgroundColor:'yellow',
12+
},
1313
}
1414

1515
interfaceProps{
16-
status:'COMPLETE'|'INCOMPLETE'|'ACTIVE'|'LOADING'
16+
status:'COMPLETE'|'INCOMPLETE'|'ACTIVE'|'LOADING'
1717
}
1818

1919
constCheckbox=(props:Props)=>{
20-
constchecked=props.status==='COMPLETE'
21-
// const loading = props.state === 'LOADING'
22-
constonChange=()=>{
23-
/* read */
24-
}
25-
return(
26-
<divstyle={styles.box}>
27-
<label>
28-
<inputstyle={styles.input}type="checkbox"checked={checked}onChange={onChange}/>
29-
</label>
30-
</div>
31-
)
20+
constchecked=props.status==='COMPLETE'
21+
// const loading = props.state === 'LOADING'
22+
constonChange=()=>{
23+
/* read */
24+
}
25+
return(
26+
<divstyle={styles.box}>
27+
<label>
28+
<inputstyle={styles.input}type="checkbox"checked={checked}onChange={onChange}/>
29+
</label>
30+
</div>
31+
)
3232
}
3333

3434
exportdefaultCheckbox

‎web-app/src/components/Debugger/debuggerWrapper.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ import stateToString from './stateToString'
55
constSHOW_DEBUGGER=JSON.parse(process.env.REACT_APP_DEBUG||'false')
66

77
constdebuggerWrapper=(element:React.ReactElement,state:any)=>{
8-
if(SHOW_DEBUGGER){
9-
return(
10-
<Debuggerstate={stateToString(state.value)}{...state.context}>
11-
{element}
12-
</Debugger>
13-
)
14-
}
15-
returnelement
8+
if(SHOW_DEBUGGER){
9+
return(
10+
<Debuggerstate={stateToString(state.value)}{...state.context}>
11+
{element}
12+
</Debugger>
13+
)
14+
}
15+
returnelement
1616
}
1717

1818
exportdefaultdebuggerWrapper

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp