mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 03:36:18 +08:00
DEV: Run prettier correctly for bundled-plugin test directories (#30338)
This commit is contained in:
@ -47,8 +47,8 @@
|
|||||||
"lint:js:fix": "eslint --fix ./app/assets/javascripts $(script/list_bundled_plugins) --no-error-on-unmatched-pattern",
|
"lint:js:fix": "eslint --fix ./app/assets/javascripts $(script/list_bundled_plugins) --no-error-on-unmatched-pattern",
|
||||||
"lint:hbs": "ember-template-lint 'app/assets/javascripts/**/*.{gjs,hbs}' 'plugins/*/assets/javascripts/**/*.{gjs,hbs}' 'plugins/*/admin/assets/javascripts/**/*.{gjs,hbs}'",
|
"lint:hbs": "ember-template-lint 'app/assets/javascripts/**/*.{gjs,hbs}' 'plugins/*/assets/javascripts/**/*.{gjs,hbs}' 'plugins/*/admin/assets/javascripts/**/*.{gjs,hbs}'",
|
||||||
"lint:hbs:fix": "ember-template-lint 'app/assets/javascripts/**/*.{gjs,hbs}' 'plugins/*/assets/javascripts/**/*.{gjs,hbs}' 'plugins/*/admin/assets/javascripts/**/*.{gjs,hbs}' --fix",
|
"lint:hbs:fix": "ember-template-lint 'app/assets/javascripts/**/*.{gjs,hbs}' 'plugins/*/assets/javascripts/**/*.{gjs,hbs}' 'plugins/*/admin/assets/javascripts/**/*.{gjs,hbs}' --fix",
|
||||||
"lint:prettier": "pnpm pprettier --list-different 'app/assets/stylesheets/**/*.scss' 'app/assets/javascripts/**/*.{js,gjs,hbs}' $(script/list_bundled_plugins '/assets/stylesheets/**/*.scss') $(script/list_bundled_plugins '/{assets,admin/assets}/javascripts/**/*.{js,gjs,hbs}')",
|
"lint:prettier": "pnpm pprettier --list-different 'app/assets/stylesheets/**/*.scss' 'app/assets/javascripts/**/*.{js,gjs,hbs}' $(script/list_bundled_plugins '/assets/stylesheets/**/*.scss') $(script/list_bundled_plugins '/{assets,admin/assets,test}/javascripts/**/*.{js,gjs,hbs}')",
|
||||||
"lint:prettier:fix": "pnpm prettier -w 'app/assets/stylesheets/**/*.scss' 'app/assets/javascripts/**/*.{js,gjs,hbs}' $(script/list_bundled_plugins '/assets/stylesheets/**/*.scss') $(script/list_bundled_plugins '/{assets,admin/assets}/javascripts/**/*.{js,gjs,hbs}')",
|
"lint:prettier:fix": "pnpm prettier -w 'app/assets/stylesheets/**/*.scss' 'app/assets/javascripts/**/*.{js,gjs,hbs}' $(script/list_bundled_plugins '/assets/stylesheets/**/*.scss') $(script/list_bundled_plugins '/{assets,admin/assets,test}/javascripts/**/*.{js,gjs,hbs}')",
|
||||||
"lttf:ignore": "lint-to-the-future ignore",
|
"lttf:ignore": "lint-to-the-future ignore",
|
||||||
"lttf:output": "lint-to-the-future output -o ./lint-progress/",
|
"lttf:output": "lint-to-the-future output -o ./lint-progress/",
|
||||||
"lint-progress": "pnpm lttf:output && npx html-pages ./lint-progress --no-cache",
|
"lint-progress": "pnpm lttf:output && npx html-pages ./lint-progress --no-cache",
|
||||||
|
@ -4,7 +4,7 @@ import hbs from "htmlbars-inline-precompile";
|
|||||||
import { module, test } from "qunit";
|
import { module, test } from "qunit";
|
||||||
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
||||||
import pretender from "discourse/tests/helpers/create-pretender";
|
import pretender from "discourse/tests/helpers/create-pretender";
|
||||||
import { i18n } from 'discourse-i18n';
|
import { i18n } from "discourse-i18n";
|
||||||
import ChatFabricators from "discourse/plugins/chat/discourse/lib/fabricators";
|
import ChatFabricators from "discourse/plugins/chat/discourse/lib/fabricators";
|
||||||
|
|
||||||
module("Discourse Chat | Component | chat-channel-leave-btn", function (hooks) {
|
module("Discourse Chat | Component | chat-channel-leave-btn", function (hooks) {
|
||||||
|
@ -3,7 +3,7 @@ import { render } from "@ember/test-helpers";
|
|||||||
import hbs from "htmlbars-inline-precompile";
|
import hbs from "htmlbars-inline-precompile";
|
||||||
import { module, test } from "qunit";
|
import { module, test } from "qunit";
|
||||||
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
||||||
import { i18n } from 'discourse-i18n';
|
import { i18n } from "discourse-i18n";
|
||||||
import ChatFabricators from "discourse/plugins/chat/discourse/lib/fabricators";
|
import ChatFabricators from "discourse/plugins/chat/discourse/lib/fabricators";
|
||||||
import {
|
import {
|
||||||
CHANNEL_STATUSES,
|
CHANNEL_STATUSES,
|
||||||
|
@ -4,7 +4,7 @@ import { module, test } from "qunit";
|
|||||||
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
||||||
import pretender from "discourse/tests/helpers/create-pretender";
|
import pretender from "discourse/tests/helpers/create-pretender";
|
||||||
import { query } from "discourse/tests/helpers/qunit-helpers";
|
import { query } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { i18n } from 'discourse-i18n';
|
import { i18n } from "discourse-i18n";
|
||||||
import ChatChannel from "discourse/plugins/chat/discourse/models/chat-channel";
|
import ChatChannel from "discourse/plugins/chat/discourse/models/chat-channel";
|
||||||
|
|
||||||
module(
|
module(
|
||||||
|
@ -2,7 +2,7 @@ import { click, render } from "@ember/test-helpers";
|
|||||||
import hbs from "htmlbars-inline-precompile";
|
import hbs from "htmlbars-inline-precompile";
|
||||||
import { module, test } from "qunit";
|
import { module, test } from "qunit";
|
||||||
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
||||||
import { i18n } from 'discourse-i18n';
|
import { i18n } from "discourse-i18n";
|
||||||
|
|
||||||
module("Discourse Chat | Component | chat-composer-upload", function (hooks) {
|
module("Discourse Chat | Component | chat-composer-upload", function (hooks) {
|
||||||
setupRenderingTest(hooks);
|
setupRenderingTest(hooks);
|
||||||
|
@ -4,7 +4,7 @@ import hbs from "htmlbars-inline-precompile";
|
|||||||
import { module, test } from "qunit";
|
import { module, test } from "qunit";
|
||||||
import CoreFabricators from "discourse/lib/fabricators";
|
import CoreFabricators from "discourse/lib/fabricators";
|
||||||
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
||||||
import { i18n } from 'discourse-i18n';
|
import { i18n } from "discourse-i18n";
|
||||||
import ChatFabricators from "discourse/plugins/chat/discourse/lib/fabricators";
|
import ChatFabricators from "discourse/plugins/chat/discourse/lib/fabricators";
|
||||||
|
|
||||||
module(
|
module(
|
||||||
|
@ -2,7 +2,7 @@ import { render } from "@ember/test-helpers";
|
|||||||
import hbs from "htmlbars-inline-precompile";
|
import hbs from "htmlbars-inline-precompile";
|
||||||
import { module, test } from "qunit";
|
import { module, test } from "qunit";
|
||||||
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
||||||
import { i18n } from 'discourse-i18n';
|
import { i18n } from "discourse-i18n";
|
||||||
import ChatChannel from "discourse/plugins/chat/discourse/models/chat-channel";
|
import ChatChannel from "discourse/plugins/chat/discourse/models/chat-channel";
|
||||||
|
|
||||||
module(
|
module(
|
||||||
|
@ -3,7 +3,7 @@ import { render } from "@ember/test-helpers";
|
|||||||
import hbs from "htmlbars-inline-precompile";
|
import hbs from "htmlbars-inline-precompile";
|
||||||
import { module, test } from "qunit";
|
import { module, test } from "qunit";
|
||||||
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
||||||
import { i18n } from 'discourse-i18n';
|
import { i18n } from "discourse-i18n";
|
||||||
import ChatFabricators from "discourse/plugins/chat/discourse/lib/fabricators";
|
import ChatFabricators from "discourse/plugins/chat/discourse/lib/fabricators";
|
||||||
|
|
||||||
module(
|
module(
|
||||||
|
@ -4,7 +4,7 @@ import sinon from "sinon";
|
|||||||
import { fixturesByUrl } from "discourse/tests/helpers/create-pretender";
|
import { fixturesByUrl } from "discourse/tests/helpers/create-pretender";
|
||||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { cloneJSON } from "discourse-common/lib/object";
|
import { cloneJSON } from "discourse-common/lib/object";
|
||||||
import { i18n } from 'discourse-i18n';
|
import { i18n } from "discourse-i18n";
|
||||||
|
|
||||||
acceptance(
|
acceptance(
|
||||||
"Local Dates - Download calendar without default calendar option set",
|
"Local Dates - Download calendar without default calendar option set",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import QUnit, { module, test } from "qunit";
|
import QUnit, { module, test } from "qunit";
|
||||||
import { i18n } from 'discourse-i18n';
|
import { i18n } from "discourse-i18n";
|
||||||
import freezeTime from "../helpers/freeze-time";
|
import freezeTime from "../helpers/freeze-time";
|
||||||
import LocalDateBuilder from "../lib/local-date-builder";
|
import LocalDateBuilder from "../lib/local-date-builder";
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ import {
|
|||||||
acceptance,
|
acceptance,
|
||||||
updateCurrentUser,
|
updateCurrentUser,
|
||||||
} from "discourse/tests/helpers/qunit-helpers";
|
} from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { i18n } from 'discourse-i18n';
|
import { i18n } from "discourse-i18n";
|
||||||
import { displayPollBuilderButton } from "discourse/plugins/poll/helpers/display-poll-builder-button";
|
import { displayPollBuilderButton } from "discourse/plugins/poll/helpers/display-poll-builder-button";
|
||||||
|
|
||||||
acceptance("Poll Builder - polls are enabled", function (needs) {
|
acceptance("Poll Builder - polls are enabled", function (needs) {
|
||||||
|
@ -2,7 +2,7 @@ import { click, render } from "@ember/test-helpers";
|
|||||||
import hbs from "htmlbars-inline-precompile";
|
import hbs from "htmlbars-inline-precompile";
|
||||||
import { module, test } from "qunit";
|
import { module, test } from "qunit";
|
||||||
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
||||||
import { i18n } from 'discourse-i18n';
|
import { i18n } from "discourse-i18n";
|
||||||
|
|
||||||
const OPTIONS = [
|
const OPTIONS = [
|
||||||
{ id: "1ddc47be0d2315b9711ee8526ca9d83f", html: "This", votes: 0, rank: 0 },
|
{ id: "1ddc47be0d2315b9711ee8526ca9d83f", html: "This", votes: 0, rank: 0 },
|
||||||
|
Reference in New Issue
Block a user