Skip to content

Commit

Permalink
Spell checking
Browse files Browse the repository at this point in the history
  • Loading branch information
anoek committed Jan 6, 2024
1 parent 3337b2d commit f0d3b61
Show file tree
Hide file tree
Showing 31 changed files with 2,951 additions and 2,127 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ module.exports = {
"error",
{
rules: {
"file-header": [true, "[Cc]opyright ([(][Cc][)])?\\s*[Oo]nline-[gG]o.com"],
"file-header": [true, "[Cc]opyright ([(][Cc][)])?\\s*[Oo]nline-[gG]o.com"], // cspell: disable-line
"import-spacing": true,
whitespace: [
true,
Expand Down
188 changes: 188 additions & 0 deletions .vscode/cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
{
"words": [
"abcdefghjklmnopqrstuvwxyz",
"AILR",
"aireview",
"annulable",
"anoek",
"apikey",
"appinfo",
"automatch",
"automatcher",
"automatchers",
"automod",
"autoplace",
"autoplaying",
"autoscore",
"Autoscoring",
"autoscroll",
"autoscrolling",
"Baduk",
"badukpop",
"benjito",
"bitfield",
"boardsize",
"bufferutil",
"byoyomi",
"cacheable",
"chillout",
"clearpen",
"cmove",
"cmoves",
"coor",
"covay",
"crosshairs",
"csrfmiddlewaretoken",
"csrftoken",
"cssnano",
"cwrap",
"DATETIME",
"dedup",
"deepl",
"deinit",
"deinitialize",
"Dismissable",
"dndkit",
"dont",
"DOTCSS",
"DOTJS",
"droppables",
"enableable",
"Errcode",
"fakelink",
"fuggly",
"Fuseki",
"gamedata",
"gamelist",
"gamestart",
"gettext",
"glicko",
"goban",
"Gobans",
"goquest",
"groupify",
"Gulpfile",
"hane",
"HDPI",
"Heatmaps",
"hilight",
"hostinfo",
"hoverable",
"icontains",
"iframes",
"inet",
"isobranch",
"Isobranches",
"istartswith",
"JGOF",
"JGOFAI",
"joseki",
"josekipedia",
"josekis",
"jsonify",
"Kata",
"katago",
"kidsgo",
"kidsgoserver",
"kyus",
"Leela",
"lerp",
"linebreak",
"localstorage",
"malk",
"malkovich",
"maxx",
"maxy",
"MDPI",
"meijin",
"merchantlog",
"minigoban",
"miny",
"misclick",
"misclicks",
"modlog",
"movetree",
"msgid",
"ngettext",
"nochallenge",
"nodetails",
"Noek",
"noextracontrols",
"nolink",
"noresult",
"npgettext",
"nums",
"offtopic",
"omnisearch",
"opengotha",
"pgettext",
"Phong",
"Pixi",
"playouts",
"pluralidx",
"pofile",
"postback",
"rengo",
"replot",
"roundrobin",
"rrule",
"Ruleset",
"scurve",
"seekgraph",
"Seki",
"semeai",
"sepa",
"sgfs",
"shadowban",
"shadowbanned",
"shownotesindicator",
"Sitewide",
"slowstrobe",
"sodos",
"stdev",
"styl",
"sublicensable",
"subprops",
"subselect",
"subtool",
"superchat",
"superko",
"swal",
"sweetalert",
"tenuki",
"testuser",
"tesuji",
"Timecop",
"timedelta",
"tock",
"traceback",
"trashable",
"tsumegodojo",
"tygem",
"tzoffset",
"udata",
"uffizzi",
"unannulable",
"undismissable",
"unflagged",
"unhighlight",
"unitify",
"Unranked",
"unstarted",
"uservoice",
"usgc",
"Voronoi",
"wbaduk",
"websockets",
"Weiqi",
"whitespaces",
"winrate",
"xgettext",
"xxyy",
"yesno",
"yike",
"yomi",
"zoomable"
],
"language": "en,en-GB"
}
26 changes: 16 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"prettier:check": "prettier --check \"src/**/*.{ts,tsx}\"",
"checks": "npm run lint && npm run prettier:check",
"test": "jest",
"spellcheck": "cspell \"src/**/*.{ts,tsx}\"",
"test-coverage-summary": "jest --coverage --coverageReporters=text-summary"
},
"repository": {
Expand All @@ -47,24 +48,28 @@
"@types/node": "^18.11.15",
"@types/react": "^18.0.28",
"@types/react-dom": "^18.0.11",
"@typescript-eslint/eslint-plugin": "^5.56.0",
"@typescript-eslint/eslint-plugin-tslint": "^5.56.0",
"@typescript-eslint/parser": "^5.56.0",
"@typescript-eslint/eslint-plugin": "^6.14.0",
"@typescript-eslint/eslint-plugin-tslint": "^6.14.0",
"@typescript-eslint/parser": "^6.14.0",
"bufferutil": "^4.0.7",
"canvas": "^2.10.2",
"eslint": "^8.29.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-jsdoc": "^39.6.4",
"eslint-plugin-prettier": "^4.2.1",
"cspell": "^8.3.2",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jsdoc": "^46.9.1",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-prefer-arrow": "^1.2.3",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-unicorn": "^49.0.0",
"fork-ts-checker-webpack-plugin": "^6.3.4",
"husky": "^8.0.1",
"jest": "^29.5.0",
"jest-environment-jsdom": "^28.1.3",
"jest-transform-stub": "^2.0.0",
"jest-websocket-mock": "^2.4.0",
"lint-staged": "^12.1.7",
"prettier": "^2.6.2",
"prettier-eslint": "^15.0.0",
"prettier": "^3.1.1",
"prettier-eslint": "^16.0.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"svg-inline-loader": "0.8.2",
Expand All @@ -85,7 +90,8 @@
},
"lint-staged": {
"src/**/*.{ts,tsx}": [
"eslint"
"eslint",
"cspell"
]
}
}
10 changes: 5 additions & 5 deletions src/AIReview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,23 +90,23 @@ export function getWorstMoves(
max_moves: number = 3,
): Array<AIReviewWorstMoveEntry> {
let worst_moves: AIReviewWorstMoveEntry[];
let threshhold: number;
let threshold: number;

if (ai_review.scores) {
worst_moves = computeWorstMoves(starting_move, ai_review, /*use_score=*/ true);
threshhold = -5.0;
threshold = -5.0;
} else {
worst_moves = computeWorstMoves(starting_move, ai_review);
threshhold = -0.2;
threshold = -0.2;
}

const filtered_worst_moves = worst_moves.filter((de) => de.delta <= threshhold);
const filtered_worst_moves = worst_moves.filter((de) => de.delta <= threshold);

if (filtered_worst_moves.length >= max_moves) {
return filtered_worst_moves.slice(0, max_moves);
}

// If there weren't enough moves below the threshhold, just return the top
// If there weren't enough moves below the threshold, just return the top
// three.
return worst_moves.slice(0, max_moves);
}
2 changes: 1 addition & 1 deletion src/AdHocFormat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export interface AdHocClock {
/** Current server time, in milliseconds since 1970 */
//now:number;

/** Time the game was paused. This field erronously exists even after the
/** Time the game was paused. This field erroneously exists even after the
* game has been resumed, this will be removed in these cases. */
paused_since?: number;

Expand Down
Loading

0 comments on commit f0d3b61

Please sign in to comment.