-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#1632] Frontend: Add TypeScript #1721
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
63faea0
Add typescript
zhoukerrr ddc8d7b
Revert "Add typescript"
zhoukerrr dfb48d7
Remove comments from JSON files
zhoukerrr ad2f8ac
Remove one more comment from .eslintrc.json
zhoukerrr 8585aa3
Basic conversion
zhoukerrr 2b428e2
Revert "Basic conversion"
zhoukerrr dcdd8cb
Add typescript
zhoukerrr e76ae5c
downgrade typescript cli pulgin
zhoukerrr d5662db
Add type in main.ts
zhoukerrr 00a3f86
Fix Syntax
zhoukerrr 947a96e
Merge branch 'master' into typescript
gerhean cd9d805
Merge branch 'master' into typescript
gerhean 2f977ea
Merge branch 'typescript' of https://github.com/Zhou-Jiahao-1998/Repo…
gerhean 687de43
Merge branch 'master' into typescript
dcshzj ba40791
Merge branch 'master' into typescript
dcshzj File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,53 @@ | ||
{ | ||
"env": { | ||
"browser": true | ||
}, | ||
"extends": [ | ||
"airbnb-base", | ||
// "plugin:vue/base" | ||
"plugin:vue/recommended" | ||
"env": { | ||
"browser": true | ||
}, | ||
"extends": [ | ||
"airbnb-base", | ||
"plugin:vue/recommended", | ||
"@vue/typescript" | ||
], | ||
"rules": { | ||
"vue/component-definition-name-casing": [ | ||
"error", | ||
"kebab-case" | ||
], | ||
"rules": { | ||
"vue/component-definition-name-casing": ["error", "kebab-case"], | ||
"vue/order-in-components": 0, // Should remove eventually | ||
"vue/require-prop-types": 0, // Should remove eventually | ||
"no-param-reassign": 0, | ||
"arrow-parens": ["error", "always"], | ||
"indent": ["error", 2, { | ||
"MemberExpression": 2, | ||
"CallExpression": { "arguments": 2 }, | ||
"ArrayExpression": 2, | ||
"ignoredNodes": [ | ||
"ConditionalExpression" | ||
] | ||
}], | ||
"prefer-destructuring": 0, | ||
// "sort-imports": ["error", { "ignoreDeclarationSort": true }], | ||
"func-names": ["error", "as-needed"], | ||
"no-alert": 0, | ||
"linebreak-style": 0, | ||
"max-len": ["error", { "code": 130 }] | ||
} | ||
"vue/order-in-components": 0, | ||
"vue/require-prop-types": 0, | ||
"no-param-reassign": 0, | ||
"arrow-parens": [ | ||
"error", | ||
"always" | ||
], | ||
"indent": [ | ||
"error", | ||
2, | ||
{ | ||
"MemberExpression": 2, | ||
"CallExpression": { | ||
"arguments": 2 | ||
}, | ||
"ArrayExpression": 2, | ||
"ignoredNodes": [ | ||
"ConditionalExpression" | ||
] | ||
} | ||
], | ||
"prefer-destructuring": 0, | ||
"func-names": [ | ||
"error", | ||
"as-needed" | ||
], | ||
"no-alert": 0, | ||
"linebreak-style": 0, | ||
"max-len": [ | ||
"error", | ||
{ | ||
"code": 130 | ||
} | ||
] | ||
}, | ||
"parserOptions": { | ||
"parser": "@typescript-eslint/parser" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,3 @@ | |
"validateDivTags": true, | ||
"validateIndentation": 2 | ||
} | ||
/** | ||
* TODO | ||
* Add rule for line wraps when available | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/* eslint-disable */ | ||
declare module '*.vue' { | ||
import type { DefineComponent } from 'vue' | ||
const component: DefineComponent<{}, {}, any> | ||
export default component | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "esnext", | ||
"module": "esnext", | ||
"strict": true, | ||
"jsx": "preserve", | ||
"moduleResolution": "node", | ||
"allowJs": true, | ||
"skipLibCheck": true, | ||
"esModuleInterop": true, | ||
"allowSyntheticDefaultImports": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"useDefineForClassFields": true, | ||
"sourceMap": true, | ||
"baseUrl": ".", | ||
"types": [ | ||
"webpack-env" | ||
], | ||
"paths": { | ||
"@/*": [ | ||
"src/*" | ||
] | ||
}, | ||
"lib": [ | ||
"esnext", | ||
"dom", | ||
"dom.iterable", | ||
"scripthost" | ||
] | ||
}, | ||
"include": [ | ||
"src/**/*.ts", | ||
"src/**/*.tsx", | ||
"src/**/*.vue", | ||
"tests/**/*.ts", | ||
"tests/**/*.tsx" | ||
], | ||
"exclude": [ | ||
"node_modules" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it really okay to uncomment this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also the other uncommented things, actually can you work on them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gerhean I did not uncomment those, I just removed them entirely. I think we can add it back now but since it is not in used, I think we can just remove those to avoid any potential future errors.