Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

13 changes: 0 additions & 13 deletions .eslintrc.cjs

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ ui/.vscode/
node_modules/
yarn.lock
package-lock.json

.eslintcache
16 changes: 6 additions & 10 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,15 @@
"eslint.format.enable": false,
"editor.formatOnSave": false,
"eslint.workingDirectories": [
"./app-vite",
"./app-webpack",
"./cli",
"./create-quasar",
"./docs",
"./ui",
"./utils/render-ssr-error",
"./utils/ssl-certificate",
"./vite-plugin"
{ "mode": "auto" }
],
"editor.tabSize": 2,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"eslint.validate": ["javascript", "vue"]
"eslint.validate": ["javascript", "vue"],

"search.exclude": {
"**/dist": true,
}
}
1 change: 0 additions & 1 deletion app-vite/.eslintignore

This file was deleted.

54 changes: 0 additions & 54 deletions app-vite/.eslintrc.cjs

This file was deleted.

79 changes: 79 additions & 0 deletions app-vite/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
// eslint-disable-next-line n/no-extraneous-import
import eslintJs from '@eslint/js'
import quasar from 'eslint-config-quasar'
// eslint-disable-next-line n/no-extraneous-import
import globals from 'globals'

/** @type {import('eslint').Linter.Config[]} */
export default [
{
name: 'eslint/recommended',

...eslintJs.configs.recommended
},

...quasar.configs.base,

{
ignores: [
'templates',
]
},

{
languageOptions: {
sourceType: 'module'
},

rules: {
'no-useless-escape': 'off',
'no-unused-vars': [ 'error', { ignoreRestSiblings: true, argsIgnorePattern: '^_', caughtErrorsIgnorePattern: '^_' } ]
}
},

...[
...quasar.configs.node
].map(({ name: _, ...config }) => ({
...config,
files: [ '**/*.js' ],
ignores: [ 'exports/bex/**/*.js' ]
})),
{
files: [ '**/*.js' ],
ignores: [ 'exports/bex/**/*.js' ],

languageOptions: {
sourceType: 'module',
ecmaVersion: 2022, // needs to be explicitly stated for some reason
// TODO: ^ verify if it's still needed

globals: {
...globals.es2022,
// ...globals.es2023, // node 22 and above
}
},
},

{
files: [ '**/*.cjs' ],
languageOptions: {
parserOptions: {
sourceType: 'commonjs',
ecmaVersion: 'latest'
}
}
},

{
files: [ 'exports/bex/**/*.js' ],
languageOptions: {
parserOptions: {
ecmaVersion: 'latest',
},
globals: {
...globals.browser,
...globals.webextensions
}
}
}
]
4 changes: 2 additions & 2 deletions app-vite/lib/app-extension/api-classes/InstallAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export class InstallAPI extends BaseAPI {
fs.readFileSync(source, 'utf-8')
)
}
catch (e) {
catch (_) {
warn(`Extension(${ this.extId }): extendPackageJson() - "${ extPkg }" is malformed`)
warn()
process.exit(1)
Expand Down Expand Up @@ -217,7 +217,7 @@ export class InstallAPI extends BaseAPI {
'utf-8'
)
}
catch (e) {
catch (_) {
warn()
warn(`Extension(${ this.extId }): extendJsonFile() - "${ filePath }" doesn't conform to JSON format: this could happen if you are trying to update flavoured JSON files (eg. JSON with Comments or JSON5). Skipping...`)
warn(`Extension(${ this.extId }): extendJsonFile() - The extension tried to apply these updates to "${ filePath }" file: ${ JSON.stringify(newData) }`)
Expand Down
2 changes: 1 addition & 1 deletion app-vite/lib/cmd/info.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function getSpawnOutput (command) {
? green(String(child.output[ 1 ]).trim())
: gray('Not installed')
}
catch (err) {
catch (_) {
return gray('Not installed')
}
}
Expand Down
2 changes: 1 addition & 1 deletion app-vite/lib/modes/capacitor/ensure-consistency.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export async function ensureDeps ({ appPaths, cacheProxy }) {
nodePackager.install({
cwd: appPaths.capacitorDir,
// See https://github.com/orgs/pnpm/discussions/4735
params: nodePackager.name === 'pnpm' ? ['i', '--ignore-workspace'] : undefined,
params: nodePackager.name === 'pnpm' ? [ 'i', '--ignore-workspace' ] : undefined,
displayName: 'Capacitor'
})
}
Expand Down
4 changes: 2 additions & 2 deletions app-vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"url": "https://donate.quasar.dev"
},
"scripts": {
"lint": "eslint --ext .js,.cjs ./ --fix --report-unused-disable-directives"
"lint": "eslint --cache --fix"
},
"dependencies": {
"@quasar/render-ssr-error": "workspace:^",
Expand Down Expand Up @@ -123,7 +123,7 @@
"devDependencies": {
"@electron/packager": "^18.3.5",
"electron-builder": "^24.13.3",
"eslint": "^8.57.1",
"eslint": "catalog:",
"eslint-config-quasar": "workspace:*",
"pinia": "^3.0.1",
"quasar": "workspace:^",
Expand Down
1 change: 0 additions & 1 deletion app-webpack/.eslintignore

This file was deleted.

55 changes: 0 additions & 55 deletions app-webpack/.eslintrc.cjs

This file was deleted.

81 changes: 81 additions & 0 deletions app-webpack/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
import eslintJs from '@eslint/js'
import quasar from 'eslint-config-quasar'
import globals from 'globals'

/** @type {import('eslint').Linter.Config[]} */
export default [
{
name: 'eslint/recommended',

...eslintJs.configs.recommended
},

...quasar.configs.base,

{
name: 'custom/ignores',

ignores: [
'templates',
]
},

{
name: 'custom',

rules: {
'no-useless-escape': 'off',
'no-unused-vars': [ 'error', { ignoreRestSiblings: true, argsIgnorePattern: '^_', caughtErrorsIgnorePattern: '^_' } ]
}
},

...[
...quasar.configs.node
].map(config => ({
...config,
files: [ '**/*.js' ]
})),
{
name: 'custom/node',
files: [ '**/*.js' ],

languageOptions: {
sourceType: 'commonjs',
ecmaVersion: 2022, // needs to be explicitly stated for some reason
// TODO: ^ verify if it's still needed

globals: {
...globals.es2022,
// ...globals.es2023, // node 22 and above
}
},
},

{
name: 'custom/mjs',
files: [ '**/*.mjs' ],

languageOptions: {
parserOptions: {
sourceType: 'module',
ecmaVersion: 'latest'
}
}
},

{
name: 'custom/bex',
files: [ 'exports/bex/**/*.mjs' ],

languageOptions: {
parserOptions: {
sourceType: 'module',
ecmaVersion: 'latest',
},
globals: {
...globals.browser,
...globals.webextensions
}
}
}
]
4 changes: 2 additions & 2 deletions app-webpack/lib/app-extension/api-classes/InstallAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ module.exports.InstallAPI = class InstallAPI extends BaseAPI {
fs.readFileSync(source, 'utf-8')
)
}
catch (e) {
catch (_) {
warn(`Extension(${ this.extId }): extendPackageJson() - "${ extPkg }" is malformed`)
warn()
process.exit(1)
Expand Down Expand Up @@ -221,7 +221,7 @@ module.exports.InstallAPI = class InstallAPI extends BaseAPI {
'utf-8'
)
}
catch (e) {
catch (_) {
warn()
warn(`Extension(${ this.extId }): extendJsonFile() - "${ filePath }" doesn't conform to JSON format: this could happen if you are trying to update flavoured JSON files (eg. JSON with Comments or JSON5). Skipping...`)
warn(`Extension(${ this.extId }): extendJsonFile() - The extension tried to apply these updates to "${ filePath }" file: ${ JSON.stringify(newData) }`)
Expand Down
Loading
Loading