diff --git a/.eslintrc.json b/.eslintrc.json
index f4f0fe9..1e40eb7 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -15,7 +15,8 @@
"jsx": true
},
"ecmaVersion": 12,
- "sourceType": "module"
+ "sourceType": "module",
+ "project": "./tsconfig.json"
},
"plugins": [
"react",
@@ -31,11 +32,18 @@
"allman"
],
"indent": ["warn", 4, {
- "SwitchCase": 1
+ "SwitchCase": 1,
+ "VariableDeclarator": "first",
+ "FunctionDeclaration": {"parameters": "first"},
+ "CallExpression": {"arguments": "first"},
+ "ArrayExpression": "first",
+ "ObjectExpression": "first",
+ "ImportDeclaration": "first"
}],
"no-warning-comments": [1, {
"terms": ["todo", "fixme"]
}],
+ "no-multi-spaces": ["warn", {"ignoreEOLComments": true, "exceptions": {"ImportDeclaration": true}}],
"prefer-arrow-callback": "warn",
"prefer-const": "warn",
"prefer-destructuring": "warn",
@@ -77,7 +85,20 @@
"no-console": "warn",
"no-constant-binary-expression": "error",
"no-trailing-spaces": "warn",
+ "no-tabs": "error",
"quotes": ["error" , "single"],
+ "jsx-quotes": [
+ "error",
+ "prefer-single"
+ ],
+ "key-spacing": [
+ "warn",
+ {
+ "beforeColon": false,
+ "afterColon": true,
+ "align": "value"
+ }
+ ],
"guard-for-in": "warn",
"yoda": [
"warn",
diff --git a/src/App.tsx b/src/App.tsx
index 164fe84..f77a9ac 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -77,13 +77,13 @@ const App = () =>
const menuItems: SidebarMenuItem[] = [
{
- to: '/home', label: 'Home', items: [
+ to: '/home', label: 'Home', items: [
{ to: '/profile', label: 'Profile', relative: true },
{ to: '/applications', label: 'Applications', relative: true, permission: [ 'applications:*', 1 ] }
]
},
{
- to: '/admin', label: 'Admin', permission: [ 'administrator:*', 1 ], items: [
+ to: '/admin', label: 'Admin', permission: [ 'administrator:*', 1 ], items: [
{ to: '/users', label: 'Users', relative: true, permission: [ 'administrator:users:*', 1 ] },
{ to: '/roles', label: 'Roles', relative: true, permission: [ 'administrator:roles:*', 1 ] },
{ to: '/flags', label: 'Flags', relative: true, permission: [ 'administrator:flags:*', 1 ] },
@@ -101,7 +101,7 @@ const App = () =>
{user ?
diff --git a/src/components/InputElements.tsx b/src/components/InputElements.tsx
index 5da8c5b..40aff8c 100644
--- a/src/components/InputElements.tsx
+++ b/src/components/InputElements.tsx
@@ -25,11 +25,11 @@ export const FileSelector = ({ file, cb, types = '' }: { types?: string, file: F
cb(file);
};
- return