DEV: Update linting setup and fix issues (#58)

This commit is contained in:
Jarek Radosz 2022-06-17 15:25:17 +02:00 committed by GitHub
parent 3f06516cf6
commit a7dcbf0765
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 1275 additions and 931 deletions

11
.gitignore vendored
View File

@ -1,10 +1,3 @@
.bundle/
log/*.log
pkg/
auto_generated
.DS_Store
*.swp
node_modules/
node_modules
yarn-error.log
.rubocop-https---raw-githubusercontent-com-discourse-*
/gems
/auto_generated

View File

@ -1,37 +1,42 @@
GEM
remote: https://rubygems.org/
specs:
ast (2.4.1)
parallel (1.19.2)
parser (2.7.1.4)
ast (2.4.2)
parallel (1.22.1)
parser (3.1.2.0)
ast (~> 2.4.1)
rainbow (3.0.0)
regexp_parser (1.7.1)
rainbow (3.1.1)
regexp_parser (2.5.0)
rexml (3.2.5)
rubocop (0.88.0)
rubocop (1.30.1)
parallel (~> 1.10)
parser (>= 2.7.1.1)
parser (>= 3.1.0.0)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.7)
rexml
rubocop-ast (>= 0.1.0, < 1.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.18.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 2.0)
rubocop-ast (0.1.0)
parser (>= 2.7.0.1)
rubocop-discourse (2.2.0)
rubocop (>= 0.69.0)
rubocop-rspec (>= 1.39.0)
rubocop-rspec (1.42.0)
rubocop (>= 0.87.0)
ruby-progressbar (1.10.1)
unicode-display_width (1.7.0)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.18.0)
parser (>= 3.1.1.0)
rubocop-discourse (2.5.0)
rubocop (>= 1.1.0)
rubocop-rspec (>= 2.0.0)
rubocop-rspec (2.11.1)
rubocop (~> 1.19)
ruby-progressbar (1.11.0)
unicode-display_width (2.1.0)
PLATFORMS
arm64-darwin-20
ruby
x86_64-darwin-18
x86_64-darwin-19
x86_64-darwin-20
x86_64-linux
DEPENDENCIES
rubocop-discourse
BUNDLED WITH
2.1.4
2.3.10

View File

@ -1,4 +1 @@
{{show-user-notes
show=(action "showUserNotes")
count=userNotesCount
}}
{{show-user-notes show=(action "showUserNotes") count=userNotesCount}}

View File

@ -1,7 +1,12 @@
{{#if userNotesCount}}
<a href {{action "showUserNotes"}} title={{userNotesTitle}}>
{{#if emojiEnabled}}
<img src={{emojiUrl}} title={{userNotesTitle}} alt="pencil" class="emoji">
<img
src={{emojiUrl}}
title={{userNotesTitle}}
alt="pencil"
class="emoji"
>
{{else}}
{{d-icon "sticky-note"}}
{{/if}}

View File

@ -1,7 +1,12 @@
{{#if userNotesCount}}
<a href {{action "showUserNotes"}} title={{userNotesTitle}}>
{{#if emojiEnabled}}
<img src={{emojiUrl}} title={{userNotesTitle}} alt="pencil" class="emoji">
<img
src={{emojiUrl}}
title={{userNotesTitle}}
alt="pencil"
class="emoji"
>
{{else}}
{{d-icon "sticky-note"}}
{{/if}}

View File

@ -1,4 +1 @@
{{show-user-notes
show=(action "showUserNotes")
count=userNotesCount
}}
{{show-user-notes show=(action "showUserNotes") count=userNotesCount}}

View File

@ -21,7 +21,8 @@
{{#if n.can_delete}}
<span class="controls">
{{d-button action=(action "removeNote" n)
{{d-button
action=(action "removeNote" n)
icon="far-trash-alt"
class="btn-small btn-danger"
title="user_notes.remove"

View File

@ -1,5 +1,10 @@
{
"dependencies": {
"eslint-config-discourse": "^2.0.0"
"name": "discourse-user-notes",
"version": "0.0.2",
"repository": "https://github.com/discourse/discourse-user-notes",
"author": "Discourse",
"license": "MIT",
"devDependencies": {
"eslint-config-discourse": "^3.2.0"
}
}

2112
yarn.lock

File diff suppressed because it is too large Load Diff