DEV: Update linting setup (#156)
This commit is contained in:
parent
76a76dbf0d
commit
bef115d760
|
@ -0,0 +1 @@
|
||||||
|
module.exports = require("@discourse/lint-configs/eslint");
|
|
@ -1 +0,0 @@
|
||||||
{}
|
|
|
@ -0,0 +1 @@
|
||||||
|
module.exports = require("@discourse/lint-configs/prettier");
|
|
@ -1,4 +1 @@
|
||||||
module.exports = {
|
module.exports = require("@discourse/lint-configs/template-lint");
|
||||||
plugins: ["ember-template-lint-plugin-discourse"],
|
|
||||||
extends: "discourse:recommended",
|
|
||||||
};
|
|
||||||
|
|
45
Gemfile.lock
45
Gemfile.lock
|
@ -2,38 +2,49 @@ 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.6.3)
|
||||||
parallel (1.22.1)
|
language_server-protocol (3.17.0.3)
|
||||||
parser (3.1.2.1)
|
parallel (1.23.0)
|
||||||
|
parser (3.2.2.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.8.2)
|
||||||
rexml (3.2.5)
|
rexml (3.2.6)
|
||||||
rubocop (1.36.0)
|
rubocop (1.57.2)
|
||||||
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.2.2.4)
|
||||||
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.28.1, < 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.19.0)
|
||||||
|
rubocop (~> 1.41)
|
||||||
|
rubocop-discourse (3.4.1)
|
||||||
rubocop (>= 1.1.0)
|
rubocop (>= 1.1.0)
|
||||||
rubocop-rspec (>= 2.0.0)
|
rubocop-rspec (>= 2.0.0)
|
||||||
rubocop-rspec (2.13.2)
|
rubocop-factory_bot (2.24.0)
|
||||||
rubocop (~> 1.33)
|
rubocop (~> 1.33)
|
||||||
ruby-progressbar (1.11.0)
|
rubocop-rspec (2.25.0)
|
||||||
syntax_tree (5.1.0)
|
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
|
||||||
ruby
|
ruby
|
||||||
|
x86_64-linux
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
rubocop-discourse
|
rubocop-discourse
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import Component from "@ember/component";
|
import Component from "@ember/component";
|
||||||
import { debounce } from "@ember/runloop";
|
|
||||||
import { action } from "@ember/object";
|
import { action } from "@ember/object";
|
||||||
|
import { debounce } from "@ember/runloop";
|
||||||
import discourseDebounce from "discourse-common/lib/debounce";
|
import discourseDebounce from "discourse-common/lib/debounce";
|
||||||
|
|
||||||
export default Component.extend({
|
export default Component.extend({
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import Component from "@ember/component";
|
import Component from "@ember/component";
|
||||||
|
import { htmlSafe } from "@ember/template";
|
||||||
import { RUNTIME_OPTIONS } from "discourse-common/lib/raw-handlebars-helpers";
|
import { RUNTIME_OPTIONS } from "discourse-common/lib/raw-handlebars-helpers";
|
||||||
import { findRawTemplate } from "discourse-common/lib/raw-templates";
|
import { findRawTemplate } from "discourse-common/lib/raw-templates";
|
||||||
import { htmlSafe } from "@ember/template";
|
|
||||||
|
|
||||||
export default Component.extend({
|
export default Component.extend({
|
||||||
tagName: "tr",
|
tagName: "tr",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import Component from "@ember/component";
|
import Component from "@ember/component";
|
||||||
import { reads } from "@ember/object/computed";
|
import { reads } from "@ember/object/computed";
|
||||||
import computed, { bind } from "discourse-common/utils/decorators";
|
|
||||||
import discourseDebounce from "discourse-common/lib/debounce";
|
import discourseDebounce from "discourse-common/lib/debounce";
|
||||||
|
import computed, { bind } from "discourse-common/utils/decorators";
|
||||||
|
|
||||||
export default Component.extend({
|
export default Component.extend({
|
||||||
classNames: "docs-topic",
|
classNames: "docs-topic",
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
|
import { getOwner } from "@ember/application";
|
||||||
import Controller, { inject as controller } from "@ember/controller";
|
import Controller, { inject as controller } from "@ember/controller";
|
||||||
import discourseComputed, { on } from "discourse-common/utils/decorators";
|
|
||||||
import { action } from "@ember/object";
|
import { action } from "@ember/object";
|
||||||
import { alias, equal, gt, readOnly } from "@ember/object/computed";
|
import { alias, equal, gt, readOnly } from "@ember/object/computed";
|
||||||
import Docs from "discourse/plugins/discourse-docs/discourse/models/docs";
|
|
||||||
import { getOwner } from "@ember/application";
|
|
||||||
import getURL from "discourse-common/lib/get-url";
|
|
||||||
import I18n from "I18n";
|
|
||||||
import { htmlSafe } from "@ember/template";
|
import { htmlSafe } from "@ember/template";
|
||||||
|
import getURL from "discourse-common/lib/get-url";
|
||||||
|
import discourseComputed, { on } from "discourse-common/utils/decorators";
|
||||||
|
import I18n from "I18n";
|
||||||
|
import Docs from "discourse/plugins/discourse-docs/discourse/models/docs";
|
||||||
|
|
||||||
const SHOW_FILTER_AT = 10;
|
const SHOW_FILTER_AT = 10;
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
"author": "Discourse",
|
"author": "Discourse",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint-config-discourse": "^3.4.0"
|
"@discourse/lint-configs": "^1.0.0",
|
||||||
|
"ember-template-lint": "^5.12.0",
|
||||||
|
"eslint": "^8.53.0",
|
||||||
|
"prettier": "^2.8.8"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
# version: 0.1
|
# version: 0.1
|
||||||
# author: Justin DiRose
|
# author: Justin DiRose
|
||||||
# url: https://github.com/discourse/discourse-docs
|
# url: https://github.com/discourse/discourse-docs
|
||||||
# transpile_js: true
|
|
||||||
|
|
||||||
enabled_site_setting :docs_enabled
|
enabled_site_setting :docs_enabled
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import { test } from "qunit";
|
|
||||||
import I18n from "I18n";
|
|
||||||
import { click, currentURL, visit } from "@ember/test-helpers";
|
import { click, currentURL, visit } from "@ember/test-helpers";
|
||||||
|
import { test } from "qunit";
|
||||||
import {
|
import {
|
||||||
acceptance,
|
acceptance,
|
||||||
exists,
|
exists,
|
||||||
query,
|
query,
|
||||||
} from "discourse/tests/helpers/qunit-helpers";
|
} from "discourse/tests/helpers/qunit-helpers";
|
||||||
import docsFixtures from "../fixtures/docs";
|
|
||||||
import { cloneJSON } from "discourse-common/lib/object";
|
import { cloneJSON } from "discourse-common/lib/object";
|
||||||
|
import I18n from "I18n";
|
||||||
|
import docsFixtures from "../fixtures/docs";
|
||||||
|
|
||||||
let DOCS_URL_PATH = "docs";
|
let DOCS_URL_PATH = "docs";
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
|
import { click, visit } from "@ember/test-helpers";
|
||||||
|
import { test } from "qunit";
|
||||||
import {
|
import {
|
||||||
acceptance,
|
acceptance,
|
||||||
count,
|
count,
|
||||||
exists,
|
exists,
|
||||||
query,
|
query,
|
||||||
} from "discourse/tests/helpers/qunit-helpers";
|
} from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { test } from "qunit";
|
|
||||||
import docsFixtures from "../fixtures/docs";
|
import docsFixtures from "../fixtures/docs";
|
||||||
import docsShowTagGroupsFixtures from "../fixtures/docs-show-tag-groups";
|
import docsShowTagGroupsFixtures from "../fixtures/docs-show-tag-groups";
|
||||||
import { click, visit } from "@ember/test-helpers";
|
|
||||||
|
|
||||||
let DOCS_URL_PATH = "docs";
|
let DOCS_URL_PATH = "docs";
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
|
import { visit } from "@ember/test-helpers";
|
||||||
|
import { test } from "qunit";
|
||||||
import {
|
import {
|
||||||
acceptance,
|
acceptance,
|
||||||
publishToMessageBus,
|
publishToMessageBus,
|
||||||
} from "discourse/tests/helpers/qunit-helpers";
|
} from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { test } from "qunit";
|
|
||||||
import docsFixtures from "../fixtures/docs";
|
import docsFixtures from "../fixtures/docs";
|
||||||
import { visit } from "@ember/test-helpers";
|
|
||||||
|
|
||||||
acceptance("Docs - user status", function (needs) {
|
acceptance("Docs - user status", function (needs) {
|
||||||
needs.user();
|
needs.user();
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { module, test } from "qunit";
|
|
||||||
import { setupTest } from "ember-qunit";
|
import { setupTest } from "ember-qunit";
|
||||||
|
import { module, test } from "qunit";
|
||||||
import { getOwner } from "discourse-common/lib/get-owner";
|
import { getOwner } from "discourse-common/lib/get-owner";
|
||||||
|
|
||||||
module("Unit | Controller | docs-index", function (hooks) {
|
module("Unit | Controller | docs-index", function (hooks) {
|
||||||
|
|
Loading…
Reference in New Issue