mirror of
https://github.com/discourse/discourse.git
synced 2026-08-04 10:39:43 +08:00
We've been using basic type-checking via JSDoc for some time. This commit allows us to author proper `.ts`/`.gts` files, and use the full typescript syntax. Initially, only d-button and a single chat file are migrated, as proof of functionality. In future, we may migrate more files, and consider making our tsconfig more strict.
44 lines
914 B
JavaScript
Vendored
44 lines
914 B
JavaScript
Vendored
import DiscourseRecommended from "@discourse/lint-configs/eslint";
|
|
|
|
export default [
|
|
...DiscourseRecommended,
|
|
{
|
|
rules: {
|
|
"ember/template-no-capital-arguments": "off",
|
|
"ember/template-require-button-type": "off",
|
|
},
|
|
},
|
|
{
|
|
ignores: [
|
|
"plugins/**/lib/javascripts/locale",
|
|
"plugins/discourse-math/public",
|
|
"public/",
|
|
"vendor/",
|
|
"**/node_modules/",
|
|
"spec/",
|
|
"frontend/discourse/dist/",
|
|
"**/*.d.ts",
|
|
"frontend/discourse-types/external-types",
|
|
"frontend/discourse-types/dts-generator.{js,ts}",
|
|
"tmp/",
|
|
],
|
|
},
|
|
{
|
|
files: ["themes/**/*.{js,gjs,ts,gts}"],
|
|
languageOptions: {
|
|
globals: {
|
|
settings: "readonly",
|
|
themePrefix: "readonly",
|
|
},
|
|
},
|
|
},
|
|
{
|
|
languageOptions: {
|
|
parserOptions: {
|
|
babelOptions: {
|
|
configFile: false,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
];
|