Skip to content
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

app: switch to typescript #1534

Merged
merged 2 commits into from
Mar 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/asset/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ type WalletInfo struct {
// Version is the Wallet's version number, which is used to signal when
// major changes are made to internal details such as coin ID encoding and
// contract structure that must be common to a server's.
Version uint32
Version uint32 `json:"version"`
// AvailableWallets is an ordered list of available WalletDefinition. The
// first WalletDefinition is considered the default, and might, for instance
// be the initial form offered to the user for configuration, with others
Expand Down
8 changes: 7 additions & 1 deletion client/webserver/site/.babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
{
"plugins": ["@babel/plugin-syntax-dynamic-import"]
"presets": [
"@babel/typescript",
"@babel/env"
],
"plugins": [
"@babel/plugin-transform-runtime"
]
}
29 changes: 29 additions & 0 deletions client/webserver/site/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json', // Required to have rules that rely on Types.
tsconfigRootDir: './'
},
extends: [
'standard',
'plugin:@typescript-eslint/recommended'
],
env: {
browser: true,
node: true
},
plugins: [
'@typescript-eslint' // Let's us override rules below.
],
rules: {
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/indent': 'off',
'no-use-before-define': 'off',
'no-trailing-spaces': 'error',
'no-console': ['off'],
'no-alert': 'error',
'no-eval': 'error',
'no-implied-eval': 'error'
}
}
11 changes: 0 additions & 11 deletions client/webserver/site/.eslintrc.json

This file was deleted.

1,230 changes: 981 additions & 249 deletions client/webserver/site/package-lock.json

Large diffs are not rendered by default.

17 changes: 11 additions & 6 deletions client/webserver/site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,27 @@
"test": "echo \"Error: no test specified\" && exit 1",
"watch": "webpack --watch --config webpack/dev.js",
"analyze": "webpack --config webpack/analyze.js",
"build": "webpack --config webpack/prod.js --progress --color",
"lint": "./node_modules/.bin/eslint src --ext .js",
"lint-fix": "./node_modules/.bin/eslint src --ext .js --fix"
"build": "./node_modules/.bin/tsc && webpack --config webpack/prod.js --progress --color",
"lint": "./node_modules/.bin/tsc && ./node_modules/.bin/eslint src --ext .js --ext .ts",
"check-types": "./node_modules/.bin/tsc"
},
"keywords": [],
"author": "The Decred developers",
"license": "Blue Oak 1.0.0",
"devDependencies": {
"@babel/core": "^7.17.2",
"@babel/eslint-parser": "^7.17.0",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-transform-runtime": "^7.17.0",
"@babel/preset-env": "^7.16.11",
"@babel/preset-typescript": "^7.16.7",
"@babel/runtime": "^7.17.8",
"@typescript-eslint/eslint-plugin": "^5.15.0",
"@typescript-eslint/parser": "^5.15.0",
"babel-loader": "^8.2.3",
"bootstrap": "^5.1.3",
"clean-webpack-plugin": "^4.0.0",
"css-loader": "^6.6.0",
"css-minimizer-webpack-plugin": "^3.4.1",
"eslint": "^8.9.0",
"eslint": "^8.11.0",
"eslint-config-standard": "^16.0.3",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-node": "^11.1.0",
Expand All @@ -37,6 +40,8 @@
"stylelint-config-standard": "^25.0.0",
"stylelint-config-standard-scss": "^3.0.0",
"stylelint-webpack-plugin": "^3.1.1",
"ts-loader": "^9.2.8",
"typescript": "^4.6.2",
"webpack": "^5.69.0",
"webpack-bundle-analyzer": "^4.5.0",
"webpack-cli": "^4.9.2",
Expand Down
File renamed without changes.
Loading