DEV: Update linting (#89)
This commit is contained in:
parent
48be65a14f
commit
d46e783d9f
|
@ -0,0 +1 @@
|
||||||
|
module.exports = require("@discourse/lint-configs/eslint");
|
|
@ -1 +0,0 @@
|
||||||
{}
|
|
|
@ -0,0 +1 @@
|
||||||
|
module.exports = require("@discourse/lint-configs/prettier");
|
|
@ -0,0 +1 @@
|
||||||
|
module.exports = require("@discourse/lint-configs/template-lint");
|
|
@ -1,4 +0,0 @@
|
||||||
module.exports = {
|
|
||||||
plugins: ["ember-template-lint-plugin-discourse"],
|
|
||||||
extends: "discourse:recommended",
|
|
||||||
};
|
|
57
Gemfile.lock
57
Gemfile.lock
|
@ -2,47 +2,52 @@ GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
ast (2.4.2)
|
ast (2.4.2)
|
||||||
json (2.6.2)
|
json (2.7.1)
|
||||||
parallel (1.22.1)
|
language_server-protocol (3.17.0.3)
|
||||||
parser (3.1.2.1)
|
parallel (1.24.0)
|
||||||
|
parser (3.3.0.4)
|
||||||
ast (~> 2.4.1)
|
ast (~> 2.4.1)
|
||||||
prettier_print (1.2.0)
|
racc
|
||||||
|
prettier_print (1.2.1)
|
||||||
|
racc (1.7.3)
|
||||||
rainbow (3.1.1)
|
rainbow (3.1.1)
|
||||||
regexp_parser (2.6.0)
|
regexp_parser (2.9.0)
|
||||||
rexml (3.2.5)
|
rexml (3.2.6)
|
||||||
rubocop (1.36.0)
|
rubocop (1.60.0)
|
||||||
json (~> 2.3)
|
json (~> 2.3)
|
||||||
|
language_server-protocol (>= 3.17.0)
|
||||||
parallel (~> 1.10)
|
parallel (~> 1.10)
|
||||||
parser (>= 3.1.2.1)
|
parser (>= 3.3.0.2)
|
||||||
rainbow (>= 2.2.2, < 4.0)
|
rainbow (>= 2.2.2, < 4.0)
|
||||||
regexp_parser (>= 1.8, < 3.0)
|
regexp_parser (>= 1.8, < 3.0)
|
||||||
rexml (>= 3.2.5, < 4.0)
|
rexml (>= 3.2.5, < 4.0)
|
||||||
rubocop-ast (>= 1.20.1, < 2.0)
|
rubocop-ast (>= 1.30.0, < 2.0)
|
||||||
ruby-progressbar (~> 1.7)
|
ruby-progressbar (~> 1.7)
|
||||||
unicode-display_width (>= 1.4.0, < 3.0)
|
unicode-display_width (>= 2.4.0, < 3.0)
|
||||||
rubocop-ast (1.21.0)
|
rubocop-ast (1.30.0)
|
||||||
parser (>= 3.1.1.0)
|
parser (>= 3.2.1.0)
|
||||||
rubocop-discourse (3.0)
|
rubocop-capybara (2.20.0)
|
||||||
rubocop (>= 1.1.0)
|
rubocop (~> 1.41)
|
||||||
rubocop-rspec (>= 2.0.0)
|
rubocop-discourse (3.6.0)
|
||||||
rubocop-rspec (2.13.2)
|
rubocop (>= 1.59.0)
|
||||||
rubocop (~> 1.33)
|
rubocop-rspec (>= 2.25.0)
|
||||||
ruby-progressbar (1.11.0)
|
rubocop-factory_bot (2.25.1)
|
||||||
syntax_tree (5.1.0)
|
rubocop (~> 1.41)
|
||||||
|
rubocop-rspec (2.26.1)
|
||||||
|
rubocop (~> 1.40)
|
||||||
|
rubocop-capybara (~> 2.17)
|
||||||
|
rubocop-factory_bot (~> 2.22)
|
||||||
|
ruby-progressbar (1.13.0)
|
||||||
|
syntax_tree (6.2.0)
|
||||||
prettier_print (>= 1.2.0)
|
prettier_print (>= 1.2.0)
|
||||||
unicode-display_width (2.3.0)
|
unicode-display_width (2.5.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
|
||||||
syntax_tree
|
syntax_tree
|
||||||
|
|
||||||
BUNDLED WITH
|
BUNDLED WITH
|
||||||
2.3.10
|
2.5.4
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
import EmberObject from "@ember/object";
|
||||||
|
import { emojiUrlFor } from "discourse/lib/text";
|
||||||
|
import { getOwner } from "discourse-common/lib/get-owner";
|
||||||
import I18n from "I18n";
|
import I18n from "I18n";
|
||||||
import { showUserNotes } from "discourse/plugins/discourse-user-notes/discourse-user-notes/lib/user-notes";
|
import { showUserNotes } from "discourse/plugins/discourse-user-notes/discourse-user-notes/lib/user-notes";
|
||||||
import { getOwner } from "discourse-common/lib/get-owner";
|
|
||||||
import { emojiUrlFor } from "discourse/lib/text";
|
|
||||||
import EmberObject from "@ember/object";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
shouldRender(args, component) {
|
shouldRender(args, component) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
import { emojiUrlFor } from "discourse/lib/text";
|
||||||
|
import { getOwner } from "discourse-common/lib/get-owner";
|
||||||
import I18n from "I18n";
|
import I18n from "I18n";
|
||||||
import { showUserNotes } from "discourse/plugins/discourse-user-notes/discourse-user-notes/lib/user-notes";
|
import { showUserNotes } from "discourse/plugins/discourse-user-notes/discourse-user-notes/lib/user-notes";
|
||||||
import { getOwner } from "discourse-common/lib/get-owner";
|
|
||||||
import { emojiUrlFor } from "discourse/lib/text";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
shouldRender(args, component) {
|
shouldRender(args, component) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { showUserNotes } from "discourse/plugins/discourse-user-notes/discourse-user-notes/lib/user-notes";
|
|
||||||
import { getOwner } from "discourse-common/lib/get-owner";
|
import { getOwner } from "discourse-common/lib/get-owner";
|
||||||
|
import { showUserNotes } from "discourse/plugins/discourse-user-notes/discourse-user-notes/lib/user-notes";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
shouldRender(args, component) {
|
shouldRender(args, component) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import UserNotesModal from "../../discourse/components/modal/user-notes";
|
|
||||||
import { getOwnerWithFallback } from "discourse-common/lib/get-owner";
|
import { getOwnerWithFallback } from "discourse-common/lib/get-owner";
|
||||||
|
import UserNotesModal from "../../discourse/components/modal/user-notes";
|
||||||
|
|
||||||
export function showUserNotes(store, userId, callback, opts) {
|
export function showUserNotes(store, userId, callback, opts) {
|
||||||
const modal = getOwnerWithFallback(this).lookup("service:modal");
|
const modal = getOwnerWithFallback(this).lookup("service:modal");
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
{{#if userNotesCount}}
|
{{#if userNotesCount}}
|
||||||
<DButton
|
<DButton
|
||||||
@class="btn btn-flat"
|
|
||||||
@translatedTitle={{userNotesTitle}}
|
@translatedTitle={{userNotesTitle}}
|
||||||
@action={{action "showUserNotes"}}
|
@action={{action "showUserNotes"}}
|
||||||
|
class="btn btn-flat"
|
||||||
>
|
>
|
||||||
{{#if emojiEnabled}}
|
{{#if emojiEnabled}}
|
||||||
<img
|
<img
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
{{#if userNotesCount}}
|
{{#if userNotesCount}}
|
||||||
<DButton
|
<DButton
|
||||||
@class="btn btn-flat"
|
|
||||||
@translatedTitle={{userNotesTitle}}
|
@translatedTitle={{userNotesTitle}}
|
||||||
@action={{action "showUserNotes"}}
|
@action={{action "showUserNotes"}}
|
||||||
|
class="btn btn-flat"
|
||||||
>
|
>
|
||||||
{{#if emojiEnabled}}
|
{{#if emojiEnabled}}
|
||||||
<img
|
<img
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
<DButton
|
<DButton
|
||||||
@action={{this.attachNote}}
|
@action={{this.attachNote}}
|
||||||
@label="user_notes.attach"
|
@label="user_notes.attach"
|
||||||
@class="btn-primary"
|
|
||||||
@disabled={{this.attachDisabled}}
|
@disabled={{this.attachDisabled}}
|
||||||
|
class="btn-primary"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{{#each @model.note as |n|}}
|
{{#each @model.note as |n|}}
|
||||||
|
@ -28,8 +28,8 @@
|
||||||
<DButton
|
<DButton
|
||||||
@action={{fn this.removeNote n}}
|
@action={{fn this.removeNote n}}
|
||||||
@icon="far-trash-alt"
|
@icon="far-trash-alt"
|
||||||
@class="btn-small btn-danger"
|
|
||||||
@title="user_notes.remove"
|
@title="user_notes.remove"
|
||||||
|
class="btn-small btn-danger"
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import Component from "@glimmer/component";
|
import Component from "@glimmer/component";
|
||||||
import I18n from "I18n";
|
import { tracked } from "@glimmer/tracking";
|
||||||
import { action } from "@ember/object";
|
import { action } from "@ember/object";
|
||||||
import { inject as service } from "@ember/service";
|
import { inject as service } from "@ember/service";
|
||||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||||
import { tracked } from "@glimmer/tracking";
|
import I18n from "I18n";
|
||||||
|
|
||||||
export default class UserNotesModal extends Component {
|
export default class UserNotesModal extends Component {
|
||||||
@service dialog;
|
@service dialog;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { withPluginApi } from "discourse/lib/plugin-api";
|
import { withPluginApi } from "discourse/lib/plugin-api";
|
||||||
import { iconNode } from "discourse-common/lib/icon-library";
|
import { iconNode } from "discourse-common/lib/icon-library";
|
||||||
import { showUserNotes } from "discourse/plugins/discourse-user-notes/discourse-user-notes/lib/user-notes";
|
|
||||||
import { observes, on } from "discourse-common/utils/decorators";
|
import { observes, on } from "discourse-common/utils/decorators";
|
||||||
|
import { showUserNotes } from "discourse/plugins/discourse-user-notes/discourse-user-notes/lib/user-notes";
|
||||||
|
|
||||||
const PLUGIN_ID = "discourse-user-notes";
|
const PLUGIN_ID = "discourse-user-notes";
|
||||||
|
|
||||||
|
|
10
package.json
10
package.json
|
@ -1,10 +1,10 @@
|
||||||
{
|
{
|
||||||
"name": "discourse-user-notes",
|
"name": "discourse-user-notes",
|
||||||
"version": "0.0.2",
|
"private": true,
|
||||||
"repository": "https://github.com/discourse/discourse-user-notes",
|
|
||||||
"author": "Discourse",
|
|
||||||
"license": "MIT",
|
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint-config-discourse": "^3.4.0"
|
"@discourse/lint-configs": "^1.3.5",
|
||||||
|
"ember-template-lint": "^5.13.0",
|
||||||
|
"eslint": "^8.56.0",
|
||||||
|
"prettier": "^2.8.8"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
# version: 0.0.2
|
# version: 0.0.2
|
||||||
# authors: Robin Ward
|
# authors: Robin Ward
|
||||||
# url: https://github.com/discourse/discourse-user-notes
|
# url: https://github.com/discourse/discourse-user-notes
|
||||||
# transpile_js: true
|
|
||||||
|
|
||||||
enabled_site_setting :user_notes_enabled
|
enabled_site_setting :user_notes_enabled
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
|
||||||
import { test } from "qunit";
|
|
||||||
import { click, fillIn, visit } from "@ember/test-helpers";
|
import { click, fillIn, visit } from "@ember/test-helpers";
|
||||||
|
import { test } from "qunit";
|
||||||
|
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import I18n from "I18n";
|
import I18n from "I18n";
|
||||||
|
|
||||||
acceptance("User Notes", function (needs) {
|
acceptance("User Notes", function (needs) {
|
||||||
|
|
Loading…
Reference in New Issue