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 node_modules
yarn-error.log /gems
.rubocop-https---raw-githubusercontent-com-discourse-* /auto_generated

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,5 +1,10 @@
{ {
"dependencies": { "name": "discourse-user-notes",
"eslint-config-discourse": "^2.0.0" "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