aboutsummaryrefslogtreecommitdiffstats
path: root/webui
diff options
context:
space:
mode:
authorludovicm67 <ludovicmuller1@gmail.com>2020-02-12 23:39:23 +0100
committerludovicm67 <ludovicmuller1@gmail.com>2020-02-12 23:39:23 +0100
commitab09c03a1e55d5c2e35f332f0e5f6335c1670427 (patch)
tree3680c4915fce4a248db94a85f90ca38d44d2d0e1 /webui
parentc48a4dc79464d8b5f1d0912bc2a14c02d9509cee (diff)
downloadgit-bug-ab09c03a1e55d5c2e35f332f0e5f6335c1670427.tar.gz
webui: format some files
Diffstat (limited to 'webui')
-rw-r--r--webui/.eslintrc.js59
-rw-r--r--webui/Readme.md5
-rw-r--r--webui/tsconfig.json15
-rw-r--r--webui/types/remark-html/index.d.ts4
-rw-r--r--webui/types/remark-react/index.d.ts4
5 files changed, 42 insertions, 45 deletions
diff --git a/webui/.eslintrc.js b/webui/.eslintrc.js
index 2b4a60de..7adbb8d5 100644
--- a/webui/.eslintrc.js
+++ b/webui/.eslintrc.js
@@ -1,32 +1,37 @@
module.exports = {
extends: [
- "react-app",
- "prettier/@typescript-eslint",
- "plugin:prettier/recommended"
- ],
- plugins: [
- "graphql"
+ 'react-app',
+ 'prettier/@typescript-eslint',
+ 'plugin:prettier/recommended',
],
+ plugins: ['graphql'],
rules: {
- "graphql/template-strings": ["error", {
- "schemaJson": require("./src/schema.json"),
- "env": "literal"
- }],
- "import/order": [
- "error", {
- "alphabetize": {"order": "asc"},
- "pathGroups": [{
- "pattern": "@material-ui/**",
- "group": "external",
- "position": "after"
- }, {
- "pattern": "*.generated",
- "group": "sibling",
- "position": "after"
- }],
- "groups": [["builtin", "external"], "parent", ["sibling", "index"]],
- "newlines-between": "always"
- }
- ]
- }
+ 'graphql/template-strings': [
+ 'error',
+ {
+ schemaJson: require('./src/schema.json'),
+ env: 'literal',
+ },
+ ],
+ 'import/order': [
+ 'error',
+ {
+ alphabetize: { order: 'asc' },
+ pathGroups: [
+ {
+ pattern: '@material-ui/**',
+ group: 'external',
+ position: 'after',
+ },
+ {
+ pattern: '*.generated',
+ group: 'sibling',
+ position: 'after',
+ },
+ ],
+ groups: [['builtin', 'external'], 'parent', ['sibling', 'index']],
+ 'newlines-between': 'always',
+ },
+ ],
+ },
};
diff --git a/webui/Readme.md b/webui/Readme.md
index e75fa6b8..2ba94b5d 100644
--- a/webui/Readme.md
+++ b/webui/Readme.md
@@ -7,10 +7,11 @@
2. Run the GraphQL backend on the port 3001
- `./git-bug webui -p 3001`
3. Run the hot-reloadable development WebUI
+
- run `npm start` in the **webui** directory
-
+
The development version of the WebUI is configured to query the backend on the port 3001. You can now live edit the js code and use the normal backend.
## Bundle the web UI
-Once the webUI is good enough for a new release, run `make pack-webui` from the root directory to bundle the compiled js into the go binary. \ No newline at end of file
+Once the webUI is good enough for a new release, run `make pack-webui` from the root directory to bundle the compiled js into the go binary.
diff --git a/webui/tsconfig.json b/webui/tsconfig.json
index 705bae44..30ba544b 100644
--- a/webui/tsconfig.json
+++ b/webui/tsconfig.json
@@ -1,11 +1,7 @@
{
"compilerOptions": {
"target": "es5",
- "lib": [
- "dom",
- "dom.iterable",
- "esnext"
- ],
+ "lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
@@ -18,12 +14,7 @@
"isolatedModules": true,
"noEmit": true,
"jsx": "react",
- "typeRoots": [
- "node_modules/@types/",
- "types/"
- ]
+ "typeRoots": ["node_modules/@types/", "types/"]
},
- "include": [
- "src"
- ]
+ "include": ["src"]
}
diff --git a/webui/types/remark-html/index.d.ts b/webui/types/remark-html/index.d.ts
index 6b6e7ef7..1a1f80bf 100644
--- a/webui/types/remark-html/index.d.ts
+++ b/webui/types/remark-html/index.d.ts
@@ -1,6 +1,6 @@
-declare module "remark-html" {
+declare module 'remark-html' {
import { Plugin } from 'unified';
const plugin: Plugin;
export default plugin;
-};
+}
diff --git a/webui/types/remark-react/index.d.ts b/webui/types/remark-react/index.d.ts
index aa5e6bcb..89f48af2 100644
--- a/webui/types/remark-react/index.d.ts
+++ b/webui/types/remark-react/index.d.ts
@@ -1,6 +1,6 @@
-declare module "remark-react" {
+declare module 'remark-react' {
import { Plugin } from 'unified';
const plugin: Plugin;
export default plugin;
-};
+}