start with ESlint

This commit is contained in:
ross
2020-04-28 13:18:28 +01:00
parent 93f029a8bb
commit e5c49d91bf
11 changed files with 1886 additions and 597 deletions
+2
View File
@@ -0,0 +1,2 @@
node_modules
.next
+26
View File
@@ -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"
}
}
+2
View File
@@ -5,3 +5,5 @@ packets/*
img/* img/*
.htaccess .htaccess
node_modules
+3
View File
@@ -0,0 +1,3 @@
package-lock.json
.next
node_modules/
+7
View File
@@ -0,0 +1,7 @@
{
"editor.autoIndent": "keep",
"javascript.format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": false,
"javascript.format.insertSpaceAfterKeywordsInControlFlowStatements": false,
"javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": false,
"javascript.format.enable": false
}
+1
View File
@@ -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
View File
@@ -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>
+18
View File
@@ -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
View File
File diff suppressed because it is too large Load Diff
+1101
View File
File diff suppressed because it is too large Load Diff
+27
View File
@@ -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.'"
}