diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index c2cef78b8ad..00000000000 --- a/.eslintrc +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "eslint-config-discourse", - "rules": { - "discourse-ember/global-ember": "error", - "eol-last": "error", - "no-restricted-globals": "off", - "no-restricted-imports": ["error", { "paths": ["I18n"] }] - } -} diff --git a/.eslintrc.cjs b/.eslintrc.cjs new file mode 100644 index 00000000000..be1a9f3f46c --- /dev/null +++ b/.eslintrc.cjs @@ -0,0 +1 @@ +module.exports = require("@discourse/lint-configs/eslint"); diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index 8a1423e9391..00000000000 --- a/.prettierrc +++ /dev/null @@ -1,17 +0,0 @@ -{ - "plugins": ["prettier-plugin-ember-template-tag"], - "overrides": [ - { - "files": "*.gjs", - "options": { - "parser": "ember-template-tag" - } - }, - { - "files": "*.gts", - "options": { - "parser": "ember-template-tag" - } - } - ] -} diff --git a/.prettierrc.cjs b/.prettierrc.cjs new file mode 100644 index 00000000000..57f647bc84c --- /dev/null +++ b/.prettierrc.cjs @@ -0,0 +1 @@ +module.exports = require("@discourse/lint-configs/prettier"); diff --git a/.template-lintrc.js b/.template-lintrc.js index 8fc14a870cf..f78c8dc4f3f 100644 --- a/.template-lintrc.js +++ b/.template-lintrc.js @@ -1,34 +1,10 @@ -module.exports = { - plugins: ["ember-template-lint-plugin-discourse"], - extends: "discourse:recommended", +const templateLint = require("@discourse/lint-configs/template-lint"); +module.exports = { + ...templateLint, rules: { - "no-action-modifiers": true, - "no-args-paths": true, - "no-attrs-in-components": true, + ...templateLint.rules, "no-capital-arguments": false, // TODO: we extensively use `args` argument name - "no-curly-component-invocation": { - allow: [ - // These are helpers, not components - "directory-item-header-title", - "directory-item-user-field-value", - "directory-item-value", - "directory-table-header-title", - "loading-spinner", - "directory-item-label", - "hide-application-footer", - ], - }, - "no-implicit-this": { - allow: ["loading-spinner", "hide-application-footer"], - }, - "require-mandatory-role-attributes": false, - "require-media-caption": false, - // Begin prettier compatibility - "eol-last": false, - "self-closing-void-elements": false, - "block-indentation": false, - quotes: false, - // End prettier compatibility + "require-button-type": false, }, }; diff --git a/app/assets/javascripts/discourse/app/components/cook-text.gjs b/app/assets/javascripts/discourse/app/components/cook-text.gjs index c7327bfef99..22c871c2e6b 100644 --- a/app/assets/javascripts/discourse/app/components/cook-text.gjs +++ b/app/assets/javascripts/discourse/app/components/cook-text.gjs @@ -52,7 +52,6 @@ export default class CookText extends Component { }