diff --git a/.eslintrc.json b/.eslintrc.json index 897564c50..25ceb311b 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -19,6 +19,13 @@ "ecmaVersion": 2022 }, "ignorePatterns": ["dist/", "*.svg", "*.xml"], + "settings": { + "import/resolver": { + "node": { + "extensions": [".mjs", ".js", ".json", ".node", ".ts"] + } + } + }, "rules": { // Inbuilt "indent": ["error", 4], @@ -88,6 +95,9 @@ "commonjs": false }, "parserOptions": { + "parser": { + "ts": "@typescript-eslint/parser" + }, "sourceType": "module", "ecmaVersion": 2022 }, @@ -139,6 +149,18 @@ "promise/always-return": "off", "promise/catch-or-return": "off" } + }, + + { + "files": "*.ts", + "parser": "@typescript-eslint/parser", + "plugins": ["@typescript-eslint"], + "rules": { + "no-undef": "off", + "no-redeclare": "off", + "no-unused-vars": "off", + "@typescript-eslint/no-unused-vars": "error" + } } ] } diff --git a/docs/en/contributing/index.md b/docs/en/contributing/index.md index 8bacdeef4..7a9ca28dd 100644 --- a/docs/en/contributing/index.md +++ b/docs/en/contributing/index.md @@ -104,7 +104,13 @@ A [VitePress](https://vitepress.dev/) documentation site that is used to generat ``` 7. In your forked dashboard repository (on Github), switch to the new branch and [create a pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request). +## TypeScript +TypeScript is optional. In `/ui`, new files can be written as `.ts` (or `