Skip to content

Commit

Permalink
fix(app-ext): Does not work with quasar/app-webpack v4 (release) (#407)
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkeye64 committed Dec 31, 2024
1 parent 8811e4a commit a6f20d6
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 16 deletions.
28 changes: 14 additions & 14 deletions app-extension/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ module.exports = {
parser: '@babel/eslint-parser',
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
sourceType: 'module', // Allows for the use of imports
requireConfigFile: false
requireConfigFile: false,
},

env: {
browser: true,
es6: true
es6: true,
},

// Rules order is important, please avoid shuffling them
Expand All @@ -26,13 +26,13 @@ module.exports = {
// See https://eslint.vuejs.org/rules/#available-rules
// 'plugin:vue/vue3-essential' // Priority A: Essential (Error Prevention)
// 'plugin:vue/vue3-strongly-recommended', // Priority B: Strongly Recommended (Improving Readability)
'plugin:vue/vue3-recommended' // Priority C: Recommended (Minimizing Arbitrary Choices and Cognitive Overhead)
'plugin:vue/vue3-recommended', // Priority C: Recommended (Minimizing Arbitrary Choices and Cognitive Overhead)
],

plugins: [
// https://eslint.vuejs.org/user-guide/#why-doesn-t-it-work-on-vue-file
// required to lint *.vue files
'vue'
'vue',
],

globals: {
Expand All @@ -52,7 +52,7 @@ module.exports = {

// add your custom rules here
rules: {
'brace-style': [ 'error', 'stroustrup', { allowSingleLine: true } ],
'brace-style': ['error', 'stroustrup', { allowSingleLine: true }],
'prefer-const': 'error',
'prefer-promise-reject-errors': 'off',
'multiline-ternary': 'off',
Expand All @@ -64,18 +64,18 @@ module.exports = {
'one-var': 'off',
'no-void': 'off',
'no-lone-blocks': 'error',
'no-unused-expressions': [ 'error', { allowTernary: true, "allowShortCircuit": true } ],
'no-unused-expressions': ['error', { allowTernary: true, allowShortCircuit: true }],
'no-useless-concat': 'error',
'no-useless-return': 'error',
'no-unneeded-ternary': 'error',
'no-confusing-arrow': [ 'error', { allowParens: true } ],
'operator-linebreak': [ 'error', 'before' ],
'no-confusing-arrow': ['error', { allowParens: true }],
'operator-linebreak': ['error', 'before'],
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',

'array-bracket-spacing': [ 'error', 'always', { singleValue: false } ],
'object-curly-spacing': [ 'error', 'always' ],
'computed-property-spacing': [ 'error', 'always' ],
'template-curly-spacing': [ 'error', 'always' ],
// 'array-bracket-spacing': [ 'error', 'always', { singleValue: false } ],
// 'object-curly-spacing': [ 'error', 'always' ],
// 'computed-property-spacing': [ 'error', 'always' ],
// 'template-curly-spacing': [ 'error', 'always' ],

'import/first': 'off',
// 'import/named': 'error',
Expand All @@ -98,6 +98,6 @@ module.exports = {

// allow console.log during production for demo purposes
// 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off'
'no-console': 'off'
}
'no-console': 'off',
},
}
10 changes: 8 additions & 2 deletions app-extension/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,14 @@ function extendConf(conf, api) {

if (api.hasVite !== true) {
// make sure app extension files & ui packages get transpiled
conf.build.transpileDependencies.push(/quasar-app-extension-qmarkdown[\\/]src/)
conf.build.transpileDependencies.push(/quasar-ui-qmarkdown[\\/]src/)
if (Array.isArray(conf.build.webpackTranspileDependencies)) {
conf.build.webpackTranspileDependencies.push(/quasar-app-extension-qmarkdown[\\/]src/)
conf.build.webpackTranspileDependencies.push(/quasar-ui-qmarkdown[\\/]src/)
} else if (Array.isArray(conf.build.transpileDependencies)) {
// fall back (old way)
conf.build.transpileDependencies.push(/quasar-app-extension-qmarkdown[\\/]src/)
conf.build.transpileDependencies.push(/quasar-ui-qmarkdown[\\/]src/)
}
}

// make sure these plugins are in the build
Expand Down

0 comments on commit a6f20d6

Please sign in to comment.