Skip to content
This repository has been archived by the owner on Aug 15, 2022. It is now read-only.

Commit

Permalink
style: fixed a lot of the formatting and added linting/formatting con…
Browse files Browse the repository at this point in the history
…figuration files
  • Loading branch information
animafps committed Oct 5, 2021
1 parent 7c8ac1a commit 0cd07c6
Show file tree
Hide file tree
Showing 44 changed files with 739 additions and 1,730 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ insert_final_newline = true
charset = utf-8
trim_trailing_whitespace = true

[*.{js,ts}]
[*.{js,ts,json}]
indent_size = 4
indent_style = tab
block_comment_start = /*
Expand Down
21 changes: 21 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"env": {
"es2021": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": ["@typescript-eslint"],
"rules": {
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-explicit-any": "off"
}
}
7 changes: 7 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"trailingComma": "es5",
"tabWidth": 4,
"useTabs": true,
"semi": false,
"singleQuote": true
}
22 changes: 19 additions & 3 deletions .yarn/sdks/typescript/lib/tsserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,25 @@ const moduleWrapper = tsserver => {
}

function fromEditorPath(str) {
return process.platform === `win32`
? str.replace(/^\^?zip:\//, ``)
: str.replace(/^\^?zip:/, ``);
switch (hostInfo) {
case `coc-nvim`:
case `neovim`: {
str = str.replace(/\.zip::/, `.zip/`);
// The path for coc-nvim is in format of /<pwd>/zipfile:/<pwd>/.yarn/...
// So in order to convert it back, we use .* to match all the thing
// before `zipfile:`
return process.platform === `win32`
? str.replace(/^.*zipfile:\//, ``)
: str.replace(/^.*zipfile:/, ``);
} break;

case `vscode`:
default: {
return process.platform === `win32`
? str.replace(/^\^?zip:\//, ``)
: str.replace(/^\^?zip:/, ``);
} break;
}
}

// Force enable 'allowLocalPluginLoads'
Expand Down
22 changes: 19 additions & 3 deletions .yarn/sdks/typescript/lib/tsserverlibrary.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,25 @@ const moduleWrapper = tsserver => {
}

function fromEditorPath(str) {
return process.platform === `win32`
? str.replace(/^\^?zip:\//, ``)
: str.replace(/^\^?zip:/, ``);
switch (hostInfo) {
case `coc-nvim`:
case `neovim`: {
str = str.replace(/\.zip::/, `.zip/`);
// The path for coc-nvim is in format of /<pwd>/zipfile:/<pwd>/.yarn/...
// So in order to convert it back, we use .* to match all the thing
// before `zipfile:`
return process.platform === `win32`
? str.replace(/^.*zipfile:\//, ``)
: str.replace(/^.*zipfile:/, ``);
} break;

case `vscode`:
default: {
return process.platform === `win32`
? str.replace(/^\^?zip:\//, ``)
: str.replace(/^\^?zip:/, ``);
} break;
}
}

// Force enable 'allowLocalPluginLoads'
Expand Down
2 changes: 1 addition & 1 deletion .yarn/sdks/typescript/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "typescript",
"version": "4.3.5-sdk",
"version": "4.4.3-sdk",
"main": "./lib/typescript.js",
"type": "commonjs"
}
14 changes: 7 additions & 7 deletions docs/commands/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Below is a shortlist of all the bot commands.

**Hint**: You can click on a command to go to its full help entry.

| **Command** | **Description ** |
| **Command** | **Description** |
| ---------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
| [`arcmin`](math.md#arcmin) | Converts Sensitivity to arcmin |
| [`convert`](math.md#convert) | Converts Different Sensitivities from one game to another |
Expand All @@ -32,9 +32,9 @@ Below is a shortlist of all the bot commands.

## Miscellaneous Commands

| **Command** | **Description ** |
| **Command** | **Description** |
| --------------------------- | --------------------------------------------------------------------------------------- |
| [`cminfo `](misc.md#cminfo) | Displays an explanation for what cm/rev \(cm/rev\) is |
| [`cminfo`](misc.md#cminfo) | Displays an explanation for what cm/rev \(cm/rev\) is |
| [`gameinfo`](misc.md#games) | Displays the information associated for a game |
| [`games`](misc.md#games) | Displays the supported games for this bot |
| [`info`](misc.md#info) | Displays the major information about this bot |
Expand All @@ -45,10 +45,10 @@ Below is a shortlist of all the bot commands.

For commands that accept input, you'll see keys with the following:

- `<required>` - parameters between `<>` must be included with the command
- `[optional]` - parameters between `[]` are optional parameters and may be excluded
- `a | or | b` - `|` means that you can use the parameters on either side of the symbol
- `repeat...` - means that you can provide multiple parameters as input
- `<required>` - parameters between `<>` must be included with the command
- `[optional]` - parameters between `[]` are optional parameters and may be excluded
- `a | or | b` - `|` means that you can use the parameters on either side of the symbol
- `repeat...` - means that you can provide multiple parameters as input

These may be nested. Example: `[parameter1 <parameter2>]` means that the input is optional, but if you provide parameter1 then parameter2 is required. `[parameter...]` means that input is optional, and that the input can be any number of parameters.

Expand Down
3 changes: 1 addition & 2 deletions docs/commands/math.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ title: Math

## Commands


### arcmin
### arcmin

Converts sensitivity to arcmin

Expand Down
2 changes: 0 additions & 2 deletions docs/commands/misc.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,3 @@ Tests the latency
```text
fps-ping
```


6 changes: 3 additions & 3 deletions docs/games.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: 'Supported Games'
---

All the games that FPSMath supports and the features that are avaliable for certain commands
All the games that FPSMath supports and the features that are available for certain commands

| Game/ Engine | Aliases/ Game Code | yaw | fov |
| ------------------------------ | ---------------------------------------------------- | --- | --- |
Expand All @@ -17,8 +17,8 @@ All the games that FPSMath supports and the features that are avaliable for cert
| Krunker | `krunker` | ✔️ | ✔️ |
| Minecraft | `mc`, `minecraft` | ✔️ | ✔️ |
| Overwatch | `ow`, `overwatch` | ✔️ | ✔️ |
| Palidins | `palidins` || ✔️ |
| PlayersUnkowns: Battleground | `pubg` | ✔️ | ✔️ |
| Paladins | `paladins` || ✔️ |
| PlayersUnknowns: Battleground | `pubg` | ✔️ | ✔️ |
| Quake | `quake` | ✔️ | ✔️ |
| Quake Champions | `qc`, `quake-champions` | ✔️ | ✔️ |
| Rainbow Six: Siege | `r6`, `rainbow6`, `r6s`, `rainbow6s`, `seige` | ✔️ | ✔️ |
Expand Down
16 changes: 7 additions & 9 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
title: Welcome!
---

# Welcome!

!!! tip
This documentation outlines everything there is to know about FPSMath.

Expand All @@ -15,13 +13,13 @@ FPSMath is a Discord bot designed to convert video game sensitivities, FOV value

## Why FPSMath

- FPSMath is the only calculation bot for everything to do with video game calculations
- Has over [20 games supported](games.md) and many more are added weekly so you can convert for your favorite games
- Supports over 5 different units of sensitivity measurement(cm/360, MPI, arcmin, deg/mm, inch/360)
- Allows for custom yaw values and FoV types so even if a game is not officially supported/aliased you can still do the calculations and conversions
- It's even [open source](https://github.com/animafps/fpsmath)!
- FPSMath is the only calculation bot for everything to do with video game calculations
- Has over [20 games supported](games.md) and many more are added weekly so you can convert for your favorite games
- Supports over 5 different units of sensitivity measurement(cm/360, MPI, arcmin, deg/mm, inch/360)
- Allows for custom yaw values and FoV types so even if a game is not officially supported/aliased you can still do the calculations and conversions
- It's even [open source](https://github.com/animafps/fpsmath)!

!!! caution
Under Construction
!!! caution
Under Construction

More Info Coming Soon!
71 changes: 42 additions & 29 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,48 @@ edit_uri: edit/main/docs/
site_description: 'Documentation for the FPSMath Discord Bot'
copyright: <p xmlns:cc="http://creativecommons.org/ns#" xmlns:dct="http://purl.org/dc/terms/"><a property="dct:title" rel="cc:attributionURL" href="https://fpsmath.animafps.xyz">FPSMath Docs</a> by <a rel="cc:attributionURL dct:creator" property="cc:attributionName" href="https://animafps.xyz">Anima</a> is licensed under <a href="http://creativecommons.org/licenses/by-sa/4.0/" target="_blank" rel="license noopener noreferrer" style="display:inline-block;">CC BY-SA 4.0<img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/cc.svg"><img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/by.svg"><img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/sa.svg"></a></p>
theme:
font: false
favicon: assets/images/logo.png
features:
- navigation.instant
- navigation.top
palette:
scheme: slate
name: 'material'
custom_dir: docs/overrides
font: false
favicon: assets/images/logo.png
features:
- navigation.instant
- navigation.top
palette:
- media: '(prefers-color-scheme: light)'
scheme: default
primary: indigo
accent: indigo
toggle:
icon: material/toggle-switch-off-outline
name: Switch to dark mode
- media: '(prefers-color-scheme: dark)'
scheme: slate
primary: blue
accent: blue
toggle:
icon: material/toggle-switch
name: Switch to light mode
name: 'material'
custom_dir: docs/overrides
extra:
social:
- icon: fontawesome/brands/discord
link: https://discord.gg/Bg2gNT35s9
name: Support Discord server
analytics:
provider: custom
social:
- icon: fontawesome/brands/discord
link: https://discord.gg/Bg2gNT35s9
name: Support Discord server
analytics:
provider: custom
markdown_extensions:
- attr_list
- meta
- admonition
- toc:
permalink: true
- attr_list
- meta
- admonition
- toc:
permalink: true
nav:
- Introduction: index.md
- getting-started.md
- Commands:
- commands/index.md
- commands/math.md
- commands/misc.md
- Other:
- games.md
- Changelog: changelog.md
- Introduction: index.md
- getting-started.md
- Commands:
- commands/index.md
- commands/math.md
- commands/misc.md
- Other:
- games.md
- Changelog: changelog.md
Loading

0 comments on commit 0cd07c6

Please sign in to comment.