Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down Expand Up @@ -88,6 +95,9 @@
"commonjs": false
},
"parserOptions": {
"parser": {
"ts": "@typescript-eslint/parser"
},
"sourceType": "module",
"ecmaVersion": 2022
},
Expand Down Expand Up @@ -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"
}
}
]
}
6 changes: 6 additions & 0 deletions docs/en/contributing/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<script lang="ts">` in `.vue` files), and existing files can be converted when you're working in them, or left as JavaScript. If you edit a file that's already TypeScript, keep it TypeScript.

TypeScript isn't supported in `/nodes` yet, since it needs a compile step that hasn't been added.

Run `npm run typecheck` to check types. It also runs as part of `npm run lint`.

## Running Documentation Locally

Expand Down
16 changes: 16 additions & 0 deletions nodes/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"compilerOptions": {
"target": "es2020",
"lib": ["es2020"],
"module": "node16",
"moduleResolution": "node16",
"allowJs": true,
"checkJs": false,
"strict": true,
"noEmit": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"types": ["node"]
},
"include": ["**/*.ts", "**/*.js"]
}
Loading
Loading