diff --git a/eslint.config.mjs b/eslint.config.mjs index 60c36d246..cc66087a6 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,14 +1,17 @@ import js from '@eslint/js' +import { defineConfig, globalIgnores } from "eslint/config"; import vue from 'eslint-plugin-vue' import globals from 'globals' -export default [ +export default defineConfig([ ...vue.configs['flat/recommended'], - js.configs.recommended, + globalIgnores([ + '**/*.js', 'build/', 'dist/', 'config/', + ]), { - files: ['**/*.js', '**/*.mjs', '**/*.vue'], - ignores: ['build/*.js', 'config/*.js'], - + files: ['src/**/*.vue'], + plugins: { js }, + extends: ['js/recommended'], languageOptions: { ecmaVersion: 2024, sourceType: 'module', @@ -26,11 +29,8 @@ export default [ }, rules: { - 'arrow-parens': 0, - 'generator-star-spacing': 0, - 'no-debugger': 0, 'vue/require-prop-types': 0, 'vue/multi-word-component-names': 0, }, - }, -] + } +]) diff --git a/package.json b/package.json index b6f16bd60..42a528304 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pleroma_fe", - "version": "2.9.3", + "version": "2.10.0", "description": "Pleroma frontend, the default frontend of Pleroma social network server", "author": "Pleroma contributors ", "private": false, @@ -13,8 +13,8 @@ "e2e": "node test/e2e/runner.js", "test": "yarn run unit && yarn run e2e", "stylelint": "yarn exec stylelint '**/*.scss' '**/*.vue'", - "lint": "eslint src test/unit/specs test/e2e/specs", - "lint-fix": "eslint --fix src test/unit/specs test/e2e/specs" + "lint": "yarn exec eslint src", + "lint-fix": "yarn eslint --fix src test/unit/specs test/e2e/specs" }, "dependencies": { "@babel/runtime": "7.28.4", diff --git a/src/components/mention_link/mention_link.js b/src/components/mention_link/mention_link.js index ee35ce88b..24820331e 100644 --- a/src/components/mention_link/mention_link.js +++ b/src/components/mention_link/mention_link.js @@ -105,14 +105,12 @@ const MentionLink = { }, style() { if (this.highlight) { - /* eslint-disable no-unused-vars */ const { backgroundColor, backgroundPosition, backgroundImage, ...rest } = highlightStyle(this.highlight) - /* eslint-enable no-unused-vars */ return rest } }, diff --git a/src/components/status/status.js b/src/components/status/status.js index 206d25aae..aa7a0efb4 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -445,7 +445,6 @@ const Status = { return uniqBy(combinedUsers, 'id') }, tags() { - // eslint-disable-next-line no-prototype-builtins return this.status.tags .filter((tagObj) => Object.hasOwn(tagObj, 'name')) .map((tagObj) => tagObj.name) diff --git a/src/modules/notifications.js b/src/modules/notifications.js index 6c1cb33c3..eec335419 100644 --- a/src/modules/notifications.js +++ b/src/modules/notifications.js @@ -113,7 +113,6 @@ export const notifications = { } // Only add a new notification if we don't have one for the same action - // eslint-disable-next-line no-prototype-builtins if (!Object.hasOwn(state.idStore, notification.id)) { commit('updateNotificationsMinMaxId', notification.id) commit('addNewNotifications', { notifications: [notification] }) diff --git a/src/stores/serverSideStorage.js b/src/stores/serverSideStorage.js index 5e269cd75..18d3fa4ee 100644 --- a/src/stores/serverSideStorage.js +++ b/src/stores/serverSideStorage.js @@ -591,10 +591,8 @@ export const useServerSideStorageStore = defineStore('serverSideStorage', { if (!needUpload && recent && stale) { console.debug('Checking if data needs merging...') // discarding timestamps and versions - /* eslint-disable no-unused-vars */ const { _timestamp: _0, _version: _1, ...recentData } = recent const { _timestamp: _2, _version: _3, ...staleData } = stale - /* eslint-enable no-unused-vars */ dirty = !isEqual(recentData, staleData) console.debug(`Data ${dirty ? 'needs' : "doesn't need"} merging`) } diff --git a/test/unit/specs/boot/routes.spec.js b/test/unit/specs/boot/routes.spec.js index 0cc9121a4..83cc37e7d 100644 --- a/test/unit/specs/boot/routes.spec.js +++ b/test/unit/specs/boot/routes.spec.js @@ -19,7 +19,6 @@ describe('routes', () => { const matchedComponents = router.currentRoute.value.matched - // eslint-disable-next-line no-prototype-builtins expect( Object.hasOwn( matchedComponents[0].components.default.components, @@ -33,7 +32,6 @@ describe('routes', () => { const matchedComponents = router.currentRoute.value.matched - // eslint-disable-next-line no-prototype-builtins expect( Object.hasOwn( matchedComponents[0].components.default.components, @@ -47,7 +45,6 @@ describe('routes', () => { const matchedComponents = router.currentRoute.value.matched - // eslint-disable-next-line no-prototype-builtins expect( Object.hasOwn( matchedComponents[0].components.default.components,