start with ESlint
This commit is contained in:
@@ -0,0 +1,2 @@
|
|||||||
|
node_modules
|
||||||
|
.next
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"env": {
|
||||||
|
"browser": true,
|
||||||
|
"es6": true
|
||||||
|
},
|
||||||
|
"extends": [
|
||||||
|
"eslint:recommended",
|
||||||
|
"plugin:react/recommended",
|
||||||
|
"plugin:prettier/recommended"
|
||||||
|
],
|
||||||
|
"globals": {
|
||||||
|
"Atomics": "readonly",
|
||||||
|
"SharedArrayBuffer": "readonly"
|
||||||
|
},
|
||||||
|
"parserOptions": {
|
||||||
|
"ecmaVersion": 2018,
|
||||||
|
"sourceType": "module"
|
||||||
|
},
|
||||||
|
"rules": {
|
||||||
|
"quotes": [
|
||||||
|
2,
|
||||||
|
"double"
|
||||||
|
],
|
||||||
|
"camelcase": "off"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -5,3 +5,5 @@ packets/*
|
|||||||
img/*
|
img/*
|
||||||
|
|
||||||
.htaccess
|
.htaccess
|
||||||
|
|
||||||
|
node_modules
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
package-lock.json
|
||||||
|
.next
|
||||||
|
node_modules/
|
||||||
Vendored
+7
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"editor.autoIndent": "keep",
|
||||||
|
"javascript.format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": false,
|
||||||
|
"javascript.format.insertSpaceAfterKeywordsInControlFlowStatements": false,
|
||||||
|
"javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": false,
|
||||||
|
"javascript.format.enable": false
|
||||||
|
}
|
||||||
@@ -583,6 +583,7 @@ img {
|
|||||||
z-index: 2;
|
z-index: 2;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: lightgray;
|
color: lightgray;
|
||||||
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
#review-overlay {
|
#review-overlay {
|
||||||
|
|||||||
+1
-1
@@ -109,7 +109,7 @@
|
|||||||
<script src="lib/dexie.js"></script>
|
<script src="lib/dexie.js"></script>
|
||||||
<script src="lib/jquery.modal.min.js"></script>
|
<script src="lib/jquery.modal.min.js"></script>
|
||||||
<!-- <script src="packets/rr1" defer="defer"></script> -->
|
<!-- <script src="packets/rr1" defer="defer"></script> -->
|
||||||
<script src="js/main.js" defer="defer"></script>
|
<script src="js/main.js" defer="defer" type="module"></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
/**
|
||||||
|
* Function to randomise an array order
|
||||||
|
* @param {array} array
|
||||||
|
*/
|
||||||
|
export function shuffleArray(array) {
|
||||||
|
var currentIndex = array.length, temporaryValue, randomIndex;
|
||||||
|
// While there remain elements to shuffle...
|
||||||
|
while (0 !== currentIndex) {
|
||||||
|
// Pick a remaining element...
|
||||||
|
randomIndex = Math.floor(Math.random() * currentIndex);
|
||||||
|
currentIndex -= 1;
|
||||||
|
// And swap it with the current element.
|
||||||
|
temporaryValue = array[currentIndex];
|
||||||
|
array[currentIndex] = array[randomIndex];
|
||||||
|
array[randomIndex] = temporaryValue;
|
||||||
|
}
|
||||||
|
return array;
|
||||||
|
}
|
||||||
+339
-237
File diff suppressed because it is too large
Load Diff
Generated
+1101
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"name": "rts",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "RTS is a quick and dirty clone of the RCR radiology test system that supports the full set of RCR exam types (Anatomy / Rapid / Longs).",
|
||||||
|
"main": "index.js",
|
||||||
|
"directories": {
|
||||||
|
"lib": "lib"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/xkjq/rts.git"
|
||||||
|
},
|
||||||
|
"author": "",
|
||||||
|
"license": "GPL",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/xkjq/rts/issues"
|
||||||
|
},
|
||||||
|
"homepage": "https://github.com/xkjq/rts#readme",
|
||||||
|
"devDependencies": {
|
||||||
|
"eslint": "^6.8.0",
|
||||||
|
"eslint-config-google": "^0.14.0"
|
||||||
|
},
|
||||||
|
"lint": "eslint --fix . && echo 'Lint complete.'"
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user