Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
86c0160
chore(deps-dev): bump @nextcloud/eslint-config from 8.4.2 to 9.0.1
dependabot[bot] Aug 18, 2026
5d6c8e6
chore: remove .eslintignore
vitormattos Aug 25, 2026
54da850
chore: update to newest version of eslint-config
vitormattos Aug 25, 2026
ea94787
fix(lint): add ESLint v9 migration baseline
lfals Aug 25, 2026
2d3a934
fix(lint): enable vue/no-dupe-keys
lfals Aug 25, 2026
0659aaa
fix(lint): enable prefer-const
lfals Aug 25, 2026
be95657
fix(lint): enable object-shorthand
lfals Aug 25, 2026
ee148f4
fix(lint): enable no-extra-boolean-cast
lfals Aug 25, 2026
5eaa351
fix(lint): enable vue/no-useless-mustaches
lfals Aug 25, 2026
97790f4
fix(lint): enable vue/no-useless-v-bind
lfals Aug 25, 2026
9a3971f
fix(lint): enable @typescript-eslint/no-empty-object-type
lfals Aug 25, 2026
b63b243
fix(lint): enable no-useless-escape
lfals Aug 25, 2026
8a0bb54
fix(lint): enable package-json/sort-package-json
lfals Aug 25, 2026
71086da
fix(lint): enable prefer-object-has-own
lfals Aug 25, 2026
1760049
fix(lint): enable no-empty
lfals Aug 25, 2026
5f0e5cc
fix(lint): enable no-empty-pattern
lfals Aug 25, 2026
9c79e8e
fix(lint): enable no-unassigned-vars
lfals Aug 25, 2026
1adf00f
fix(lint): enable vue/no-use-v-if-with-v-for
lfals Aug 25, 2026
4206fac
fix(lint): enable vue/no-undef-components
lfals Aug 25, 2026
f7d1a1a
fix(lint): enable no-undef
lfals Aug 25, 2026
c03cc6f
fix(lint): enable no-useless-assignment
lfals Aug 25, 2026
55f060d
fix(lint): enable vue/no-template-shadow
lfals Aug 25, 2026
c32756b
fix(lint): enable vue/require-default-prop
lfals Aug 25, 2026
ac6a452
fix(lint): enable vue/prefer-prop-type-boolean-first
lfals Aug 25, 2026
46afd61
fix(lint): enable vue/prefer-separate-static-class
lfals Aug 25, 2026
0f723a7
fix(lint): enable vue/html-self-closing
lfals Aug 25, 2026
62e936b
fix(lint): enable vue/padding-line-between-blocks
lfals Aug 25, 2026
996514a
fix(lint): enable vue/key-spacing
lfals Aug 25, 2026
729cf66
fix(lint): enable vue/new-line-between-multi-line-property
lfals Aug 25, 2026
d9c111c
fix(lint): enable vue/html-closing-bracket-newline
lfals Aug 25, 2026
ed51a83
fix(lint): enable curly
lfals Aug 25, 2026
759f402
fix(lint): enable vue/no-boolean-default
lfals Aug 25, 2026
e80f671
fix(lint): enable vue/define-macros-order
lfals Aug 25, 2026
80cd488
fix(lint): enable vue/attributes-order
lfals Aug 25, 2026
cd13f19
fix(lint): enable vue/no-unused-refs
lfals Aug 25, 2026
8299f1f
fix(lint): enable @typescript-eslint/no-unused-expressions
lfals Aug 25, 2026
6095188
fix(lint): enable jsdoc/escape-inline-tags
lfals Aug 25, 2026
255bb30
fix(lint): enable jsdoc/no-defaults
lfals Aug 25, 2026
4f62069
fix(lint): enable jsdoc/reject-any-type
lfals Aug 25, 2026
870d870
fix(lint): enable jsdoc/valid-types
lfals Aug 25, 2026
632654d
fix(lint): enable jsdoc/check-tag-names
lfals Aug 25, 2026
cfc5423
fix(lint): enable jsdoc/tag-lines
lfals Aug 25, 2026
a6b6702
fix(lint): enable jsdoc/no-types
lfals Aug 25, 2026
72b2ded
fix(lint): enable @nextcloud/no-deprecated-globals
lfals Aug 25, 2026
7f002f3
docs(lint): document remaining ESLint migration disables
lfals Aug 25, 2026
4d73b21
fix(lint): remove redundant allowOverrideMutable disabled check
lfals Aug 28, 2026
7f3658b
fix(lint): restore default-true boolean prop semantics
lfals Aug 28, 2026
9b3c042
fix(lint): restore Playwright fixture destructuring pattern
lfals Aug 28, 2026
3b04ca5
fix(lint): enable no-console
masterlouis Aug 28, 2026
4537e19
fix(lint): apply PR review fixes for no-empty and no-console
lfals Aug 28, 2026
f3216ba
fix(lint): wrap catch-null calls with Promise.resolve
lfals Aug 28, 2026
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
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

166 changes: 97 additions & 69 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,10 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

import js from '@eslint/js'
import { FlatCompat } from '@eslint/eslintrc'
import nextcloudConfig from '@nextcloud/eslint-config'
import { dirname } from 'node:path'
import { fileURLToPath } from 'node:url'

const compat = new FlatCompat({
baseDirectory: dirname(fileURLToPath(import.meta.url)),
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
})

const compatConfigs = (Array.isArray(nextcloudConfig) ? nextcloudConfig : [nextcloudConfig])
.flatMap((config) => compat.config(config))
import { recommended } from '@nextcloud/eslint-config'

export default [
...compatConfigs,
...recommended,

{
name: 'libresign/ignores',
Expand All @@ -39,61 +26,17 @@ export default [
{
name: 'libresign/config',
rules: {
// production only
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'warn',
// @nextcloud/eslint-config v9 replaced eslint-plugin-import with
// perfectionist/sort-imports and import-extensions; keep only app overrides here.
},
},

{
// Vue plugin is only registered for *.vue files; keep this override scoped.
name: 'libresign/vue-overrides',
files: ['**/*.vue'],
rules: {
'vue/no-unused-components': process.env.NODE_ENV === 'production' ? 'error' : 'warn',
'import/order': [
'error',
{
groups: ['builtin', 'external', 'internal', ['parent', 'sibling', 'index'], 'unknown'],
pathGroups: [
{
// group all style imports at the end
pattern: '{*.css,*.scss}',
patternOptions: { matchBase: true },
group: 'unknown',
position: 'after',
},
{
// group material design icons
pattern: 'vue-material-design-icons/**',
group: 'external',
position: 'after',
},
{
// group @nextcloud imports
pattern: '@nextcloud/{!(vue),!(vue)/**}',
group: 'external',
position: 'after',
},
{
// group @nextcloud/vue imports
pattern: '{@nextcloud/vue,@nextcloud/vue/**}',
group: 'external',
position: 'after',
},
{
// group project components
pattern: '*.vue',
patternOptions: { matchBase: true },
group: 'parent',
position: 'before',
},
],
pathGroupsExcludedImportTypes: ['@nextcloud', 'vue-material-design-icons'],
'newlines-between': 'always',
alphabetize: {
order: 'asc',
caseInsensitive: true,
},
warnOnUnassignedImports: true,
},
],
'import/no-unresolved': ['error', {
// Ignore Webpack query parameters, not supported by eslint-plugin-import
// https://github.com/import-js/eslint-plugin-import/issues/2562
ignore: ['\\?raw$'],
}],
},
},

Expand All @@ -107,4 +50,89 @@ export default [
'no-use-before-define': 'off',
},
},

{
name: 'libresign/playwright-overrides',
files: ['playwright/**/*.ts'],
rules: {
// Playwright fixture callbacks require object destructuring even when unused.
'no-empty-pattern': 'off',
},
},

/**
* Remaining rules intentionally deferred with per-rule reasons (issue #8051 follow-ups).
* Enable one rule at a time: remove it here, fix violations, commit separately.
* Source of truth: https://github.com/LibreSign/libresign/issues/8051
*/
{
name: 'libresign/disabled-during-migration',
rules: {
// Translations — changes user-visible strings
'@nextcloud/l10n-enforce-ellipsis': 'off', // ~6 hits; changes translation strings
'@nextcloud/l10n-non-breaking-space': 'off', // ~6 hits; changes translation strings

// Behavior/API risk — may rename Vue events, slots, attrs, or break DOM contracts
'@nextcloud/no-deprecated-library-props': 'off', // ~10 hits; needs careful Nc* prop migration
'vue/attribute-hyphenation': 'off', // ~404 hits; large + DOM attr naming
'vue/custom-event-name-casing': 'off', // ~65 hits; may rename Vue events
'vue/slot-name-casing': 'off', // ~3 hits; may rename slots
'vue/v-on-event-hyphenation': 'off', // ~74 hits; may rename listeners
'vue/no-v-html': 'off', // ~8 hits; intentional trusted HTML in places
'vue/multi-word-component-names': 'off', // ~18 hits; rename churn for short view names
'camelcase': 'off', // ~9 hits; store fields mirror backend/API keys

// Formatting — large autofix churn; follow-up PR
'@stylistic/arrow-parens': 'off', // ~168 hits
'@stylistic/comma-dangle': 'off', // ~46 hits
'@stylistic/eol-last': 'off', // ~10 hits
'@stylistic/exp-list-style': 'off', // ~34 hits
'@stylistic/function-call-argument-newline': 'off', // ~4 hits
'@stylistic/function-call-spacing': 'off', // ~1 hit
'@stylistic/function-paren-newline': 'off', // ~177 hits
'@stylistic/implicit-arrow-linebreak': 'off', // ~39 hits
'@stylistic/indent': 'off', // ~778 hits; tabs vs spaces migration
'@stylistic/indent-binary-ops': 'off', // ~4 hits
'@stylistic/lines-between-class-members': 'off', // ~1 hit
'@stylistic/max-statements-per-line': 'off', // ~100 hits
'@stylistic/member-delimiter-style': 'off', // ~180 hits
'@stylistic/no-extra-semi': 'off', // ~23 hits
'@stylistic/no-multi-spaces': 'off', // ~1 hit
'@stylistic/no-multiple-empty-lines': 'off', // ~42 hits
'@stylistic/no-tabs': 'off', // ~190 hits; tabs vs spaces migration
'@stylistic/no-trailing-spaces': 'off', // ~1 hit
'@stylistic/operator-linebreak': 'off', // ~6 hits
'@stylistic/padded-blocks': 'off', // ~4 hits
'@stylistic/quote-props': 'off', // ~26 hits
'@stylistic/semi': 'off', // ~16 hits
'@stylistic/space-before-function-paren': 'off', // ~2 hits
'@stylistic/space-in-parens': 'off', // ~2 hits
'vue/first-attribute-linebreak': 'off', // ~435 hits; formatting churn
'vue/html-indent': 'off', // ~164 hits; formatting churn
'vue/max-attributes-per-line': 'off', // ~68 hits; formatting churn
'vue/multiline-html-element-content-newline': 'off', // ~2 hits
'vue/singleline-html-element-content-newline': 'off', // ~74 hits; formatting churn

// Import sorting / extensions — large churn; needs dedicated PR
'perfectionist/sort-imports': 'off', // ~1216 hits
'perfectionist/sort-named-imports': 'off', // ~198 hits
'import-extensions/extensions': 'off', // ~558 hits
'import-extensions/ban-inline-type-imports': 'off', // ~68 hits; unsafe autofix vs type-only imports

// Documentation debt
'jsdoc/require-jsdoc': 'off', // ~1144 hits; needs real docs not stubs
'jsdoc/require-param': 'off', // ~99 hits; follow require-jsdoc work
'jsdoc/require-param-description': 'off', // ~18 hits; follow require-jsdoc work

// Semantic cleanup needing focused PRs
'@typescript-eslint/consistent-type-imports': 'off', // ~66 hits; mostly typeof import() in Vitest mocks
'@typescript-eslint/no-explicit-any': 'off', // ~17 hits; needs typed replacements
'@typescript-eslint/no-unused-vars': 'off', // ~78 hits; non-fixable cleanup
'@typescript-eslint/no-use-before-define': 'off', // ~38 hits; non-fixable
'no-unused-vars': 'off', // ~3 hits; non-fixable (JS twin)
'no-use-before-define': 'off', // ~8 hits; non-fixable (JS twin)
'antfu/top-level-function': 'off', // ~114 hits; style preference, large churn
'vue/no-unused-properties': 'off', // ~11 hits; public API / shared editor props
},
},
]
Loading
Loading