Skip to content

Commit

Permalink
DEV: Update linting setup (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
CvX authored Nov 19, 2023
1 parent a807ff3 commit bab2e8f
Show file tree
Hide file tree
Showing 11 changed files with 1,061 additions and 858 deletions.
8 changes: 0 additions & 8 deletions .eslintrc

This file was deleted.

1 change: 1 addition & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require("@discourse/lint-configs/eslint-theme");
1 change: 0 additions & 1 deletion .prettierrc

This file was deleted.

1 change: 1 addition & 0 deletions .prettierrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require("@discourse/lint-configs/prettier");
5 changes: 1 addition & 4 deletions .template-lintrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
module.exports = {
plugins: ["ember-template-lint-plugin-discourse"],
extends: "discourse:recommended",
};
module.exports = require("@discourse/lint-configs/template-lint");
2 changes: 1 addition & 1 deletion javascripts/discourse/initializers/disco-toc-composer.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import I18n from "I18n";
import { withPluginApi } from "discourse/lib/plugin-api";
import I18n from "I18n";

export default {
name: "disco-toc-composer",
Expand Down
8 changes: 4 additions & 4 deletions javascripts/discourse/initializers/disco-toc-main.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import domUtils from "discourse-common/utils/dom-utils";
import { headerOffset } from "discourse/lib/offset-calculator";
import { iconHTML } from "discourse-common/lib/icon-library";
import { later } from "@ember/runloop";
import { slugify } from "discourse/lib/utilities";
import { headerOffset } from "discourse/lib/offset-calculator";
import { withPluginApi } from "discourse/lib/plugin-api";
import { slugify } from "discourse/lib/utilities";
import { iconHTML } from "discourse-common/lib/icon-library";
import domUtils from "discourse-common/utils/dom-utils";
import I18n from "I18n";

export default {
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
"author": "Discourse",
"license": "MIT",
"devDependencies": {
"eslint-config-discourse": "^3.2.0"
"@discourse/lint-configs": "^1.0.0",
"ember-template-lint": "^5.12.0",
"eslint": "^8.53.0",
"prettier": "^2.8.8"
}
}
6 changes: 3 additions & 3 deletions test/acceptance/toc-composer-test.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import I18n from "discourse-i18n";
import { click, visit } from "@ember/test-helpers";
import { test } from "qunit";
import {
acceptance,
exists,
query,
} from "discourse/tests/helpers/qunit-helpers";
import { click, visit } from "@ember/test-helpers";
import selectKit from "discourse/tests/helpers/select-kit-helper";
import { test } from "qunit";
import I18n from "discourse-i18n";

acceptance("DiscoTOC - Composer", function (needs) {
needs.user();
Expand Down
6 changes: 3 additions & 3 deletions test/acceptance/toc-test.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { visit } from "@ember/test-helpers";
import { test } from "qunit";
import topicFixtures from "discourse/tests/fixtures/topic";
import {
acceptance,
exists,
query,
} from "discourse/tests/helpers/qunit-helpers";
import { visit } from "@ember/test-helpers";
import { test } from "qunit";
import topicFixtures from "discourse/tests/fixtures/topic";
import { cloneJSON } from "discourse-common/lib/object";

const COOKED_WITH_HEADINGS =
Expand Down
1,876 changes: 1,043 additions & 833 deletions yarn.lock

Large diffs are not rendered by default.

0 comments on commit bab2e8f

Please sign in to comment.