Skip to content

Commit 09c8124

Browse files
committed
chore(eslint): migrate to new config
- temporary disable all conflicting rules - remove unused eslint-disable comments Signed-off-by: Maksim Sukharev <[email protected]>
1 parent eef1cf9 commit 09c8124

File tree

4 files changed

+42
-44
lines changed

4 files changed

+42
-44
lines changed

eslint.config.mjs

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/**
2+
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
3+
* SPDX-License-Identifier: AGPL-3.0-or-later
4+
*/
5+
6+
import { recommendedVue2 } from '@nextcloud/eslint-config'
7+
8+
export default [
9+
...recommendedVue2,
10+
{
11+
name: 'logreader/disabled-during-migration',
12+
rules: {
13+
'@nextcloud/vue/no-deprecated-exports': 'off',
14+
'@nextcloud/vue/no-deprecated-props': 'off',
15+
'@stylistic/arrow-parens': 'off',
16+
'@stylistic/function-paren-newline': 'off',
17+
'@stylistic/implicit-arrow-linebreak': 'off',
18+
'@stylistic/indent': 'off',
19+
'@stylistic/indent-binary-ops': 'off',
20+
'@stylistic/max-statements-per-line': 'off',
21+
'@stylistic/member-delimiter-style': 'off',
22+
'@stylistic/object-curly-spacing': 'off',
23+
'@stylistic/padded-blocks': 'off',
24+
'@typescript-eslint/no-unsafe-function-type': 'off',
25+
'@typescript-eslint/no-unused-vars': 'off',
26+
'@typescript-eslint/no-use-before-define': 'off',
27+
'antfu/top-level-function': 'off',
28+
'curly': 'off',
29+
'jsdoc/tag-lines': 'off',
30+
'import-extensions/extensions': 'off',
31+
'perfectionist/sort-imports': 'off',
32+
'perfectionist/sort-named-exports': 'off',
33+
'perfectionist/sort-named-imports': 'off',
34+
'vue/first-attribute-linebreak': 'off',
35+
'vue/define-macros-order': 'off',
36+
'vue/no-boolean-default': 'off',
37+
'vue/no-required-prop-with-default': 'off',
38+
'vue/no-unused-properties': 'off',
39+
'vue/padding-line-between-blocks': 'off',
40+
},
41+
},
42+
]

package.json

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -45,47 +45,6 @@
4545
"vue": "^2.7.15",
4646
"vue-material-design-icons": "^5.3.1"
4747
},
48-
"eslintConfig": {
49-
"ignorePatterns": [
50-
"node_modules/",
51-
"js/",
52-
"lib/"
53-
],
54-
"extends": [
55-
"@nextcloud/eslint-config/typescript"
56-
],
57-
"plugins": [
58-
"chai-friendly"
59-
],
60-
"rules": {
61-
"func-call-spacing": "off",
62-
"@typescript-eslint/func-call-spacing": "error",
63-
"no-unused-expressions": 0,
64-
"chai-friendly/no-unused-expressions": 2
65-
},
66-
"overrides": [
67-
{
68-
"files": [
69-
"./*.config.*",
70-
"**/*.spec.*",
71-
"**/*.test.*"
72-
],
73-
"rules": {
74-
"n/no-unpublished-import": [
75-
"off"
76-
]
77-
}
78-
},
79-
{
80-
"files": [
81-
"**/*.vue"
82-
],
83-
"rules": {
84-
"n/no-missing-import": "off"
85-
}
86-
}
87-
]
88-
},
8948
"browserslist": [
9049
"extends @nextcloud/browserslist-config"
9150
],

src/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,11 @@ const pinia = createPinia()
1818

1919
// ComponentOptions is declared in types/options.d.ts
2020
declare module 'vue/types/options.d.ts' {
21-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
2221
interface ComponentOptions<V extends Vue> {
2322
pinia?: Pinia
2423
}
2524
}
2625

27-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
2826
const mainApp = new Vue({
2927
el: '#logreader-root',
3028
render: (h) => h(App),

src/utils/debounce.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
* @param func The function to debounce
1010
* @param timeout Amount of time (ms) to wait
1111
*/
12-
// eslint-disable-next-line @typescript-eslint/ban-types
1312
export function debounce(func: Function, timeout = 300) {
1413
let timer: number
1514
return (...args: unknown[]) => {

0 commit comments

Comments
 (0)