Skip to content

Commit

Permalink
[Debug UI] ESLint and Prettier for the debug UI code. (near#8594)
Browse files Browse the repository at this point in the history
Also corrects all the code that violates any issues found by ESLint and Prettier.
  • Loading branch information
robin-near authored Feb 21, 2023
1 parent 7e71791 commit 099109f
Show file tree
Hide file tree
Showing 36 changed files with 2,657 additions and 1,269 deletions.
32 changes: 32 additions & 0 deletions tools/debug-ui/.eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
env:
browser: true
es2021: true
extends:
- eslint:recommended
- plugin:react/recommended
- plugin:react/jsx-runtime
- plugin:@typescript-eslint/recommended
- plugin:import/recommended
- plugin:import/typescript
- prettier
overrides: []
parser: '@typescript-eslint/parser'
parserOptions:
ecmaVersion: latest
sourceType: module
plugins:
- react
- '@typescript-eslint'
rules:
import/order:
- error
"@typescript-eslint/no-non-null-assertion":
- off
"@typescript-eslint/no-unused-vars":
- error
settings:
import/resolver:
typescript: true
node: true
react:
version: detect
6 changes: 6 additions & 0 deletions tools/debug-ui/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"printWidth": 100,
"tabWidth": 4,
"singleQuote": true,
"bracketSameLine": true
}
6 changes: 6 additions & 0 deletions tools/debug-ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,9 @@ same keys are only fetched once.
It's also helpful to understand at a high level how the react-router library works; this is used
to support deep-linking in the URL (e.g. `/127.0.0.1/cluster` leads to the cluster page), allowing
the UI to be served as a single application.

### Linting & Formatting
The project is configured to use ESLint (error-checking) and Prettier (consistent formatting).

Run `npm run lint` to check for linting & formatting errors, and `npm run fix` to fix those that
can be automatically fixed.
Loading

0 comments on commit 099109f

Please sign in to comment.