isaacscript 2.0.13-dev.0 → 2.0.14-dev.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +674 -0
- package/README.md +4 -6
- package/file-templates/dynamic/README.md +3 -0
- package/file-templates/dynamic/gitignore +144 -0
- package/file-templates/dynamic/main.ts +19 -0
- package/file-templates/dynamic/metadata.vdf +6 -0
- package/file-templates/dynamic/metadata.xml +8 -0
- package/file-templates/dynamic/package.json +20 -0
- package/file-templates/static/.cspell.json.template +21 -0
- package/file-templates/static/.env_template +2 -0
- package/file-templates/static/.eslintrc.js.template +24 -0
- package/file-templates/static/.gitattributes +9 -0
- package/file-templates/static/.github/workflows/ci.yml +54 -0
- package/file-templates/static/.prettierignore +14 -0
- package/file-templates/static/.prettierrc.js +42 -0
- package/file-templates/static/.vscode/extensions.json +10 -0
- package/file-templates/static/.vscode/settings.json +79 -0
- package/file-templates/static/LICENSE +674 -0
- package/file-templates/static/build.sh +15 -0
- package/file-templates/static/check-orphaned-words.sh +58 -0
- package/file-templates/static/lint.sh +39 -0
- package/file-templates/static/nuke.sh +18 -0
- package/file-templates/static/plugins/addCrashDebugStatements.ts +40 -0
- package/file-templates/static/plugins/addIsaacScriptCommentHeader.ts +37 -0
- package/file-templates/static/plugins/noExtendedEnums.ts +69 -0
- package/file-templates/static/publish.sh +10 -0
- package/file-templates/static/run.sh +10 -0
- package/file-templates/static/src/bundleEntry.ts +10 -0
- package/file-templates/static/tsconfig.eslint.json +11 -0
- package/file-templates/static/tsconfig.json +33 -0
- package/file-templates/static/update.sh +21 -0
- package/file-templates/static-alt/.prettierignore-base +5 -0
- package/file-templates/static-alt/.prettierrc-base.js +30 -0
- package/file-templates/static-alt/.vscode/extensions-typescript.json +9 -0
- package/file-templates/static-alt/.vscode/settings-typescript.json +66 -0
- package/file-templates/static-alt/check-file-updates.sh +67 -0
- package/isaacscript-watcher/.luacheckrc +96 -0
- package/isaacscript-watcher/README.md +8 -0
- package/isaacscript-watcher/main.lua +270 -0
- package/isaacscript-watcher/metadata.xml +7 -0
- package/isaacscript-watcher/resources/gfx/logo.anm2 +27 -0
- package/isaacscript-watcher/resources/gfx/logo.png +0 -0
- package/package.json +39 -2
- package/src/checkForWindowsTerminalBugs.js +75 -79
- package/src/checkForWindowsTerminalBugs.js.map +1 -1
- package/src/commands/copy/copy.js +32 -32
- package/src/commands/init/checkIfProjectPathExists.js +27 -29
- package/src/commands/init/checkIfProjectPathExists.js.map +1 -1
- package/src/commands/init/checkModSubdirectory.js +15 -15
- package/src/commands/init/checkModTargetDirectory.js +30 -32
- package/src/commands/init/checkModTargetDirectory.js.map +1 -1
- package/src/commands/init/createMod.js +142 -137
- package/src/commands/init/createMod.js.map +1 -1
- package/src/commands/init/getModsDir.js +55 -57
- package/src/commands/init/getModsDir.js.map +1 -1
- package/src/commands/init/getProjectPath.js +88 -92
- package/src/commands/init/getProjectPath.js.map +1 -1
- package/src/commands/init/git.js +150 -152
- package/src/commands/init/git.js.map +1 -1
- package/src/commands/init/init.js +65 -69
- package/src/commands/init/init.js.map +1 -1
- package/src/commands/init/installVSCodeExtensions.js +32 -32
- package/src/commands/init/promptSaveSlot.js +21 -24
- package/src/commands/init/promptSaveSlot.js.map +1 -1
- package/src/commands/init/promptVSCode.js +24 -26
- package/src/commands/init/promptVSCode.js.map +1 -1
- package/src/commands/monitor/constants.js +4 -4
- package/src/commands/monitor/copyWatcherMod.js +38 -38
- package/src/commands/monitor/modDirectorySyncer/modDirectorySyncer.js +49 -49
- package/src/commands/monitor/monitor.js +146 -146
- package/src/commands/monitor/notifyGame.js +57 -57
- package/src/commands/monitor/saveDatWriter/saveDatWriter.js +116 -116
- package/src/commands/monitor/saveDatWriter/types.js +2 -2
- package/src/commands/monitor/spawnSaveDatWriter.js +34 -34
- package/src/commands/monitor/touchWatcherSaveDatFiles.js +20 -20
- package/src/commands/publish/publish.js +220 -220
- package/src/configFile.js +63 -65
- package/src/configFile.js.map +1 -1
- package/src/constants.js +59 -59
- package/src/constants.js.map +1 -1
- package/src/exec.js +95 -95
- package/src/file.js +193 -193
- package/src/main.js +117 -121
- package/src/main.js.map +1 -1
- package/src/parseArgs.js +106 -106
- package/src/prompt.js +86 -92
- package/src/prompt.js.map +1 -1
- package/src/types/Command.js +4 -4
- package/src/types/Config.js +12 -12
- package/src/types/GitHubCLIHostsYAML.js +2 -2
- package/src/utils.js +81 -81
- package/src/validateInIsaacScriptProject.js +26 -26
- package/src/validateNodeVersion.js +24 -24
- package/src/validateOS.js +16 -16
- package/src/checkForWindowsTerminalBugs.d.ts +0 -5
- package/src/commands/copy/copy.d.ts +0 -3
- package/src/commands/init/checkIfProjectPathExists.d.ts +0 -1
- package/src/commands/init/checkModSubdirectory.d.ts +0 -1
- package/src/commands/init/checkModTargetDirectory.d.ts +0 -1
- package/src/commands/init/createMod.d.ts +0 -1
- package/src/commands/init/getModsDir.d.ts +0 -1
- package/src/commands/init/getProjectPath.d.ts +0 -1
- package/src/commands/init/git.d.ts +0 -4
- package/src/commands/init/init.d.ts +0 -1
- package/src/commands/init/installVSCodeExtensions.d.ts +0 -1
- package/src/commands/init/promptSaveSlot.d.ts +0 -1
- package/src/commands/init/promptVSCode.d.ts +0 -1
- package/src/commands/monitor/constants.d.ts +0 -1
- package/src/commands/monitor/copyWatcherMod.d.ts +0 -2
- package/src/commands/monitor/modDirectorySyncer/modDirectorySyncer.d.ts +0 -1
- package/src/commands/monitor/monitor.d.ts +0 -2
- package/src/commands/monitor/notifyGame.d.ts +0 -3
- package/src/commands/monitor/saveDatWriter/saveDatWriter.d.ts +0 -1
- package/src/commands/monitor/saveDatWriter/types.d.ts +0 -5
- package/src/commands/monitor/spawnSaveDatWriter.d.ts +0 -4
- package/src/commands/monitor/touchWatcherSaveDatFiles.d.ts +0 -2
- package/src/commands/publish/publish.d.ts +0 -2
- package/src/configFile.d.ts +0 -4
- package/src/constants.d.ts +0 -34
- package/src/exec.d.ts +0 -4
- package/src/file.d.ts +0 -12
- package/src/main.d.ts +0 -2
- package/src/parseArgs.d.ts +0 -1
- package/src/prompt.d.ts +0 -5
- package/src/types/Command.d.ts +0 -2
- package/src/types/Config.d.ts +0 -18
- package/src/types/GitHubCLIHostsYAML.d.ts +0 -7
- package/src/utils.d.ts +0 -13
- package/src/validateInIsaacScriptProject.d.ts +0 -1
- package/src/validateNodeVersion.d.ts +0 -5
- package/src/validateOS.d.ts +0 -1
package/README.md
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
# isaacscript-cli
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/isaacscript)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
IsaacScript is a tool to help you create _Binding of Isaac: Repentance_ mods using [TypeScript](https://www.typescriptlang.org/).
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Please visit the [official website](https://isaacscript.github.io/) for more information.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
Run `nx test isaacscript-cli` to execute the unit tests via [Jest](https://jestjs.io).
|
|
9
|
+
This package contains the command-line tool that initializes new mods and monitors the current project.
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
# MOD-NAME-TO-REPLACE
|
|
2
|
+
|
|
3
|
+
MOD-NAME-TO-REPLACE is a mod for _[The Binding of Isaac: Repentance](https://store.steampowered.com/app/1426300/The_Binding_of_Isaac_Repentance/)_, written in [TypeScript](https://www.typescriptlang.org/) using the [IsaacScript](https://isaacscript.github.io/) framework.
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# Per-user IsaacScript settings
|
|
2
|
+
isaacscript.json
|
|
3
|
+
|
|
4
|
+
# The transpiled Lua output
|
|
5
|
+
mod/main.lua
|
|
6
|
+
|
|
7
|
+
# MacOS artifacts
|
|
8
|
+
.DS_Store
|
|
9
|
+
|
|
10
|
+
# ------------------------------
|
|
11
|
+
# GitHub Node.gitignore template
|
|
12
|
+
# https://raw.githubusercontent.com/github/gitignore/master/Node.gitignore
|
|
13
|
+
# ------------------------------
|
|
14
|
+
|
|
15
|
+
# Logs
|
|
16
|
+
logs
|
|
17
|
+
*.log
|
|
18
|
+
npm-debug.log*
|
|
19
|
+
yarn-debug.log*
|
|
20
|
+
yarn-error.log*
|
|
21
|
+
lerna-debug.log*
|
|
22
|
+
.pnpm-debug.log*
|
|
23
|
+
|
|
24
|
+
# Diagnostic reports (https://nodejs.org/api/report.html)
|
|
25
|
+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
|
26
|
+
|
|
27
|
+
# Runtime data
|
|
28
|
+
pids
|
|
29
|
+
*.pid
|
|
30
|
+
*.seed
|
|
31
|
+
*.pid.lock
|
|
32
|
+
|
|
33
|
+
# Directory for instrumented libs generated by jscoverage/JSCover
|
|
34
|
+
lib-cov
|
|
35
|
+
|
|
36
|
+
# Coverage directory used by tools like istanbul
|
|
37
|
+
coverage
|
|
38
|
+
*.lcov
|
|
39
|
+
|
|
40
|
+
# nyc test coverage
|
|
41
|
+
.nyc_output
|
|
42
|
+
|
|
43
|
+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
|
|
44
|
+
.grunt
|
|
45
|
+
|
|
46
|
+
# Bower dependency directory (https://bower.io/)
|
|
47
|
+
bower_components
|
|
48
|
+
|
|
49
|
+
# node-waf configuration
|
|
50
|
+
.lock-wscript
|
|
51
|
+
|
|
52
|
+
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
|
53
|
+
build/Release
|
|
54
|
+
|
|
55
|
+
# Dependency directories
|
|
56
|
+
node_modules/
|
|
57
|
+
jspm_packages/
|
|
58
|
+
|
|
59
|
+
# Snowpack dependency directory (https://snowpack.dev/)
|
|
60
|
+
web_modules/
|
|
61
|
+
|
|
62
|
+
# TypeScript cache
|
|
63
|
+
*.tsbuildinfo
|
|
64
|
+
|
|
65
|
+
# Optional npm cache directory
|
|
66
|
+
.npm
|
|
67
|
+
|
|
68
|
+
# Optional eslint cache
|
|
69
|
+
.eslintcache
|
|
70
|
+
|
|
71
|
+
# Optional stylelint cache
|
|
72
|
+
.stylelintcache
|
|
73
|
+
|
|
74
|
+
# Microbundle cache
|
|
75
|
+
.rpt2_cache/
|
|
76
|
+
.rts2_cache_cjs/
|
|
77
|
+
.rts2_cache_es/
|
|
78
|
+
.rts2_cache_umd/
|
|
79
|
+
|
|
80
|
+
# Optional REPL history
|
|
81
|
+
.node_repl_history
|
|
82
|
+
|
|
83
|
+
# Output of 'npm pack'
|
|
84
|
+
*.tgz
|
|
85
|
+
|
|
86
|
+
# Yarn Integrity file
|
|
87
|
+
.yarn-integrity
|
|
88
|
+
|
|
89
|
+
# dotenv environment variable files
|
|
90
|
+
.env
|
|
91
|
+
.env.development.local
|
|
92
|
+
.env.test.local
|
|
93
|
+
.env.production.local
|
|
94
|
+
.env.local
|
|
95
|
+
|
|
96
|
+
# parcel-bundler cache (https://parceljs.org/)
|
|
97
|
+
.cache
|
|
98
|
+
.parcel-cache
|
|
99
|
+
|
|
100
|
+
# Next.js build output
|
|
101
|
+
.next
|
|
102
|
+
out
|
|
103
|
+
|
|
104
|
+
# Nuxt.js build / generate output
|
|
105
|
+
.nuxt
|
|
106
|
+
dist
|
|
107
|
+
|
|
108
|
+
# Gatsby files
|
|
109
|
+
.cache/
|
|
110
|
+
# Comment in the public line in if your project uses Gatsby and not Next.js
|
|
111
|
+
# https://nextjs.org/blog/next-9-1#public-directory-support
|
|
112
|
+
# public
|
|
113
|
+
|
|
114
|
+
# vuepress build output
|
|
115
|
+
.vuepress/dist
|
|
116
|
+
|
|
117
|
+
# vuepress v2.x temp and cache directory
|
|
118
|
+
.temp
|
|
119
|
+
.cache
|
|
120
|
+
|
|
121
|
+
# Docusaurus cache and generated files
|
|
122
|
+
.docusaurus
|
|
123
|
+
|
|
124
|
+
# Serverless directories
|
|
125
|
+
.serverless/
|
|
126
|
+
|
|
127
|
+
# FuseBox cache
|
|
128
|
+
.fusebox/
|
|
129
|
+
|
|
130
|
+
# DynamoDB Local files
|
|
131
|
+
.dynamodb/
|
|
132
|
+
|
|
133
|
+
# TernJS port file
|
|
134
|
+
.tern-port
|
|
135
|
+
|
|
136
|
+
# Stores VSCode versions used for testing VSCode extensions
|
|
137
|
+
.vscode-test
|
|
138
|
+
|
|
139
|
+
# yarn v2
|
|
140
|
+
.yarn/cache
|
|
141
|
+
.yarn/unplugged
|
|
142
|
+
.yarn/build-state.yml
|
|
143
|
+
.yarn/install-state.gz
|
|
144
|
+
.pnp.*
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ModCallback } from "isaac-typescript-definitions";
|
|
2
|
+
|
|
3
|
+
const MOD_NAME = "MOD-NAME-TO-REPLACE";
|
|
4
|
+
|
|
5
|
+
export function main(): void {
|
|
6
|
+
// Instantiate a new mod object, which grants the ability to add callback functions that
|
|
7
|
+
// correspond to in-game events.
|
|
8
|
+
const mod = RegisterMod(MOD_NAME, 1);
|
|
9
|
+
|
|
10
|
+
// Set a callback function that corresponds to when a new run is started.
|
|
11
|
+
mod.AddCallback(ModCallback.POST_GAME_STARTED, postGameStarted);
|
|
12
|
+
|
|
13
|
+
// Print an initialization message to the "log.txt" file.
|
|
14
|
+
Isaac.DebugString(`${MOD_NAME} initialized.`);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function postGameStarted() {
|
|
18
|
+
Isaac.DebugString("Callback triggered: MC_POST_GAME_STARTED");
|
|
19
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" ?>
|
|
2
|
+
<metadata>
|
|
3
|
+
<name>MOD-NAME-TO-REPLACE</name>
|
|
4
|
+
<directory>MOD-NAME-TO-REPLACE</directory>
|
|
5
|
+
<description>MOD-NAME-TO-REPLACE is a currently a work in progress.</description>
|
|
6
|
+
<version>1.0</version>
|
|
7
|
+
<visibility />
|
|
8
|
+
</metadata>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "MOD-NAME-TO-REPLACE",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "A mod for The Binding of Isaac: Repentance",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"isaac",
|
|
7
|
+
"mod",
|
|
8
|
+
"rebirth",
|
|
9
|
+
"afterbirth",
|
|
10
|
+
"repentance"
|
|
11
|
+
],
|
|
12
|
+
"license": "GPL-3.0",
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"isaac-typescript-definitions": "^0.0.1",
|
|
15
|
+
"isaacscript": "^0.0.1",
|
|
16
|
+
"isaacscript-common": "^0.0.1",
|
|
17
|
+
"isaacscript-lint": "^0.0.1",
|
|
18
|
+
"isaacscript-spell": "^0.0.1"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json",
|
|
3
|
+
"version": "0.2",
|
|
4
|
+
"import": [
|
|
5
|
+
"isaacscript-spell/.cspell-isaacscript.json"
|
|
6
|
+
],
|
|
7
|
+
"files": [
|
|
8
|
+
"**"
|
|
9
|
+
],
|
|
10
|
+
"ignorePaths": [
|
|
11
|
+
"*.anm2",
|
|
12
|
+
"*.pyc",
|
|
13
|
+
"*.wav",
|
|
14
|
+
".git/**",
|
|
15
|
+
"dist/**",
|
|
16
|
+
"node_modules/**",
|
|
17
|
+
"mod/main.lua",
|
|
18
|
+
"mod/resources/rooms/**"
|
|
19
|
+
],
|
|
20
|
+
"words": []
|
|
21
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// This is the configuration file for ESLint, the TypeScript linter:
|
|
2
|
+
// https://eslint.org/docs/user-guide/configuring
|
|
3
|
+
module.exports = {
|
|
4
|
+
extends: [
|
|
5
|
+
/**
|
|
6
|
+
* The linter base is the IsaacScript mod config:
|
|
7
|
+
* https://github.com/IsaacScript/eslint-config-isaacscript/blob/main/mod.js
|
|
8
|
+
*/
|
|
9
|
+
"eslint-config-isaacscript/mod",
|
|
10
|
+
],
|
|
11
|
+
|
|
12
|
+
parserOptions: {
|
|
13
|
+
/**
|
|
14
|
+
* ESLint needs to know about the project's TypeScript settings in order for TypeScript-specific
|
|
15
|
+
* things to lint correctly. We do not point this at "./tsconfig.json" because certain files
|
|
16
|
+
* (such at this file) should be linted but not included in the actual project output.
|
|
17
|
+
*/
|
|
18
|
+
project: "./tsconfig.eslint.json",
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
rules: {
|
|
22
|
+
// Insert changed or disabled rules here, if necessary.
|
|
23
|
+
},
|
|
24
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Prevent Windows systems from cloning this repository with "\r\n" line endings.
|
|
2
|
+
core.autocrlf=false
|
|
3
|
+
|
|
4
|
+
# Prevent people from making merge commits:
|
|
5
|
+
# https://www.endoflineblog.com/gitflow-considered-harmful
|
|
6
|
+
pull.rebase=true
|
|
7
|
+
|
|
8
|
+
# Convert all files to use "\n" line endings.
|
|
9
|
+
* text=auto eol=lf
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on: [push, pull_request]
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
build_and_lint:
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
|
+
steps:
|
|
9
|
+
- name: Checkout the repository
|
|
10
|
+
uses: actions/checkout@v3
|
|
11
|
+
|
|
12
|
+
- name: Setup Node.js
|
|
13
|
+
uses: actions/setup-node@v3
|
|
14
|
+
with:
|
|
15
|
+
# The default version is 14. The ESLint config requires Node 16 to work properly.
|
|
16
|
+
node-version: "16"
|
|
17
|
+
cache: "npm"
|
|
18
|
+
|
|
19
|
+
- name: Retrieve the cached "node_modules" directory (if present)
|
|
20
|
+
uses: actions/cache@v3
|
|
21
|
+
id: node-cache
|
|
22
|
+
with:
|
|
23
|
+
path: node_modules
|
|
24
|
+
key: node-modules-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
|
|
25
|
+
|
|
26
|
+
- name: Install dependencies (if the cached directory was not found)
|
|
27
|
+
if: steps.node-cache.outputs.cache-hit != 'true'
|
|
28
|
+
run: npm ci
|
|
29
|
+
|
|
30
|
+
- name: Install xmllint (which the "lint.sh" script uses)
|
|
31
|
+
run: sudo apt-get update && sudo apt-get install libxml2-utils -y
|
|
32
|
+
|
|
33
|
+
- name: Test to see if the project compiles
|
|
34
|
+
run: bash build.sh
|
|
35
|
+
|
|
36
|
+
- name: Perform automated checks
|
|
37
|
+
run: bash lint.sh
|
|
38
|
+
|
|
39
|
+
# To enable CI failure notifications over Discord, add a "DISCORD_WEBHOOK" secret to the
|
|
40
|
+
# repository equal to the URL for the webhook, and then uncomment the lines below.
|
|
41
|
+
|
|
42
|
+
#discord:
|
|
43
|
+
# name: Discord Failure Notification
|
|
44
|
+
# needs: [build_and_lint]
|
|
45
|
+
# if: always() # This is needed to always run this job, even if the other jobs fail.
|
|
46
|
+
# runs-on: ubuntu-latest
|
|
47
|
+
# steps:
|
|
48
|
+
# - uses: technote-space/workflow-conclusion-action@v2
|
|
49
|
+
# - if: env.WORKFLOW_CONCLUSION != 'success' && env.WORKFLOW_CONCLUSION != 'cancelled'
|
|
50
|
+
# uses: sarisia/actions-status-discord@v1
|
|
51
|
+
# with:
|
|
52
|
+
# webhook: ${{ secrets.DISCORD_WEBHOOK }}
|
|
53
|
+
# status: ${{ env.WORKFLOW_CONCLUSION }}
|
|
54
|
+
# title: ""
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Ignore compiled output.
|
|
2
|
+
dist
|
|
3
|
+
|
|
4
|
+
# The VSCode CSpell plugin causes the file to become unformatted whenever a new word is added.
|
|
5
|
+
.cspell.json
|
|
6
|
+
|
|
7
|
+
# Ignore all of the XML files created by Basement Renovator.
|
|
8
|
+
mod/content/rooms/**/*.xml
|
|
9
|
+
mod/content/luarooms/**/*.xml
|
|
10
|
+
mod/resources/rooms/**/*.xml
|
|
11
|
+
mod/resources/luarooms/**/*.xml
|
|
12
|
+
|
|
13
|
+
# Ignore all of the XML files created by the animation editor.
|
|
14
|
+
mod/resources/**/*.anm2
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// This is the configuration file for Prettier, the auto-formatter:
|
|
2
|
+
// https://prettier.io/docs/en/configuration.html
|
|
3
|
+
module.exports = {
|
|
4
|
+
// Always print trailing commas:
|
|
5
|
+
// https://prettier.io/docs/en/options.html#trailing-commas
|
|
6
|
+
// The default is "es5" - Trailing commas where valid in ES5 (objects, arrays, etc.). However,
|
|
7
|
+
// always having trailing commas is objectively better. The Airbnb style guide agrees:
|
|
8
|
+
// https://github.com/airbnb/javascript#commas--dangling
|
|
9
|
+
// Prettier itself also acknowledges Nik Graf's blog in their official blog:
|
|
10
|
+
// https://prettier.io/blog/2020/03/21/2.0.0.html
|
|
11
|
+
// https://medium.com/@nikgraf/why-you-should-enforce-dangling-commas-for-multiline-statements-d034c98e36f8
|
|
12
|
+
// Prettier will change the default in the future:
|
|
13
|
+
// https://github.com/prettier/prettier/issues/9369
|
|
14
|
+
trailingComma: "all",
|
|
15
|
+
|
|
16
|
+
// We want to always use "lf" to be consistent with all platforms.
|
|
17
|
+
endOfLine: "lf",
|
|
18
|
+
|
|
19
|
+
// Allow proper formatting of JSONC files:
|
|
20
|
+
// https://github.com/prettier/prettier/issues/5708
|
|
21
|
+
overrides: [
|
|
22
|
+
{
|
|
23
|
+
files: ["**/.vscode/*.json", "**/tsconfig.json", "**/tsconfig.*.json"],
|
|
24
|
+
options: {
|
|
25
|
+
parser: "json5",
|
|
26
|
+
quoteProps: "preserve",
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
files: ["**/*.xml"],
|
|
31
|
+
options: {
|
|
32
|
+
printWidth: 1000000,
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
|
|
37
|
+
// Allow proper formatting of XML files:
|
|
38
|
+
// https://github.com/prettier/plugin-xml#configuration
|
|
39
|
+
// The default is "struct". However, whitespace cannot be reformatted unless this is set to
|
|
40
|
+
// "ignore".
|
|
41
|
+
xmlWhitespaceSensitivity: "ignore",
|
|
42
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// These are Visual Studio Code extensions that are intended to be used with this particular
|
|
2
|
+
// repository: https://go.microsoft.com/fwlink/?LinkId=827846
|
|
3
|
+
{
|
|
4
|
+
"recommendations": [
|
|
5
|
+
"esbenp.prettier-vscode", // The TypeScript formatter
|
|
6
|
+
"dbaeumer.vscode-eslint", // The TypeScript linter
|
|
7
|
+
"streetsidesoftware.code-spell-checker", // A spell-checker extension based on cspell
|
|
8
|
+
"typescript-to-lua.vscode-typescript-to-lua", // The TypeScriptToLua extension
|
|
9
|
+
],
|
|
10
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
// These are Visual Studio Code settings that should apply to this particular repository.
|
|
2
|
+
{
|
|
3
|
+
// ----------------
|
|
4
|
+
// Vanilla settings
|
|
5
|
+
// ----------------
|
|
6
|
+
|
|
7
|
+
// This matches the Airbnb JavaScript style guide.
|
|
8
|
+
"editor.rulers": [100],
|
|
9
|
+
"editor.tabSize": 2,
|
|
10
|
+
|
|
11
|
+
"files.associations": {
|
|
12
|
+
"*.anm2": "xml", // anm2 files are just XML files
|
|
13
|
+
"*.dat": "json", // Nearly all mods save JSON to the "save#.dat" file
|
|
14
|
+
},
|
|
15
|
+
|
|
16
|
+
// We want to always use "lf" to be consistent with all platforms.
|
|
17
|
+
"files.eol": "\n",
|
|
18
|
+
|
|
19
|
+
// Automatically removing all trailing whitespace when saving a file.
|
|
20
|
+
"files.trimTrailingWhitespace": true,
|
|
21
|
+
|
|
22
|
+
// Configure glob patterns for excluding files and folders in full text searches and quick open.
|
|
23
|
+
// (File extensions must be specified or the glob won't work properly.)
|
|
24
|
+
"search.exclude": {
|
|
25
|
+
"**/*.png": true,
|
|
26
|
+
"**/*.wav": true,
|
|
27
|
+
"dist/**/*.ts": true,
|
|
28
|
+
"dist/**/*.js": true,
|
|
29
|
+
"dist/**/*.json": true,
|
|
30
|
+
"dist/**/*.lua": true,
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
// -----------------
|
|
34
|
+
// Language settings
|
|
35
|
+
// -----------------
|
|
36
|
+
|
|
37
|
+
// By default, VSCode will not automatically fill-in function arguments.
|
|
38
|
+
"javascript.suggest.completeFunctionCalls": true,
|
|
39
|
+
"typescript.suggest.completeFunctionCalls": true,
|
|
40
|
+
|
|
41
|
+
// Automatically run the formatter when certain files are saved.
|
|
42
|
+
"[javascript]": {
|
|
43
|
+
"editor.codeActionsOnSave": ["source.fixAll.eslint"],
|
|
44
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
45
|
+
"editor.formatOnSave": true,
|
|
46
|
+
"editor.tabSize": 2,
|
|
47
|
+
},
|
|
48
|
+
"[typescript]": {
|
|
49
|
+
"editor.codeActionsOnSave": ["source.fixAll.eslint"],
|
|
50
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
51
|
+
"editor.formatOnSave": true,
|
|
52
|
+
"editor.tabSize": 2,
|
|
53
|
+
},
|
|
54
|
+
"[json]": {
|
|
55
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
56
|
+
"editor.formatOnSave": true,
|
|
57
|
+
"editor.tabSize": 2,
|
|
58
|
+
},
|
|
59
|
+
"[jsonc]": {
|
|
60
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
61
|
+
"editor.formatOnSave": true,
|
|
62
|
+
"editor.tabSize": 2,
|
|
63
|
+
},
|
|
64
|
+
"[yaml]": {
|
|
65
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
66
|
+
"editor.formatOnSave": true,
|
|
67
|
+
"editor.tabSize": 2,
|
|
68
|
+
},
|
|
69
|
+
"[xml]": {
|
|
70
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
71
|
+
"editor.formatOnSave": true,
|
|
72
|
+
"editor.tabSize": 2,
|
|
73
|
+
},
|
|
74
|
+
"[markdown]": {
|
|
75
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
76
|
+
"editor.formatOnSave": true,
|
|
77
|
+
"editor.tabSize": 2,
|
|
78
|
+
},
|
|
79
|
+
}
|