diff --git a/.babelrc b/.babelrc index 60d52ff11..1396b32b5 100644 --- a/.babelrc +++ b/.babelrc @@ -4,8 +4,6 @@ ], "plugins": [ ["@babel/plugin-proposal-object-rest-spread", { "useBuiltIns": true }], - "babel-plugin-transform-class-properties", - "babel-plugin-syntax-flow", - "babel-plugin-transform-flow-strip-types" + "@babel/plugin-proposal-class-properties" ] } diff --git a/.eslintrc b/.eslintrc index e972db205..99891c9e3 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,9 +1,8 @@ { "parser": "babel-eslint", - "plugins": ["html", "flowtype-errors"], + "plugins": ["html"], "extends": ["vue"], "rules": { - "flowtype-errors/show-errors": 2, "semi": "off", "indent": ["error", 4], "comma-dangle": ["error", "always-multiline"], diff --git a/.flowconfig b/.flowconfig deleted file mode 100644 index 3d9a7c25d..000000000 --- a/.flowconfig +++ /dev/null @@ -1,14 +0,0 @@ -[ignore] -/vendor/symfony/.* -/tests/.* -/storage/.* -/app/.* - -[options] -module.name_mapper='^/\(.*\)$' -> '/\1' -module.file_ext=.js -module.file_ext=.vue -module.file_ext=.json - -[version] -0.81.0 diff --git a/package.json b/package.json index c2272c5a8..3a684fe8a 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ }, "devDependencies": { "@babel/core": "^7.0.0-beta.49", + "@babel/plugin-proposal-class-properties": "^7.2.1", "@babel/plugin-proposal-object-rest-spread": "^7.0.0-beta.49", "@babel/plugin-transform-async-to-generator": "^7.0.0-beta.49", "@babel/plugin-transform-runtime": "^7.0.0-beta.49", @@ -25,8 +26,6 @@ "babel-core": "^6.26.3", "babel-eslint": "^9.0.0", "babel-loader": "^8.0.0-beta.3", - "babel-plugin-syntax-flow": "^6.18.0", - "babel-plugin-transform-class-properties": "^6.24.1", "babel-plugin-transform-flow-strip-types": "^6.22.0", "babel-plugin-transform-object-assign": "^6.22.0", "babel-plugin-transform-runtime": "^6.23.0", @@ -41,7 +40,6 @@ "eslint-plugin-html": "^4.0.6", "eslint-plugin-vue": "^4.7.1", "extract-text-webpack-plugin": "^4.0.0-beta.0", - "flow-bin": "^0.81.0", "glob-all": "^3.1.0", "html-webpack-plugin": "^3.2.0", "jquery": "^3.3.1", diff --git a/resources/assets/scripts/api/http.js b/resources/assets/scripts/api/http.js index 0dd5c800b..07d2cfe76 100644 --- a/resources/assets/scripts/api/http.js +++ b/resources/assets/scripts/api/http.js @@ -1,12 +1,10 @@ -// @flow import axios from 'axios'; -import type { AxiosInstance } from 'axios'; // This token is set in the bootstrap.js file at the beginning of the request // and is carried through from there. // const token: string = ''; -const http: AxiosInstance = axios.create({ +const http = axios.create({ 'X-Requested-With': 'XMLHttpRequest', 'Accept': 'application/json', 'Content-Type': 'application/json', diff --git a/resources/assets/scripts/api/server/getDirectoryContents.js b/resources/assets/scripts/api/server/getDirectoryContents.js index 4fb7691c9..c2d7b7336 100644 --- a/resources/assets/scripts/api/server/getDirectoryContents.js +++ b/resources/assets/scripts/api/server/getDirectoryContents.js @@ -1,23 +1,16 @@ -// @flow import http from './../http'; import filter from 'lodash/filter'; import isObject from 'lodash/isObject'; import route from '../../../../../vendor/tightenco/ziggy/src/js/route'; -export interface DirectoryContentsResponse { - files: Object, - directories: Object, - editable: Array, -} - /** * Get the contents of a specific directory for a given server. * * @param {String} server * @param {String} directory - * @return {Promise} + * @return {Promise} */ -export function getDirectoryContents(server: string, directory: string): Promise { +export function getDirectoryContents (server, directory) { return new Promise((resolve, reject) => { http.get(route('server.files', { server, directory })) .then((response) => { diff --git a/resources/assets/scripts/app.js b/resources/assets/scripts/app.js index 480b1afdb..20417907f 100644 --- a/resources/assets/scripts/app.js +++ b/resources/assets/scripts/app.js @@ -1,4 +1,3 @@ -// @flow import Vue from 'vue'; import Vuex from 'vuex'; import vuexI18n from 'vuex-i18n'; diff --git a/resources/assets/scripts/components/server/subpages/FileManager.vue b/resources/assets/scripts/components/server/subpages/FileManager.vue index f9674ec2e..be7618829 100644 --- a/resources/assets/scripts/components/server/subpages/FileManager.vue +++ b/resources/assets/scripts/components/server/subpages/FileManager.vue @@ -42,13 +42,11 @@