Repository navigation
Commit de3b5a7
committed
chore: migrate to @nextcloud/eslint-config 9
Its ESLint 10 reads a flat config only, so .eslintrc.cjs becomes eslint.config.js,
whose rules apply to the app sources, leaving the exemptions version 9 grants test
files in place. The lint workflow watched .eslintrc.* and .eslintignore, neither of
which exists any more, and webpack.js was the last place configuring ESLint the old
way: nothing declares its dependencies, so it could not run at all.
The import rules are gone from the shared config, so 'import/extensions' goes with
them, as do the babel parser options and the appVersion global the sources do not
use, which the shared config declares anyway. 'no-console' was built into the old
config and is now spelled out.
The sources follow what the new rules ask for: sorted imports, blank lines between
multi line component options, and camel cased attributes and events in templates.
Unused callback parameters are gone, and the dashboard component is called
GithubDashboard, because a name of one word can collide with an HTML element. One rule
asks for the ellipsis character in a translatable string and so pointed at the widget's
'Loading...' message, which the dashboard component can never show, because it draws
its own placeholder while it loads: the branch is gone rather than retranslated.
The shared config brings @nextcloud/no-deprecated-library-props, which holds the prop
renames of the library, gates each on the installed version and reports them. It calls
itself fixable, but none of its forty reports carries a fixer, so it only pointed at
NcPopover's focus-trap: the rename to noFocusTrap, and inverting the value it carried,
are by hand. The old spelling was not declared any more, so the popover built a focus
trap around content that holds a name and nothing tabbable, and focus-trap threw every
time the popover opened. The .native modifier of three mouse listeners is one the Vue 3
compiler drops while keeping the listener, so removing it changes nothing; that holds
for these three, not for key events, where the modifier is compiled as a key name and
swallows the handler.
NcLoadingIcon was given the name of its spinner as 'title'. The prop is called name,
and the component writes it into the aria-label of a span with role img, so the spinner
of the author popover carried an empty accessible name while the translated string sat
on a tooltip.
The widget passed its label to the dashboard component as 'showMoreText'. The prop is
called showMoreLabel, so the link under a full widget read 'More items …' instead of
what the widget asked for. Two more strings the widget cannot show go with it: a data
property of the old name that the template never read, and the emptyContentMessage the
dashboard component only uses as the fallback of a slot this widget always fills.
Folding a comment, the popover of a comment author, the name of its spinner and the
link under a full widget had no tests, and now have them.
eslint.config.js has no place in the released archive, and neither the .eslintrc.js
the packaging lists named nor the webpack.js and webpack.config.js they excluded
exist here. The lint scripts passed --ext, which ESLint 10 ignores. The change filters
named .eslintrc.* and an .eslintignore this app never had, and name the config file
now, which their '**.js' entry matches only by the extension this app happens to use.
Signed-off-by: Oleksander Piskun <oleksandr2088@icloud.com>1 parent 5416c02 commit de3b5a7
33 files changed
Lines changed: 1373 additions & 3325 deletions
File tree
- .github/workflows
- playwright/e2e
- src
- components
- icons
- views
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | | - | |
| 40 | + | |
42 | 41 | | |
43 | 42 | | |
44 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
39 | 37 | | |
40 | 38 | | |
41 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
86 | 85 | | |
87 | | - | |
| 86 | + | |
88 | 87 | | |
89 | 88 | | |
90 | 89 | | |
| |||
0 commit comments