From e8adc3960edd5b6a88a3077659de4276929abb85 Mon Sep 17 00:00:00 2001 From: Christopher Byrd Date: Wed, 31 Jan 2024 14:57:27 -0800 Subject: [PATCH] PR feedback #10516 --- .eslintrc.js | 3 ++- arches/install/arches-app-templates/.eslintrc.js | 3 ++- .../app_name/src/declarations.d.ts | 9 +++++++++ .../arches-app-templates/app_name/src/shims.d.ts | 2 -- arches/install/arches-app-templates/package.json | 4 ++-- .../install/arches-templates/project_name/.eslintrc.js | 3 ++- .../install/arches-templates/project_name/package.json | 10 +++++----- .../project_name/src/declarations.d.ts | 2 +- package.json | 10 +++++----- 9 files changed, 28 insertions(+), 18 deletions(-) create mode 100644 arches/install/arches-app-templates/app_name/src/declarations.d.ts delete mode 100644 arches/install/arches-app-templates/app_name/src/shims.d.ts diff --git a/.eslintrc.js b/.eslintrc.js index c517d425008..f03a09b33e1 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -40,7 +40,8 @@ module.exports = { { "files": [ "*.vue" ], "rules": { - "vue/html-indent": [2, 4] + "vue/html-indent": [2, 4], + "vue/this-in-template": "off" } }, { diff --git a/arches/install/arches-app-templates/.eslintrc.js b/arches/install/arches-app-templates/.eslintrc.js index c517d425008..f03a09b33e1 100644 --- a/arches/install/arches-app-templates/.eslintrc.js +++ b/arches/install/arches-app-templates/.eslintrc.js @@ -40,7 +40,8 @@ module.exports = { { "files": [ "*.vue" ], "rules": { - "vue/html-indent": [2, 4] + "vue/html-indent": [2, 4], + "vue/this-in-template": "off" } }, { diff --git a/arches/install/arches-app-templates/app_name/src/declarations.d.ts b/arches/install/arches-app-templates/app_name/src/declarations.d.ts new file mode 100644 index 00000000000..f16945380e0 --- /dev/null +++ b/arches/install/arches-app-templates/app_name/src/declarations.d.ts @@ -0,0 +1,9 @@ +// import declarations from other projects or Arches core +import('../media/node_modules/arches/declarations.d.ts'); + +// declare modules that have been added to your project (should mirror dependencies in `package.json`) +declare module 'arches'; + +// declare filetypes used in `./src/` folder +declare module '*.vue'; +declare module '*.ts'; \ No newline at end of file diff --git a/arches/install/arches-app-templates/app_name/src/shims.d.ts b/arches/install/arches-app-templates/app_name/src/shims.d.ts deleted file mode 100644 index 9a3d2ec8da1..00000000000 --- a/arches/install/arches-app-templates/app_name/src/shims.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare module '*.vue'; -declare module '*.ts'; \ No newline at end of file diff --git a/arches/install/arches-app-templates/package.json b/arches/install/arches-app-templates/package.json index ade40e16a41..c95eb22841b 100644 --- a/arches/install/arches-app-templates/package.json +++ b/arches/install/arches-app-templates/package.json @@ -7,8 +7,8 @@ "eslint:watch": "./{{ app_name }}/media/node_modules/.bin/nodemon --watch ./{{ app_name }}/src --ext ts,vue --exec yarn --silent eslint:check", "gettext:extract": "./{{ app_name }}/media/node_modules/.bin/vue-gettext-extract", "gettext:compile": "./{{ app_name }}/media/node_modules/.bin/vue-gettext-compile", - "typescript:check": "./{{ app_name }}/media/node_modules/.bin/vue-tsc --noEmit", - "typescript:watch": "./{{ app_name }}/media/node_modules/.bin/vue-tsc --watch --noEmit" + "ts:check": "./{{ app_name }}/media/node_modules/.bin/vue-tsc --noEmit", + "ts:watch": "./{{ app_name }}/media/node_modules/.bin/vue-tsc --watch --noEmit" }, "dependencies": { "vue": "^3.3.4", diff --git a/arches/install/arches-templates/project_name/.eslintrc.js b/arches/install/arches-templates/project_name/.eslintrc.js index a5f4fe6c9f7..1e217adf65c 100644 --- a/arches/install/arches-templates/project_name/.eslintrc.js +++ b/arches/install/arches-templates/project_name/.eslintrc.js @@ -39,7 +39,8 @@ module.exports = { { "files": [ "*.vue" ], "rules": { - "vue/html-indent": [2, 4] + "vue/html-indent": [2, 4], + "vue/this-in-template": "off" } }, { diff --git a/arches/install/arches-templates/project_name/package.json b/arches/install/arches-templates/project_name/package.json index ef7732a7c03..ca9e60364dd 100644 --- a/arches/install/arches-templates/project_name/package.json +++ b/arches/install/arches-templates/project_name/package.json @@ -2,15 +2,15 @@ "name": "{{ project_name }}", "license": "AGPL-3.0-only", "scripts": { - "build_development": "yarn eslint:check && yarn typescript:check && ./media/node_modules/.bin/cross-env NODE_PATH=./media/node_modules NODE_OPTIONS=--max-old-space-size=2048 ./media/node_modules/.bin/webpack --config webpack/webpack.config.dev.js", - "build_production": "yarn eslint:check && yarn typescript:check && ./media/node_modules/.bin/cross-env NODE_PATH=./media/node_modules NODE_OPTIONS=--max-old-space-size=2048 NODE_ENV=production ./media/node_modules/.bin/webpack --config webpack/webpack.config.prod.js", - "build_test": "yarn eslint:check && yarn typescript:check && ./media/node_modules/.bin/cross-env NODE_PATH=./media/node_modules NODE_OPTIONS=--max-old-space-size=2048 ./media/node_modules/.bin/webpack --config webpack/webpack.config.dev.js --env test=true", + "build_development": "yarn eslint:check && yarn ts:check && ./media/node_modules/.bin/cross-env NODE_PATH=./media/node_modules NODE_OPTIONS=--max-old-space-size=2048 ./media/node_modules/.bin/webpack --config webpack/webpack.config.dev.js", + "build_production": "yarn eslint:check && yarn ts:check && ./media/node_modules/.bin/cross-env NODE_PATH=./media/node_modules NODE_OPTIONS=--max-old-space-size=2048 NODE_ENV=production ./media/node_modules/.bin/webpack --config webpack/webpack.config.prod.js", + "build_test": "yarn eslint:check && yarn ts:check && ./media/node_modules/.bin/cross-env NODE_PATH=./media/node_modules NODE_OPTIONS=--max-old-space-size=2048 ./media/node_modules/.bin/webpack --config webpack/webpack.config.dev.js --env test=true", "eslint:check": "./media/node_modules/.bin/eslint ./src --resolve-plugins-relative-to ./media --ext .vue,.ts --parser ./media/node_modules/vue-eslint-parser/index.js", "eslint:watch": "./media/node_modules/.bin/nodemon --watch ./src --ext ts,vue --exec yarn --silent eslint:check", "gettext:extract": "./media/node_modules/.bin/vue-gettext-extract", "gettext:compile": "./media/node_modules/.bin/vue-gettext-compile", - "typescript:check": "./media/node_modules/.bin/vue-tsc --noEmit", - "typescript:watch": "./media/node_modules/.bin/vue-tsc --watch --noEmit", + "ts:check": "./media/node_modules/.bin/vue-tsc --noEmit", + "ts:watch": "./media/node_modules/.bin/vue-tsc --watch --noEmit", "start": "./media/node_modules/.bin/cross-env NODE_PATH=./media/node_modules NODE_OPTIONS=--max-old-space-size=2048 ./media/node_modules/.bin/webpack serve --config webpack/webpack.config.dev.js" }, "devDependencies": { diff --git a/arches/install/arches-templates/project_name/src/declarations.d.ts b/arches/install/arches-templates/project_name/src/declarations.d.ts index cbafb90773b..648fa8dd18a 100644 --- a/arches/install/arches-templates/project_name/src/declarations.d.ts +++ b/arches/install/arches-templates/project_name/src/declarations.d.ts @@ -1,5 +1,5 @@ // import declarations from other projects or Arches core -import('../node_modules/arches/arches/app/src/declarations.d.ts'); +import('../media/node_modules/arches/arches/app/src/declarations.d.ts'); // declare modules that have been added to your project (should mirror `package.json`) declare module 'arches'; diff --git a/package.json b/package.json index 415f7b859b8..1fef15e241f 100644 --- a/package.json +++ b/package.json @@ -3,15 +3,15 @@ "version": "7.6.0", "license": "AGPL-3.0-only", "scripts": { - "build_development": "yarn eslint:check && yarn typescript:check && ./arches/app/media/node_modules/.bin/cross-env NODE_PATH=./arches/app/media/node_modules NODE_OPTIONS=--max-old-space-size=2048 ./arches/app/media/node_modules/.bin/webpack --config ./arches/webpack/webpack.config.dev.js", - "build_production": "yarn eslint:check && yarn typescript:check && ./arches/app/media/node_modules/.bin/cross-env NODE_PATH=./arches/app/media/node_modules NODE_OPTIONS=--max-old-space-size=2048 NODE_ENV=production ./arches/app/media/node_modules/.bin/webpack --config ./arches/webpack/webpack.config.prod.js", - "build_test": "yarn eslint:check && yarn typescript:check && ./arches/app/media/node_modules/.bin/cross-env NODE_PATH=./arches/app/media/node_modules NODE_OPTIONS=--max-old-space-size=2048 ./arches/app/media/node_modules/.bin/webpack --config ./arches/webpack/webpack.config.dev.js --env test=true", + "build_development": "yarn eslint:check && yarn ts:check && ./arches/app/media/node_modules/.bin/cross-env NODE_PATH=./arches/app/media/node_modules NODE_OPTIONS=--max-old-space-size=2048 ./arches/app/media/node_modules/.bin/webpack --config ./arches/webpack/webpack.config.dev.js", + "build_production": "yarn eslint:check && yarn ts:check && ./arches/app/media/node_modules/.bin/cross-env NODE_PATH=./arches/app/media/node_modules NODE_OPTIONS=--max-old-space-size=2048 NODE_ENV=production ./arches/app/media/node_modules/.bin/webpack --config ./arches/webpack/webpack.config.prod.js", + "build_test": "yarn eslint:check && yarn ts:check && ./arches/app/media/node_modules/.bin/cross-env NODE_PATH=./arches/app/media/node_modules NODE_OPTIONS=--max-old-space-size=2048 ./arches/app/media/node_modules/.bin/webpack --config ./arches/webpack/webpack.config.dev.js --env test=true", "eslint:check": "./arches/app/media/node_modules/.bin/eslint ./arches/app/src --resolve-plugins-relative-to ./arches/app/media --ext .vue,.ts --parser ./arches/app/media/node_modules/vue-eslint-parser/index.js", "eslint:watch": "./arches/app/media/node_modules/.bin/nodemon --watch ./arches/app/src --ext ts,vue --exec yarn --silent eslint:check", "gettext:extract": "./arches/app/media/node_modules/.bin/vue-gettext-extract", "gettext:compile": "./arches/app/media/node_modules/.bin/vue-gettext-compile", - "typescript:check": "./arches/app/media/node_modules/.bin/vue-tsc --noEmit", - "typescript:watch": "./arches/app/media/node_modules/.bin/vue-tsc --watch --noEmit", + "ts:check": "./arches/app/media/node_modules/.bin/vue-tsc --noEmit", + "ts:watch": "./arches/app/media/node_modules/.bin/vue-tsc --watch --noEmit", "start": "./arches/app/media/node_modules/.bin/cross-env NODE_PATH=./arches/app/media/node_modules NODE_OPTIONS=--max-old-space-size=2048 ./arches/app/media/node_modules/.bin/webpack serve --config ./arches/webpack/webpack.config.dev.js" }, "repository": {