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

Commit97c0bce

Browse files
authored
Merge pull request#378 from coderoad/fix/linting
Fix/linting
2 parents91d234f +ac43224 commit97c0bce

File tree

9 files changed

+36
-97
lines changed

9 files changed

+36
-97
lines changed

‎.eslintrc.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
module.exports={
22
parser:'@typescript-eslint/parser',// Specifies the ESLint parser
3+
plugins:['prettier'],
34
extends:[
45
'plugin:@typescript-eslint/recommended',// Uses the recommended rules from the@typescript-eslint/eslint-plugin
56
'prettier/@typescript-eslint',// Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
6-
'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
7+
'plugin:prettier/recommended',
78
],
89
parserOptions:{
910
ecmaVersion:2018,// Allows for the parsing of modern ECMAScript features
@@ -16,6 +17,7 @@ module.exports = {
1617
'@typescript-eslint/ban-ts-ignore':'off',
1718
'@typescript-eslint/no-unused-vars':'off',
1819
'@typescript-eslint/camelcase':'off',
20+
'@typescript-eslint/ban-ts-comment':'off',
1921
// 'react/forbid-component-props': [1, { forbid: ['style'] }],
2022
// 'react/forbid-dom-props': [1, { forbid: ['style'] }],
2123
},

‎package.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,37 +27,37 @@
2727
"build":"./scripts/build.sh",
2828
"postinstall":"node ./node_modules/vscode/bin/install",
2929
"install-all":"yarn && yarn --cwd web-app",
30-
"lint":"eslint src/**/*ts",
30+
"lint":"eslintweb-app/src/**/*.ts src/**/*.ts",
3131
"package":"./scripts/package.sh",
3232
"storybook":"yarn --cwd web-app storybook",
3333
"test":"jest",
3434
"watch":"tsc -watch -p ./"
3535
},
3636
"dependencies": {
37-
"@sentry/node":"^5.17.0",
38-
"@types/assert":"^1.4.7",
39-
"@types/jest":"^26.0.0",
37+
"@sentry/node":"^5.18.1",
38+
"@types/assert":"^1.5.1",
39+
"@types/jest":"^26.0.3",
4040
"@types/jsdom":"^16.2.3",
41-
"@types/node":"^14.0.13",
41+
"@types/node":"^14.0.14",
4242
"@types/node-fetch":"^2.5.7",
43-
"@types/semver":"^7.2.0",
44-
"@typescript-eslint/eslint-plugin":"^3.3.0",
45-
"@typescript-eslint/parser":"^3.3.0",
43+
"@types/semver":"^7.3.1",
44+
"@typescript-eslint/eslint-plugin":"^3.4.0",
45+
"@typescript-eslint/parser":"^3.4.0",
4646
"chokidar":"^3.4.0",
4747
"dotenv":"^8.2.0",
48-
"eslint":"^7.2.0",
49-
"eslint-config-prettier":"^6.11.0",
50-
"eslint-plugin-prettier":"^3.1.4",
48+
"eslint":"^7.3.1",
5149
"git-url-parse":"^11.1.2",
52-
"jest":"^26.0.1",
50+
"jest":"^26.1.0",
5351
"jsdom":"^16.2.2",
5452
"node-fetch":"^2.6.0",
55-
"prettier":"^2.0.5",
5653
"semver":"^7.3.2",
57-
"ts-jest":"^26.1.0",
54+
"ts-jest":"^26.1.1",
5855
"typescript":"^3.9.5"
5956
},
6057
"devDependencies": {
58+
"eslint-config-prettier":"^6.11.0",
59+
"eslint-plugin-prettier":"^3.1.4",
60+
"prettier":"2.0.5",
6161
"vscode":"^1.1.37",
6262
"vscode-test":"^1.4.0"
6363
},

‎src/actions/saveCommit.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import*asgitfrom'../services/git'
22

3-
asyncfunctionsaveCommit(){
3+
asyncfunctionsaveCommit():Promise<void>{
44
git.saveCommit('Save progress')
55
}
66

‎src/channel/context.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class Context {
2424
constposition:CR.Position=this.position.setPositionFromProgress(tutorial,progress)
2525
return{ progress, position}
2626
}
27-
publicreset=()=>{
27+
publicreset=():void=>{
2828
this.tutorial.reset()
2929
this.progress.reset()
3030
this.position.reset()

‎src/channel/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class Channel implements Channel {
4242
}
4343

4444
// receive from webview
45-
publicreceive=async(action:T.Action)=>{
45+
publicreceive=async(action:T.Action):Promise<void>=>{
4646
// action may be an object.type or plain string
4747
constactionType:string=typeofaction==='string' ?action :action.type
4848
// const onError = (error: T.ErrorMessage) => this.send({ type: 'ERROR', payload: { error }})
@@ -325,7 +325,7 @@ class Channel implements Channel {
325325
}
326326
}
327327
// send to webview
328-
publicsend=async(action:T.Action)=>{
328+
publicsend=async(action:T.Action):Promise<void>=>{
329329
// Error middleware
330330
if(action?.payload?.error?.type){
331331
// load error markdown message

‎src/editor/commands.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ interface CreateCommandProps {
1919
workspaceState:vscode.Memento
2020
}
2121

22-
exportconstcreateCommands=({ extensionPath, workspaceState}:CreateCommandProps)=>{
22+
exportconstcreateCommands=({ extensionPath, workspaceState}:CreateCommandProps):{[key:string]:any}=>{
2323
// React panel webview
2424
letwebview:any
2525
letcurrentPosition:T.Position

‎web-app/.eslintrc.js

Lines changed: 0 additions & 64 deletions
This file was deleted.

‎web-app/package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@
2525
"extends":"react-app"
2626
},
2727
"dependencies": {
28-
"@alifd/next":"^1.20.12",
28+
"@alifd/next":"^1.20.14",
2929
"@alifd/theme-4":"^0.3.1",
3030
"@emotion/babel-preset-css-prop":"^10.0.27",
3131
"@emotion/core":"^10.0.28",
32-
"@sentry/browser":"^5.17.0",
32+
"@sentry/browser":"^5.18.1",
3333
"js-yaml":"^3.14.0",
3434
"markdown-it":"^11.0.0",
3535
"markdown-it-emoji":"^1.4.0",
36-
"moment":"^2.26.0",
36+
"moment":"^2.27.0",
3737
"prismjs":"^1.20.0",
3838
"react":"^16.13.1",
3939
"react-addons-css-transition-group":"^15.6.2",
@@ -42,34 +42,34 @@
4242
"xstate":"^4.10.0"
4343
},
4444
"devDependencies": {
45-
"@babel/core":"^7.10.2",
45+
"@babel/core":"^7.10.3",
4646
"@storybook/addon-actions":"^5.3.19",
4747
"@storybook/addon-knobs":"^5.3.19",
4848
"@storybook/addon-links":"^5.3.19",
4949
"@storybook/addons":"^5.3.19",
50-
"@storybook/preset-create-react-app":"^3.1.0",
50+
"@storybook/preset-create-react-app":"^3.1.2",
5151
"@storybook/react":"^5.3.19",
5252
"@types/graphql":"^14.5.0",
5353
"@types/highlight.js":"^9.12.4",
54-
"@types/jest":"^26.0.0",
55-
"@types/js-yaml":"^3.12.4",
54+
"@types/jest":"^26.0.3",
55+
"@types/js-yaml":"^3.12.5",
5656
"@types/markdown-it":"^10.0.1",
57-
"@types/node":"^14.0.13",
57+
"@types/node":"^14.0.14",
5858
"@types/prismjs":"^1.16.1",
59-
"@types/react":"^16.9.36",
59+
"@types/react":"^16.9.41",
6060
"@types/react-addons-css-transition-group":"^15.0.5",
6161
"@types/react-dom":"^16.9.8",
62-
"@typescript-eslint/eslint-plugin":"^3.3.0",
63-
"@typescript-eslint/parser":"^3.3.0",
62+
"@typescript-eslint/eslint-plugin":"^3.4.0",
63+
"@typescript-eslint/parser":"^3.4.0",
6464
"babel-loader":"8.1.0",
6565
"babel-plugin-import":"^1.13.0",
6666
"customize-cra":"^1.0.0",
67-
"eslint":"^7.2.0",
67+
"eslint":"^7.3.1",
6868
"eslint-config-prettier":"^6.11.0",
6969
"eslint-plugin-prettier":"^3.1.4",
7070
"mini-css-extract-plugin":"^0.9.0",
7171
"node-sass":"^4.14.1",
72-
"prettier":"^2.0.5",
72+
"prettier":"2.0.5",
7373
"react-app-rewired":"^2.1.6",
7474
"react-scripts":"^3.4.1",
7575
"sass-loader":"^8.0.2",

‎web-app/src/containers/Tutorial/components/Hints.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ const Hints = (props: Props) => {
3232
return(
3333
<divstyle={styles.hints}>
3434
<divstyle={styles.hintList}>
35+
{/* only show revealed hints */}
3536
{props.hints.map((h,i)=>{
3637
returni<=hintIndex ?(
3738
<divkey={i}style={styles.hint}>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp