mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-21 15:43:51 +00:00
Rename js files to ts
This commit is contained in:
parent
878192b754
commit
b9000f96f9
7
.editorconfig
Normal file
7
.editorconfig
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
[*.{js,jsx,ts,tsx,vue}]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
end_of_line = lf
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
insert_final_newline = true
|
||||||
|
max_line_length = 100
|
|
@ -10,6 +10,7 @@ module.exports = {
|
||||||
'prettier',
|
'prettier',
|
||||||
'plugin:prettier-vue/recommended',
|
'plugin:prettier-vue/recommended',
|
||||||
'prettier/vue',
|
'prettier/vue',
|
||||||
|
'@vue/typescript/recommended',
|
||||||
],
|
],
|
||||||
parserOptions: {
|
parserOptions: {
|
||||||
parser: 'babel-eslint',
|
parser: 'babel-eslint',
|
||||||
|
|
|
@ -19,13 +19,16 @@
|
||||||
"vuex": "^3.4.0"
|
"vuex": "^3.4.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/polyfill": "^7.7.0",
|
"@typescript-eslint/eslint-plugin": "^2.33.0",
|
||||||
|
"@typescript-eslint/parser": "^2.33.0",
|
||||||
"@vue/cli-plugin-babel": "~4.3.0",
|
"@vue/cli-plugin-babel": "~4.3.0",
|
||||||
"@vue/cli-plugin-eslint": "~4.3.0",
|
"@vue/cli-plugin-eslint": "~4.3.0",
|
||||||
"@vue/cli-plugin-router": "^4.3.1",
|
"@vue/cli-plugin-router": "^4.3.1",
|
||||||
|
"@vue/cli-plugin-typescript": "~4.4.0",
|
||||||
"@vue/cli-plugin-vuex": "~4.3.0",
|
"@vue/cli-plugin-vuex": "~4.3.0",
|
||||||
"@vue/cli-service": "~4.3.0",
|
"@vue/cli-service": "~4.3.0",
|
||||||
"@vue/eslint-config-airbnb": "^5.0.2",
|
"@vue/eslint-config-airbnb": "^5.0.2",
|
||||||
|
"@vue/eslint-config-typescript": "^5.0.2",
|
||||||
"babel-eslint": "^10.1.0",
|
"babel-eslint": "^10.1.0",
|
||||||
"eslint": "^6.7.2",
|
"eslint": "^6.7.2",
|
||||||
"eslint-config-airbnb": "^18.1.0",
|
"eslint-config-airbnb": "^18.1.0",
|
||||||
|
@ -39,6 +42,7 @@
|
||||||
"prettier": "^2.0.5",
|
"prettier": "^2.0.5",
|
||||||
"sass": "^1.19.0",
|
"sass": "^1.19.0",
|
||||||
"sass-loader": "^8.0.0",
|
"sass-loader": "^8.0.0",
|
||||||
|
"typescript": "~3.9.3",
|
||||||
"vue-cli-plugin-bootstrap-vue": "~0.6.0",
|
"vue-cli-plugin-bootstrap-vue": "~0.6.0",
|
||||||
"vue-template-compiler": "^2.6.11"
|
"vue-template-compiler": "^2.6.11"
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ api.interceptors.response.use(
|
||||||
console.log(err);
|
console.log(err);
|
||||||
if (err.response && err.response.status === 401) {
|
if (err.response && err.response.status === 401) {
|
||||||
console.log('Dispatching refresh_token...');
|
console.log('Dispatching refresh_token...');
|
||||||
apiStore.store.dispatch('user/refresh_token');
|
apiStore.store.dispatch('user/refreshToken');
|
||||||
// maybe redirect to /login if needed !
|
// maybe redirect to /login if needed !
|
||||||
}
|
}
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
5
src/shims.vue.d.ts
vendored
Normal file
5
src/shims.vue.d.ts
vendored
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
declare module '*.vue' {
|
||||||
|
import Vue from 'vue';
|
||||||
|
|
||||||
|
export default Vue;
|
||||||
|
}
|
|
@ -6,7 +6,7 @@ export default {
|
||||||
version: '',
|
version: '',
|
||||||
trades: [],
|
trades: [],
|
||||||
openTrades: [],
|
openTrades: [],
|
||||||
trade_count: 0,
|
tradeCount: 0,
|
||||||
performanceStats: [],
|
performanceStats: [],
|
||||||
whitelist: [],
|
whitelist: [],
|
||||||
blacklist: [],
|
blacklist: [],
|
||||||
|
@ -28,7 +28,7 @@ export default {
|
||||||
mutations: {
|
mutations: {
|
||||||
updateTrades(state, trades) {
|
updateTrades(state, trades) {
|
||||||
state.trades = trades.trades;
|
state.trades = trades.trades;
|
||||||
state.trade_count = trades.trades_count;
|
state.tradeCount = trades.trades_count;
|
||||||
},
|
},
|
||||||
updateOpenTrades(state, trades) {
|
updateOpenTrades(state, trades) {
|
||||||
state.openTrades = trades;
|
state.openTrades = trades;
|
|
@ -89,7 +89,7 @@ export default {
|
||||||
})
|
})
|
||||||
.catch(console.error);
|
.catch(console.error);
|
||||||
},
|
},
|
||||||
refresh_token({ commit, dispatch }) {
|
refreshToken({ commit, dispatch }) {
|
||||||
console.log('Refreshing token...');
|
console.log('Refreshing token...');
|
||||||
const token = JSON.parse(localStorage.getItem(AUTH_REF_TOKEN));
|
const token = JSON.parse(localStorage.getItem(AUTH_REF_TOKEN));
|
||||||
axios
|
axios
|
18
tsconfig.json
Normal file
18
tsconfig.json
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
// this aligns with Vue's browser support
|
||||||
|
"target": "es5",
|
||||||
|
// this enables stricter inference for data properties on `this`
|
||||||
|
"strict": true,
|
||||||
|
// if using webpack 2+ or rollup, to leverage tree shaking:
|
||||||
|
"module": "es2015",
|
||||||
|
"moduleResolution": "node"
|
||||||
|
},
|
||||||
|
"include": [
|
||||||
|
"src/**/*.ts",
|
||||||
|
"src/**/*.tsx",
|
||||||
|
"src/**/*.vue",
|
||||||
|
"tests/**/*.ts",
|
||||||
|
"tests/**/*.tsx"
|
||||||
|
]
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user