create-quasar 1.5.6 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/.eslintrc.cjs +10 -2
  2. package/index.js +88 -92
  3. package/package.json +10 -9
  4. package/templates/app/index.js +2 -3
  5. package/templates/app/quasar-v1/index.js +2 -3
  6. package/templates/app/quasar-v1/js/BASE/src/router/routes.js +0 -1
  7. package/templates/app/quasar-v1/js/index.js +8 -9
  8. package/templates/app/quasar-v1/js/lint/_.eslintrc.js +6 -4
  9. package/templates/app/quasar-v1/ts/index.js +8 -9
  10. package/templates/app/quasar-v1/ts/lint/_.eslintrc.js +1 -0
  11. package/templates/app/quasar-v2/index.js +2 -3
  12. package/templates/app/quasar-v2/js-vite/BASE/_package.json +2 -1
  13. package/templates/app/quasar-v2/js-vite/BASE/quasar.config.js +8 -12
  14. package/templates/app/quasar-v2/js-vite/BASE/src/router/routes.js +0 -1
  15. package/templates/app/quasar-v2/js-vite/index.js +12 -13
  16. package/templates/app/quasar-v2/js-vite/lint/_.eslintrc.cjs +2 -2
  17. package/templates/app/quasar-v2/js-vite-beta/BASE/_package.json +2 -1
  18. package/templates/app/quasar-v2/js-vite-beta/BASE/quasar.config.js +8 -13
  19. package/templates/app/quasar-v2/js-vite-beta/BASE/src/router/routes.js +0 -1
  20. package/templates/app/quasar-v2/js-vite-beta/index.js +12 -13
  21. package/templates/app/quasar-v2/js-vite-beta/lint/_.eslintrc.cjs +1 -1
  22. package/templates/app/quasar-v2/js-webpack/BASE/src/router/routes.js +0 -1
  23. package/templates/app/quasar-v2/js-webpack/index.js +12 -13
  24. package/templates/app/quasar-v2/js-webpack/lint/_.eslintrc.cjs +2 -2
  25. package/templates/app/quasar-v2/js-webpack-beta/BASE/_package.json +1 -1
  26. package/templates/app/quasar-v2/js-webpack-beta/BASE/src/router/routes.js +0 -1
  27. package/templates/app/quasar-v2/js-webpack-beta/index.js +12 -13
  28. package/templates/app/quasar-v2/js-webpack-beta/lint/_.eslintrc.cjs +2 -2
  29. package/templates/app/quasar-v2/ts-vite/BASE/_package.json +3 -1
  30. package/templates/app/quasar-v2/ts-vite/BASE/quasar.config.js +11 -12
  31. package/templates/app/quasar-v2/ts-vite/index.js +14 -15
  32. package/templates/app/quasar-v2/ts-vite/lint/_.eslintignore +0 -1
  33. package/templates/app/quasar-v2/ts-vite/lint/_.eslintrc.cjs +2 -2
  34. package/templates/app/quasar-v2/ts-vite/lint/_tsconfig.vue-tsc.json +6 -0
  35. package/templates/app/quasar-v2/ts-vite-beta/BASE/_package.json +4 -2
  36. package/templates/app/quasar-v2/ts-vite-beta/BASE/quasar.config.ts +11 -13
  37. package/templates/app/quasar-v2/ts-vite-beta/index.js +14 -15
  38. package/templates/app/quasar-v2/ts-vite-beta/lint/_.eslintignore +0 -1
  39. package/templates/app/quasar-v2/ts-vite-beta/lint/_.eslintrc.cjs +2 -2
  40. package/templates/app/quasar-v2/ts-vite-beta/lint/_tsconfig.vue-tsc.json +6 -0
  41. package/templates/app/quasar-v2/ts-webpack/index.js +14 -15
  42. package/templates/app/quasar-v2/ts-webpack/lint/_.eslintrc.cjs +2 -2
  43. package/templates/app/quasar-v2/ts-webpack-beta/BASE/_package.json +1 -1
  44. package/templates/app/quasar-v2/ts-webpack-beta/index.js +14 -15
  45. package/templates/app/quasar-v2/ts-webpack-beta/lint/_.eslintrc.cjs +2 -2
  46. package/templates/app-extension/ae-v1/index.js +7 -8
  47. package/templates/app-extension/index.js +2 -2
  48. package/templates/ui-kit/index.js +8 -9
  49. package/templates/ui-kit/quasar-v1/BASE/ui/build/script.app-ext.js +1 -1
  50. package/templates/ui-kit/quasar-v1/BASE/ui/build/script.clean.js +1 -1
  51. package/templates/ui-kit/quasar-v1/BASE/ui/dev/quasar.conf.js +1 -1
  52. package/templates/ui-kit/quasar-v1/index.js +9 -10
  53. package/templates/ui-kit/quasar-v2/index.js +9 -10
  54. package/utils/index.js +67 -46
  55. package/utils/logger.js +66 -43
  56. /package/templates/{.eslintrc.js → .eslintrc.cjs} +0 -0
  57. /package/templates/app/quasar-v1/js/{.eslintrc.js → .eslintrc.cjs} +0 -0
  58. /package/templates/app/quasar-v1/ts/{.eslintrc.js → .eslintrc.cjs} +0 -0
  59. /package/templates/app/quasar-v2/js-vite/{.eslintrc.js → .eslintrc.cjs} +0 -0
  60. /package/templates/app/quasar-v2/js-vite-beta/{.eslintrc.js → .eslintrc.cjs} +0 -0
  61. /package/templates/app/quasar-v2/js-webpack/{.eslintrc.js → .eslintrc.cjs} +0 -0
  62. /package/templates/app/quasar-v2/js-webpack-beta/{.eslintrc.js → .eslintrc.cjs} +0 -0
  63. /package/templates/app/quasar-v2/ts-vite/{.eslintrc.js → .eslintrc.cjs} +0 -0
  64. /package/templates/app/quasar-v2/ts-vite-beta/{.eslintrc.js → .eslintrc.cjs} +0 -0
  65. /package/templates/app/quasar-v2/ts-webpack/{.eslintrc.js → .eslintrc.cjs} +0 -0
  66. /package/templates/app/quasar-v2/ts-webpack-beta/{.eslintrc.js → .eslintrc.cjs} +0 -0
  67. /package/templates/app-extension/ae-v1/{.eslintrc.js → .eslintrc.cjs} +0 -0
  68. /package/templates/ui-kit/{.eslintrc.js → .eslintrc.cjs} +0 -0
  69. /package/templates/ui-kit/quasar-v2/{.eslintrc.js → .eslintrc.cjs} +0 -0
@@ -1,5 +1,4 @@
1
-
2
- module.exports = async function ({ scope, utils }) {
1
+ export async function script ({ scope, utils }) {
3
2
  await utils.prompts(scope, [
4
3
  {
5
4
  type: 'select',
@@ -17,11 +16,11 @@ module.exports = async function ({ scope, utils }) {
17
16
  name: 'preset',
18
17
  message: 'Check the features needed for your project:',
19
18
  choices: [
20
- { title: 'ESLint', value: 'lint', description: 'recommended', selected: true },
19
+ { title: 'Linting (vite-plugin-checker + ESLint)', value: 'lint', description: 'recommended', selected: true },
21
20
  { title: 'State Management (Pinia)', value: 'pinia', description: 'https://pinia.vuejs.org' },
22
21
  { title: 'State Management (Vuex) [DEPRECATED by Vue Team]', value: 'vuex', description: 'See https://vuejs.org/guide/scaling-up/state-management.html#pinia' },
23
- { title: 'Axios', value: 'axios' },
24
- { title: 'Vue-i18n', value: 'i18n' }
22
+ { title: 'axios', value: 'axios' },
23
+ { title: 'vue-i18n', value: 'i18n' }
25
24
  ],
26
25
  format: values => {
27
26
  let result = values
@@ -38,7 +37,7 @@ module.exports = async function ({ scope, utils }) {
38
37
  }
39
38
  },
40
39
  {
41
- type: (_, { preset }) => preset.lint ? 'select' : null,
40
+ type: (_, { preset }) => (preset.lint ? 'select' : null),
42
41
  name: 'lintConfig',
43
42
  message: 'Pick an ESLint preset:',
44
43
  choices: [
@@ -50,13 +49,13 @@ module.exports = async function ({ scope, utils }) {
50
49
  ])
51
50
 
52
51
  utils.createTargetDir(scope)
53
- utils.renderTemplate(utils.join(__dirname, 'BASE'), scope)
54
- utils.renderTemplate(utils.join(__dirname, scope.css), scope)
52
+ utils.renderTemplate(utils.join(import.meta.url, 'BASE'), scope)
53
+ utils.renderTemplate(utils.join(import.meta.url, scope.css), scope)
55
54
 
56
- if (scope.preset.axios) utils.renderTemplate(utils.join(__dirname, 'axios'), scope)
57
- if (scope.preset.i18n) utils.renderTemplate(utils.join(__dirname, 'i18n'), scope)
58
- if (scope.preset.lint) utils.renderTemplate(utils.join(__dirname, 'lint'), scope)
55
+ if (scope.preset.axios) utils.renderTemplate(utils.join(import.meta.url, 'axios'), scope)
56
+ if (scope.preset.i18n) utils.renderTemplate(utils.join(import.meta.url, 'i18n'), scope)
57
+ if (scope.preset.lint) utils.renderTemplate(utils.join(import.meta.url, 'lint'), scope)
59
58
 
60
- if (scope.preset.pinia) utils.renderTemplate(utils.join(__dirname, 'pinia'), scope)
61
- else if (scope.preset.vuex) utils.renderTemplate(utils.join(__dirname, 'vuex'), scope)
59
+ if (scope.preset.pinia) utils.renderTemplate(utils.join(import.meta.url, 'pinia'), scope)
60
+ else if (scope.preset.vuex) utils.renderTemplate(utils.join(import.meta.url, 'vuex'), scope)
62
61
  }
@@ -11,7 +11,6 @@ module.exports = {
11
11
  env: {
12
12
  node: true,
13
13
  browser: true,
14
- 'vue/setup-compiler-macros': true
15
14
  },
16
15
 
17
16
  // Rules order is important, please avoid shuffling them
@@ -77,6 +76,7 @@ module.exports = {
77
76
  'import/no-unresolved': 'off',
78
77
  'import/no-extraneous-dependencies': 'off',
79
78
  <% } else if (lintConfig === 'airbnb') { %>
79
+ 'no-plusplus': 'off',
80
80
  'no-param-reassign': 'off',
81
81
  'no-void': 'off',
82
82
  'no-nested-ternary': 'off',
@@ -1,4 +1,3 @@
1
-
2
1
  const routes = [
3
2
  {
4
3
  path: '/',
@@ -1,5 +1,4 @@
1
-
2
- module.exports = async function ({ scope, utils }) {
1
+ export async function script ({ scope, utils }) {
3
2
  await utils.prompts(scope, [
4
3
  {
5
4
  type: 'select',
@@ -17,11 +16,11 @@ module.exports = async function ({ scope, utils }) {
17
16
  name: 'preset',
18
17
  message: 'Check the features needed for your project:',
19
18
  choices: [
20
- { title: 'ESLint', value: 'lint', description: 'recommended', selected: true },
19
+ { title: 'Linting (ESLint)', value: 'lint', description: 'recommended', selected: true },
21
20
  { title: 'State Management (Pinia)', value: 'pinia', description: 'https://pinia.vuejs.org' },
22
21
  { title: 'State Management (Vuex) [DEPRECATED by Vue Team]', value: 'vuex', description: 'See https://vuejs.org/guide/scaling-up/state-management.html#pinia' },
23
- { title: 'Axios', value: 'axios' },
24
- { title: 'Vue-i18n', value: 'i18n' }
22
+ { title: 'axios', value: 'axios' },
23
+ { title: 'vue-i18n', value: 'i18n' }
25
24
  ],
26
25
  format: values => {
27
26
  let result = values
@@ -38,7 +37,7 @@ module.exports = async function ({ scope, utils }) {
38
37
  }
39
38
  },
40
39
  {
41
- type: (_, { preset }) => preset.lint ? 'select' : null,
40
+ type: (_, { preset }) => (preset.lint ? 'select' : null),
42
41
  name: 'lintConfig',
43
42
  message: 'Pick an ESLint preset:',
44
43
  choices: [
@@ -50,13 +49,13 @@ module.exports = async function ({ scope, utils }) {
50
49
  ])
51
50
 
52
51
  utils.createTargetDir(scope)
53
- utils.renderTemplate(utils.join(__dirname, 'BASE'), scope)
54
- utils.renderTemplate(utils.join(__dirname, scope.css), scope)
52
+ utils.renderTemplate(utils.join(import.meta.url, 'BASE'), scope)
53
+ utils.renderTemplate(utils.join(import.meta.url, scope.css), scope)
55
54
 
56
- if (scope.preset.axios) utils.renderTemplate(utils.join(__dirname, 'axios'), scope)
57
- if (scope.preset.i18n) utils.renderTemplate(utils.join(__dirname, 'i18n'), scope)
58
- if (scope.preset.lint) utils.renderTemplate(utils.join(__dirname, 'lint'), scope)
55
+ if (scope.preset.axios) utils.renderTemplate(utils.join(import.meta.url, 'axios'), scope)
56
+ if (scope.preset.i18n) utils.renderTemplate(utils.join(import.meta.url, 'i18n'), scope)
57
+ if (scope.preset.lint) utils.renderTemplate(utils.join(import.meta.url, 'lint'), scope)
59
58
 
60
- if (scope.preset.pinia) utils.renderTemplate(utils.join(__dirname, 'pinia'), scope)
61
- else if (scope.preset.vuex) utils.renderTemplate(utils.join(__dirname, 'vuex'), scope)
59
+ if (scope.preset.pinia) utils.renderTemplate(utils.join(import.meta.url, 'pinia'), scope)
60
+ else if (scope.preset.vuex) utils.renderTemplate(utils.join(import.meta.url, 'vuex'), scope)
62
61
  }
@@ -11,8 +11,7 @@ module.exports = {
11
11
  },
12
12
 
13
13
  env: {
14
- browser: true,
15
- 'vue/setup-compiler-macros': true
14
+ browser: true
16
15
  },
17
16
 
18
17
  // Rules order is important, please avoid shuffling them
@@ -78,6 +77,7 @@ module.exports = {
78
77
  'import/no-unresolved': 'off',
79
78
  'import/no-extraneous-dependencies': 'off',
80
79
  <% } else if (lintConfig === 'airbnb') { %>
80
+ 'no-plusplus': 'off',
81
81
  'no-param-reassign': 'off',
82
82
  'no-void': 'off',
83
83
  'no-nested-ternary': 'off',
@@ -56,7 +56,7 @@
56
56
  "last 5 Opera versions"
57
57
  ],
58
58
  "engines": {
59
- "node": "^24 || ^22 || ^20 || ^18 || ^16",
59
+ "node": "^24 || ^22 || ^20 || ^18",
60
60
  "npm": ">= 6.13.4",
61
61
  "yarn": ">= 1.21.1"
62
62
  }
@@ -1,4 +1,3 @@
1
-
2
1
  const routes = [
3
2
  {
4
3
  path: '/',
@@ -1,5 +1,4 @@
1
-
2
- module.exports = async function ({ scope, utils }) {
1
+ export async function script ({ scope, utils }) {
3
2
  await utils.prompts(scope, [
4
3
  {
5
4
  type: 'select',
@@ -17,11 +16,11 @@ module.exports = async function ({ scope, utils }) {
17
16
  name: 'preset',
18
17
  message: 'Check the features needed for your project:',
19
18
  choices: [
20
- { title: 'ESLint', value: 'lint', description: 'recommended', selected: true },
19
+ { title: 'Linting (ESLint)', value: 'lint', description: 'recommended', selected: true },
21
20
  { title: 'State Management (Pinia)', value: 'pinia', description: 'https://pinia.vuejs.org' },
22
21
  { title: 'State Management (Vuex) [DEPRECATED by Vue Team]', value: 'vuex', description: 'See https://vuejs.org/guide/scaling-up/state-management.html#pinia' },
23
- { title: 'Axios', value: 'axios' },
24
- { title: 'Vue-i18n', value: 'i18n' }
22
+ { title: 'axios', value: 'axios' },
23
+ { title: 'vue-i18n', value: 'i18n' }
25
24
  ],
26
25
  format: values => {
27
26
  let result = values
@@ -38,7 +37,7 @@ module.exports = async function ({ scope, utils }) {
38
37
  }
39
38
  },
40
39
  {
41
- type: (_, { preset }) => preset.lint ? 'select' : null,
40
+ type: (_, { preset }) => (preset.lint ? 'select' : null),
42
41
  name: 'lintConfig',
43
42
  message: 'Pick an ESLint preset:',
44
43
  choices: [
@@ -50,13 +49,13 @@ module.exports = async function ({ scope, utils }) {
50
49
  ])
51
50
 
52
51
  utils.createTargetDir(scope)
53
- utils.renderTemplate(utils.join(__dirname, 'BASE'), scope)
54
- utils.renderTemplate(utils.join(__dirname, scope.css), scope)
52
+ utils.renderTemplate(utils.join(import.meta.url, 'BASE'), scope)
53
+ utils.renderTemplate(utils.join(import.meta.url, scope.css), scope)
55
54
 
56
- if (scope.preset.axios) utils.renderTemplate(utils.join(__dirname, 'axios'), scope)
57
- if (scope.preset.i18n) utils.renderTemplate(utils.join(__dirname, 'i18n'), scope)
58
- if (scope.preset.lint) utils.renderTemplate(utils.join(__dirname, 'lint'), scope)
55
+ if (scope.preset.axios) utils.renderTemplate(utils.join(import.meta.url, 'axios'), scope)
56
+ if (scope.preset.i18n) utils.renderTemplate(utils.join(import.meta.url, 'i18n'), scope)
57
+ if (scope.preset.lint) utils.renderTemplate(utils.join(import.meta.url, 'lint'), scope)
59
58
 
60
- if (scope.preset.pinia) utils.renderTemplate(utils.join(__dirname, 'pinia'), scope)
61
- else if (scope.preset.vuex) utils.renderTemplate(utils.join(__dirname, 'vuex'), scope)
59
+ if (scope.preset.pinia) utils.renderTemplate(utils.join(import.meta.url, 'pinia'), scope)
60
+ else if (scope.preset.vuex) utils.renderTemplate(utils.join(import.meta.url, 'vuex'), scope)
62
61
  }
@@ -11,8 +11,7 @@ module.exports = {
11
11
  },
12
12
 
13
13
  env: {
14
- browser: true,
15
- 'vue/setup-compiler-macros': true
14
+ browser: true
16
15
  },
17
16
 
18
17
  // Rules order is important, please avoid shuffling them
@@ -78,6 +77,7 @@ module.exports = {
78
77
  'import/no-unresolved': 'off',
79
78
  'import/no-extraneous-dependencies': 'off',
80
79
  <% } else if (lintConfig === 'airbnb') { %>
80
+ 'no-plusplus': 'off',
81
81
  'no-param-reassign': 'off',
82
82
  'no-void': 'off',
83
83
  'no-nested-ternary': 'off',
@@ -28,6 +28,8 @@
28
28
  <% if (preset.lint) { %>
29
29
  "@typescript-eslint/eslint-plugin": "^5.10.0",
30
30
  "@typescript-eslint/parser": "^5.10.0",
31
+ "vite-plugin-checker": "^0.6.4",
32
+ "vue-tsc": "^1.8.22",
31
33
  "eslint": "^8.11.0",
32
34
  "eslint-plugin-vue": "^9.0.0",
33
35
  <% if (lintConfig === 'standard') { %>
@@ -44,7 +46,7 @@
44
46
  <% } } %>
45
47
  "@types/node": "^12.20.21",
46
48
  <% if (preset.i18n) { %>"@intlify/vite-plugin-vue-i18n": "^3.3.1",<% } %>
47
- "@quasar/app-vite": "^1.4.3",
49
+ "@quasar/app-vite": "^1.8.0",
48
50
  "autoprefixer": "^10.4.2",
49
51
  "typescript": "^4.5.4"
50
52
  },
@@ -16,15 +16,6 @@ const { configure } = require('quasar/wrappers');
16
16
 
17
17
  module.exports = configure(function (/* ctx */) {
18
18
  return {
19
- <% if (preset.lint) { %>eslint: {
20
- // fix: true,
21
- // include: [],
22
- // exclude: [],
23
- // rawOptions: {},
24
- warnings: true,
25
- errors: true
26
- },<% } %>
27
-
28
19
  // https://v2.quasar.dev/quasar-cli-vite/prefetch-feature
29
20
  // preFetch: true,
30
21
 
@@ -81,7 +72,7 @@ module.exports = configure(function (/* ctx */) {
81
72
  // extendViteConf (viteConf) {},
82
73
  // viteVuePluginOptions: {},
83
74
 
84
- <% if (preset.i18n) { %>vitePlugins: [
75
+ <% if (preset.i18n || preset.lint) { %>vitePlugins: [<% if (preset.i18n) { %>
85
76
  ['@intlify/vite-plugin-vue-i18n', {
86
77
  // if you want to use Vue I18n Legacy API, you need to set `compositionOnly: false`
87
78
  // compositionOnly: false,
@@ -92,10 +83,18 @@ module.exports = configure(function (/* ctx */) {
92
83
 
93
84
  // you need to set i18n resource including paths !
94
85
  include: path.resolve(__dirname, './src/i18n/**')
95
- }]
86
+ }]<% } %><% if (preset.lint) { %><% if (preset.i18n) { %>,<% } %>
87
+ ['vite-plugin-checker', {
88
+ vueTsc: {
89
+ tsconfigPath: 'tsconfig.vue-tsc.json'
90
+ },
91
+ eslint: {
92
+ lintCommand: 'eslint "./**/*.{js,ts,mjs,cjs,vue}"'
93
+ }
94
+ }, { server: false }]<% } %>
96
95
  ]<% } else { %>
97
96
  // vitePlugins: [
98
- // [ 'package-name', { ..options.. } ]
97
+ // [ 'package-name', { ..pluginOptions.. }, { server: true, client: true } ]
99
98
  // ]<% } %>
100
99
  },
101
100
 
@@ -1,5 +1,4 @@
1
-
2
- module.exports = async function ({ scope, utils }) {
1
+ export async function script ({ scope, utils }) {
3
2
  await utils.prompts(scope, [
4
3
  {
5
4
  type: 'select',
@@ -7,8 +6,8 @@ module.exports = async function ({ scope, utils }) {
7
6
  message: 'Pick a Vue component style:',
8
7
  initial: 0,
9
8
  choices: [
10
- { title: 'Composition API', value: 'composition', description: 'recommended' },
11
9
  { title: 'Composition API with <script setup>', value: 'composition-setup', description: 'recommended' },
10
+ { title: 'Composition API', value: 'composition', description: 'recommended' },
12
11
  { title: 'Options API', value: 'options' },
13
12
  { title: 'Class-based', value: 'class', description: 'DEPRECATED; see https://github.com/quasarframework/quasar/discussions/11204', disabled: true }
14
13
  ]
@@ -29,11 +28,11 @@ module.exports = async function ({ scope, utils }) {
29
28
  name: 'preset',
30
29
  message: 'Check the features needed for your project:',
31
30
  choices: [
32
- { title: 'ESLint', value: 'lint', description: 'recommended', selected: true },
31
+ { title: 'Linting (vite-plugin-checker + ESLint + vue-tsc)', value: 'lint', description: 'recommended', selected: true },
33
32
  { title: 'State Management (Pinia)', value: 'pinia', description: 'https://pinia.vuejs.org' },
34
33
  { title: 'State Management (Vuex) [DEPRECATED by Vue Team]', value: 'vuex', description: 'See https://vuejs.org/guide/scaling-up/state-management.html#pinia' },
35
- { title: 'Axios', value: 'axios' },
36
- { title: 'Vue-i18n', value: 'i18n' }
34
+ { title: 'axios', value: 'axios' },
35
+ { title: 'vue-i18n', value: 'i18n' }
37
36
  ],
38
37
  format: values => {
39
38
  let result = values
@@ -50,7 +49,7 @@ module.exports = async function ({ scope, utils }) {
50
49
  }
51
50
  },
52
51
  {
53
- type: (_, { preset }) => preset.lint ? 'select' : null,
52
+ type: (_, { preset }) => (preset.lint ? 'select' : null),
54
53
  name: 'lintConfig',
55
54
  message: 'Pick an ESLint preset:',
56
55
  choices: [
@@ -62,18 +61,18 @@ module.exports = async function ({ scope, utils }) {
62
61
  ])
63
62
 
64
63
  utils.createTargetDir(scope)
65
- utils.renderTemplate(utils.join(__dirname, 'BASE'), scope)
66
- utils.renderTemplate(utils.join(__dirname, scope.css), scope)
64
+ utils.renderTemplate(utils.join(import.meta.url, 'BASE'), scope)
65
+ utils.renderTemplate(utils.join(import.meta.url, scope.css), scope)
67
66
 
68
- if (scope.preset.axios) utils.renderTemplate(utils.join(__dirname, 'axios'), scope)
69
- if (scope.preset.i18n) utils.renderTemplate(utils.join(__dirname, 'i18n'), scope)
67
+ if (scope.preset.axios) utils.renderTemplate(utils.join(import.meta.url, 'axios'), scope)
68
+ if (scope.preset.i18n) utils.renderTemplate(utils.join(import.meta.url, 'i18n'), scope)
70
69
  if (scope.preset.lint) {
71
- utils.renderTemplate(utils.join(__dirname, 'lint'), scope)
70
+ utils.renderTemplate(utils.join(import.meta.url, 'lint'), scope)
72
71
  if (scope.lintConfig === 'prettier') {
73
- utils.renderTemplate(utils.join(__dirname, 'prettier'), scope)
72
+ utils.renderTemplate(utils.join(import.meta.url, 'prettier'), scope)
74
73
  }
75
74
  }
76
75
 
77
- if (scope.preset.pinia) utils.renderTemplate(utils.join(__dirname, 'pinia'), scope)
78
- else if (scope.preset.vuex) utils.renderTemplate(utils.join(__dirname, 'vuex'), scope)
76
+ if (scope.preset.pinia) utils.renderTemplate(utils.join(import.meta.url, 'pinia'), scope)
77
+ else if (scope.preset.vuex) utils.renderTemplate(utils.join(import.meta.url, 'vuex'), scope)
79
78
  }
@@ -4,5 +4,4 @@
4
4
  /.quasar
5
5
  /node_modules
6
6
  .eslintrc.cjs
7
- /src-ssr
8
7
  /quasar.config.*.temporary.compiled*
@@ -15,8 +15,7 @@ module.exports = {
15
15
  env: {
16
16
  browser: true,
17
17
  es2021: true,
18
- node: true,
19
- 'vue/setup-compiler-macros': true
18
+ node: true
20
19
  },
21
20
 
22
21
  // Rules order is important, please avoid shuffling them
@@ -92,6 +91,7 @@ module.exports = {
92
91
  // does not work with type definitions
93
92
  'import/named': 'off',
94
93
  <% } else if (lintConfig === 'airbnb') { %>
94
+ 'no-plusplus': 'off',
95
95
  'no-param-reassign': 'off',
96
96
  'no-void': 'off',
97
97
  'no-nested-ternary': 'off',
@@ -0,0 +1,6 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "skipLibCheck": true
5
+ }
6
+ }
@@ -29,6 +29,8 @@
29
29
  <% if (preset.lint) { %>
30
30
  "@typescript-eslint/eslint-plugin": "^6.6.0",
31
31
  "@typescript-eslint/parser": "^6.6.0",
32
+ "vite-plugin-checker": "^0.6.4",
33
+ "vue-tsc": "^1.8.22",
32
34
  "eslint": "^8.11.0",
33
35
  "eslint-plugin-vue": "^9.0.0",
34
36
  <% if (lintConfig === 'standard') { %>
@@ -45,9 +47,9 @@
45
47
  <% } } %>
46
48
  "@types/node": "^20.5.9",
47
49
  <% if (preset.i18n) { %>"@intlify/unplugin-vue-i18n": "^2.0.0",<% } %>
48
- "@quasar/app-vite": "^2.0.0-beta.1",
50
+ "@quasar/app-vite": "^2.0.0-beta.5",
49
51
  "autoprefixer": "^10.4.2",
50
- "typescript": "^5.2.2"
52
+ "typescript": "~5.3.0"
51
53
  },
52
54
  "engines": {
53
55
  "node": "^24 || ^22 || ^20 || ^18",
@@ -11,16 +11,6 @@ import { configure } from 'quasar/wrappers';
11
11
 
12
12
  export default configure((<% if (preset.i18n) { %>ctx<% } else { %>/* ctx */<% } %>) => {
13
13
  return {
14
- <% if (preset.lint) { %>eslint: {
15
- // fix: true,
16
- // include: [],
17
- // exclude: [],
18
- // cache: false,
19
- // rawOptions: {},
20
- warnings: true,
21
- errors: true
22
- },<% } %>
23
-
24
14
  // https://v2.quasar.dev/quasar-cli-vite/prefetch-feature
25
15
  // preFetch: true,
26
16
 
@@ -77,7 +67,7 @@ export default configure((<% if (preset.i18n) { %>ctx<% } else { %>/* ctx */<% }
77
67
  // extendViteConf (viteConf) {},
78
68
  // viteVuePluginOptions: {},
79
69
 
80
- <% if (preset.i18n) { %>vitePlugins: [
70
+ <% if (preset.i18n || preset.lint) { %>vitePlugins: [<% if (preset.i18n) { %>
81
71
  ['@intlify/unplugin-vue-i18n/vite', {
82
72
  // if you want to use Vue I18n Legacy API, you need to set `compositionOnly: false`
83
73
  // compositionOnly: false,
@@ -90,10 +80,18 @@ export default configure((<% if (preset.i18n) { %>ctx<% } else { %>/* ctx */<% }
90
80
 
91
81
  // you need to set i18n resource including paths !
92
82
  include: [ fileURLToPath(new URL('./src/i18n', import.meta.url)) ],
93
- }]
83
+ }]<% } %><% if (preset.lint) { %><% if (preset.i18n) { %>,<% } %>
84
+ ['vite-plugin-checker', {
85
+ vueTsc: {
86
+ tsconfigPath: 'tsconfig.vue-tsc.json'
87
+ },
88
+ eslint: {
89
+ lintCommand: 'eslint "./**/*.{js,ts,mjs,cjs,vue}"'
90
+ }
91
+ }, { server: false }]<% } %>
94
92
  ]<% } else { %>
95
93
  // vitePlugins: [
96
- // [ 'package-name', { ..options.. } ]
94
+ // [ 'package-name', { ..pluginOptions.. }, { server: true, client: true } ]
97
95
  // ]<% } %>
98
96
  },
99
97
 
@@ -1,5 +1,4 @@
1
-
2
- module.exports = async function ({ scope, utils }) {
1
+ export async function script ({ scope, utils }) {
3
2
  await utils.prompts(scope, [
4
3
  {
5
4
  type: 'select',
@@ -7,8 +6,8 @@ module.exports = async function ({ scope, utils }) {
7
6
  message: 'Pick a Vue component style:',
8
7
  initial: 0,
9
8
  choices: [
10
- { title: 'Composition API', value: 'composition', description: 'recommended' },
11
9
  { title: 'Composition API with <script setup>', value: 'composition-setup', description: 'recommended' },
10
+ { title: 'Composition API', value: 'composition', description: 'recommended' },
12
11
  { title: 'Options API', value: 'options' },
13
12
  { title: 'Class-based', value: 'class', description: 'DEPRECATED; see https://github.com/quasarframework/quasar/discussions/11204', disabled: true }
14
13
  ]
@@ -29,11 +28,11 @@ module.exports = async function ({ scope, utils }) {
29
28
  name: 'preset',
30
29
  message: 'Check the features needed for your project:',
31
30
  choices: [
32
- { title: 'ESLint', value: 'lint', description: 'recommended', selected: true },
31
+ { title: 'Linting (vite-plugin-checker + ESLint + vue-tsc)', value: 'lint', description: 'recommended', selected: true },
33
32
  { title: 'State Management (Pinia)', value: 'pinia', description: 'https://pinia.vuejs.org' },
34
33
  { title: 'State Management (Vuex) [DEPRECATED by Vue Team]', value: 'vuex', description: 'See https://vuejs.org/guide/scaling-up/state-management.html#pinia' },
35
- { title: 'Axios', value: 'axios' },
36
- { title: 'Vue-i18n', value: 'i18n' }
34
+ { title: 'axios', value: 'axios' },
35
+ { title: 'vue-i18n', value: 'i18n' }
37
36
  ],
38
37
  format: values => {
39
38
  let result = values
@@ -50,7 +49,7 @@ module.exports = async function ({ scope, utils }) {
50
49
  }
51
50
  },
52
51
  {
53
- type: (_, { preset }) => preset.lint ? 'select' : null,
52
+ type: (_, { preset }) => (preset.lint ? 'select' : null),
54
53
  name: 'lintConfig',
55
54
  message: 'Pick an ESLint preset:',
56
55
  choices: [
@@ -62,18 +61,18 @@ module.exports = async function ({ scope, utils }) {
62
61
  ])
63
62
 
64
63
  utils.createTargetDir(scope)
65
- utils.renderTemplate(utils.join(__dirname, 'BASE'), scope)
66
- utils.renderTemplate(utils.join(__dirname, scope.css), scope)
64
+ utils.renderTemplate(utils.join(import.meta.url, 'BASE'), scope)
65
+ utils.renderTemplate(utils.join(import.meta.url, scope.css), scope)
67
66
 
68
- if (scope.preset.axios) utils.renderTemplate(utils.join(__dirname, 'axios'), scope)
69
- if (scope.preset.i18n) utils.renderTemplate(utils.join(__dirname, 'i18n'), scope)
67
+ if (scope.preset.axios) utils.renderTemplate(utils.join(import.meta.url, 'axios'), scope)
68
+ if (scope.preset.i18n) utils.renderTemplate(utils.join(import.meta.url, 'i18n'), scope)
70
69
  if (scope.preset.lint) {
71
- utils.renderTemplate(utils.join(__dirname, 'lint'), scope)
70
+ utils.renderTemplate(utils.join(import.meta.url, 'lint'), scope)
72
71
  if (scope.lintConfig === 'prettier') {
73
- utils.renderTemplate(utils.join(__dirname, 'prettier'), scope)
72
+ utils.renderTemplate(utils.join(import.meta.url, 'prettier'), scope)
74
73
  }
75
74
  }
76
75
 
77
- if (scope.preset.pinia) utils.renderTemplate(utils.join(__dirname, 'pinia'), scope)
78
- else if (scope.preset.vuex) utils.renderTemplate(utils.join(__dirname, 'vuex'), scope)
76
+ if (scope.preset.pinia) utils.renderTemplate(utils.join(import.meta.url, 'pinia'), scope)
77
+ else if (scope.preset.vuex) utils.renderTemplate(utils.join(import.meta.url, 'vuex'), scope)
79
78
  }
@@ -4,5 +4,4 @@
4
4
  /.quasar
5
5
  /node_modules
6
6
  .eslintrc.cjs
7
- /src-ssr
8
7
  /quasar.config.*.temporary.compiled*
@@ -15,8 +15,7 @@ module.exports = {
15
15
  env: {
16
16
  browser: true,
17
17
  es2021: true,
18
- node: true,
19
- 'vue/setup-compiler-macros': true
18
+ node: true
20
19
  },
21
20
 
22
21
  // Rules order is important, please avoid shuffling them
@@ -92,6 +91,7 @@ module.exports = {
92
91
  // does not work with type definitions
93
92
  'import/named': 'off',
94
93
  <% } else if (lintConfig === 'airbnb') { %>
94
+ 'no-plusplus': 'off',
95
95
  'no-param-reassign': 'off',
96
96
  'no-void': 'off',
97
97
  'no-nested-ternary': 'off',
@@ -0,0 +1,6 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "skipLibCheck": true
5
+ }
6
+ }
@@ -1,5 +1,4 @@
1
-
2
- module.exports = async function ({ scope, utils }) {
1
+ export async function script ({ scope, utils }) {
3
2
  await utils.prompts(scope, [
4
3
  {
5
4
  type: 'select',
@@ -7,8 +6,8 @@ module.exports = async function ({ scope, utils }) {
7
6
  message: 'Pick a Vue component style:',
8
7
  initial: 0,
9
8
  choices: [
10
- { title: 'Composition API', value: 'composition', description: 'recommended' },
11
9
  { title: 'Composition API with <script setup>', value: 'composition-setup', description: 'recommended' },
10
+ { title: 'Composition API', value: 'composition', description: 'recommended' },
12
11
  { title: 'Options API', value: 'options' },
13
12
  { title: 'Class-based (DEPRECATED; see https://github.com/quasarframework/quasar/discussions/11204)', value: 'class', disabled: true }
14
13
  ]
@@ -29,11 +28,11 @@ module.exports = async function ({ scope, utils }) {
29
28
  name: 'preset',
30
29
  message: 'Check the features needed for your project:',
31
30
  choices: [
32
- { title: 'ESLint', value: 'lint', description: 'recommended', selected: true },
31
+ { title: 'Linting (ESLint)', value: 'lint', description: 'recommended', selected: true },
33
32
  { title: 'State Management (Pinia)', value: 'pinia', description: 'https://pinia.vuejs.org' },
34
33
  { title: 'State Management (Vuex) [DEPRECATED by Vue Team]', value: 'vuex', description: 'See https://vuejs.org/guide/scaling-up/state-management.html#pinia' },
35
- { title: 'Axios', value: 'axios' },
36
- { title: 'Vue-i18n', value: 'i18n' }
34
+ { title: 'axios', value: 'axios' },
35
+ { title: 'vue-i18n', value: 'i18n' }
37
36
  ],
38
37
  format: values => {
39
38
  let result = values
@@ -50,7 +49,7 @@ module.exports = async function ({ scope, utils }) {
50
49
  }
51
50
  },
52
51
  {
53
- type: (_, { preset }) => preset.lint ? 'select' : null,
52
+ type: (_, { preset }) => (preset.lint ? 'select' : null),
54
53
  name: 'lintConfig',
55
54
  message: 'Pick an ESLint preset:',
56
55
  choices: [
@@ -62,18 +61,18 @@ module.exports = async function ({ scope, utils }) {
62
61
  ])
63
62
 
64
63
  utils.createTargetDir(scope)
65
- utils.renderTemplate(utils.join(__dirname, 'BASE'), scope)
66
- utils.renderTemplate(utils.join(__dirname, scope.css), scope)
64
+ utils.renderTemplate(utils.join(import.meta.url, 'BASE'), scope)
65
+ utils.renderTemplate(utils.join(import.meta.url, scope.css), scope)
67
66
 
68
- if (scope.preset.axios) utils.renderTemplate(utils.join(__dirname, 'axios'), scope)
69
- if (scope.preset.i18n) utils.renderTemplate(utils.join(__dirname, 'i18n'), scope)
67
+ if (scope.preset.axios) utils.renderTemplate(utils.join(import.meta.url, 'axios'), scope)
68
+ if (scope.preset.i18n) utils.renderTemplate(utils.join(import.meta.url, 'i18n'), scope)
70
69
  if (scope.preset.lint) {
71
- utils.renderTemplate(utils.join(__dirname, 'lint'), scope)
70
+ utils.renderTemplate(utils.join(import.meta.url, 'lint'), scope)
72
71
  if (scope.lintConfig === 'prettier') {
73
- utils.renderTemplate(utils.join(__dirname, 'prettier'), scope)
72
+ utils.renderTemplate(utils.join(import.meta.url, 'prettier'), scope)
74
73
  }
75
74
  }
76
75
 
77
- if (scope.preset.pinia) utils.renderTemplate(utils.join(__dirname, 'pinia'), scope)
78
- else if (scope.preset.vuex) utils.renderTemplate(utils.join(__dirname, 'vuex'), scope)
76
+ if (scope.preset.pinia) utils.renderTemplate(utils.join(import.meta.url, 'pinia'), scope)
77
+ else if (scope.preset.vuex) utils.renderTemplate(utils.join(import.meta.url, 'vuex'), scope)
79
78
  }