Skip to content

Commit d71490e

Browse files
authored
Merge pull request #1 from elliottcarlson/update-and-fix-example-mod
Fixes the example mod to run using modern IsaacScript versions.
2 parents ec6e2fe + a660501 commit d71490e

31 files changed

+8317
-7441
lines changed

.eslintrc.cjs

Lines changed: 0 additions & 25 deletions
This file was deleted.

.gitattributes

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
1-
# Prevent Windows systems from cloning this repository with "\r\n" line endings.
1+
# https://git-scm.com/docs/git-config/#Documentation/git-config.txt-coreautocrlf
2+
# Default value: input
3+
# Explicitly setting it to false prevents Git from changing line endings at any point, which can
4+
# prevent issues when Windows users collaborate with MacOS/Linus users.
25
core.autocrlf=false
36

4-
# Prevent people from making merge commits:
7+
# https://git-scm.com/docs/git-config/#Documentation/git-config.txt-coreignoreCase
8+
# Default value: false (on Linux machines) or true (on Windows machines)
9+
# Explicitly setting it to false prevents the issue where Windows users cannot pull down
10+
# casing-related file renames.
11+
core.ignoreCase=false
12+
13+
# https://git-scm.com/docs/git-config/#Documentation/git-config.txt-pullrebase
14+
# Default value: false
15+
# Setting this prevents spurious merge commits:
516
# https://www.endoflineblog.com/gitflow-considered-harmful
617
pull.rebase=true
718

@@ -18,3 +29,9 @@ pull.rebase=true
1829
# https://github.com/github/linguist/blob/master/lib/linguist/languages.yml
1930
.vscode/*.json linguist-language=JSON-with-Comments
2031
tsconfig*.json linguist-language=JSON-with-Comments
32+
33+
# Suppress displaying changes on certain files to prevent cluttering commit diffs on GitHub.
34+
package-lock.json linguist-generated=true
35+
yarn.lock linguist-generated=true
36+
pnpm-lock.yaml linguist-generated=true
37+
bun.lockb linguist-generated=true

.github/workflows/ci.yml

Lines changed: 40 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,47 @@ name: CI
33
on: [push, pull_request]
44

55
jobs:
6-
build_and_lint:
6+
build:
77
runs-on: ubuntu-latest
88
steps:
9-
- name: Checkout the repository
10-
uses: actions/checkout@v3
9+
- uses: actions/checkout@v4
10+
- uses: ./.github/workflows/setup
11+
- run: npm run build
1112

12-
- name: Setup Node.js
13-
uses: actions/setup-node@v3
14-
with:
15-
node-version: lts/*
16-
cache: yarn
17-
18-
- name: Retrieve the cached "node_modules" directory (if present)
19-
uses: actions/cache@v3
20-
id: node-cache
21-
with:
22-
path: node_modules
23-
key: node-modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
24-
25-
- name: Install dependencies (if the cached directory was not found)
26-
if: steps.node-cache.outputs.cache-hit != 'true'
27-
run: yarn install --frozen-lockfile
28-
29-
- name: Test to see if the project compiles
30-
run: bash build.sh
13+
lint:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: ./.github/workflows/setup
18+
- run: npm run lint
3119

32-
- name: Perform automated checks
33-
run: bash lint.sh
20+
# To enable CI failure notifications over Discord:
21+
# - Right click on a channel in Discord and select "Edit Channel".
22+
# - Click on "Integrations" on the left menu.
23+
# - Click on the "Create Webhook" button.
24+
# - Click on the box for the new webhook that was created.
25+
# - Change the name to "GitHub".
26+
# - Change the image to: https://github.com/IsaacScript/isaacscript/raw/main/misc/github.png
27+
# - Click on the "Save Changes" button at the bottom.
28+
# - Click on the "Copy Webhook URL" button.
29+
# - Go to the main page for your repository on GitHub.
30+
# - Click on the "Settings" tab near the top.
31+
# - Click on "Secrets and variables" in the left menu.
32+
# - Click on "Actions" from the dropdown list.
33+
# - Click on the "New repository secret" button in the top right.
34+
# - For the "Name" box, use "DISCORD_WEBHOOK" (without the quotes).
35+
# - For the "Secret" box, paste in the URL that was copied in the "Copy Webhook URL" step. (The
36+
# pasted URL should not have a "/github" suffix.)
37+
# - Click on the "Add secret" button.
38+
# - Delete this comment and uncomment the lines below.
39+
#discord:
40+
# name: Discord Failure Notification
41+
# needs: [build, lint]
42+
# if: failure()
43+
# runs-on: ubuntu-latest
44+
# steps:
45+
# - uses: sarisia/actions-status-discord@v1
46+
# with:
47+
# webhook: ${{ secrets.DISCORD_WEBHOOK }}
48+
# status: failure
49+
# title: ""

.github/workflows/setup/action.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
runs:
2+
using: composite
3+
4+
steps:
5+
- name: Setup Node.js
6+
uses: actions/setup-node@v4
7+
with:
8+
node-version: lts/*
9+
cache: npm
10+
11+
- name: Install dependencies
12+
run: npm ci
13+
shell: bash # Composite jobs must specify the shell.

.gitignore

Lines changed: 30 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,20 @@
22
# isaacscript-mod-example
33
# -----------------------
44

5+
# OS-specific artifacts
6+
.DS_Store
7+
thumbs.db
8+
59
# Per-user IsaacScript settings
610
isaacscript.json
711

812
# The transpiled Lua output
913
mod/main.lua
1014

11-
# Windows artifacts
12-
thumbs.db
13-
14-
# MacOS artifacts
15-
.DS_Store
16-
1715
# ------------------------------
1816
# GitHub Node.gitignore template
1917
# https://raw.githubusercontent.com/github/gitignore/master/Node.gitignore
18+
# cspell:disable
2019
# ------------------------------
2120

2221
# Logs
@@ -26,7 +25,6 @@ npm-debug.log*
2625
yarn-debug.log*
2726
yarn-error.log*
2827
lerna-debug.log*
29-
.pnpm-debug.log*
3028

3129
# Diagnostic reports (https://nodejs.org/api/report.html)
3230
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
@@ -78,12 +76,6 @@ web_modules/
7876
# Optional stylelint cache
7977
.stylelintcache
8078

81-
# Microbundle cache
82-
.rpt2_cache/
83-
.rts2_cache_cjs/
84-
.rts2_cache_es/
85-
.rts2_cache_umd/
86-
8779
# Optional REPL history
8880
.node_repl_history
8981

@@ -95,10 +87,8 @@ web_modules/
9587

9688
# dotenv environment variable files
9789
.env
98-
.env.development.local
99-
.env.test.local
100-
.env.production.local
101-
.env.local
90+
.env.*
91+
!.env.example
10292

10393
# parcel-bundler cache (https://parceljs.org/)
10494
.cache
@@ -125,6 +115,15 @@ dist
125115
.temp
126116
.cache
127117

118+
# Sveltekit cache directory
119+
.svelte-kit/
120+
121+
# vitepress build output
122+
**/.vitepress/dist
123+
124+
# vitepress cache directory
125+
**/.vitepress/cache
126+
128127
# Docusaurus cache and generated files
129128
.docusaurus
130129

@@ -137,15 +136,24 @@ dist
137136
# DynamoDB Local files
138137
.dynamodb/
139138

139+
# Firebase cache directory
140+
.firebase/
141+
140142
# TernJS port file
141143
.tern-port
142144

143145
# Stores VSCode versions used for testing VSCode extensions
144146
.vscode-test
145147

146-
# yarn v2
147-
.yarn/cache
148-
.yarn/unplugged
149-
.yarn/build-state.yml
150-
.yarn/install-state.gz
148+
# yarn v3
151149
.pnp.*
150+
.yarn/*
151+
!.yarn/patches
152+
!.yarn/plugins
153+
!.yarn/releases
154+
!.yarn/sdks
155+
!.yarn/versions
156+
157+
# Vite logs files
158+
vite.config.js.timestamp-*
159+
vite.config.ts.timestamp-*

.prettierignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ dist
55
package-lock.json
66
yarn.lock
77
pnpm-lock.yaml
8+
bun.lockb
9+
10+
# Minified files
11+
*.min.js
12+
*.min.css
813

914
# XML files created by Basement Renovator
1015
mod/content/rooms/**/*.xml

.prettierrc.cjs

Lines changed: 0 additions & 47 deletions
This file was deleted.

.vscode/settings.json

Lines changed: 21 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,30 @@
1717
// We want to always use "lf" to be consistent with all platforms.
1818
"files.eol": "\n",
1919

20-
// Automatically removing all trailing whitespace when saving a file.
20+
// Automatically remove all trailing whitespace when saving a file.
2121
"files.trimTrailingWhitespace": true,
2222

2323
// Configure glob patterns for excluding files and folders in full text searches and quick open.
2424
"search.exclude": {
2525
"**/*.mp3": true,
2626
"**/*.png": true,
27+
"**/*.svg": true,
2728
"**/*.wav": true,
29+
"**/.yarn/": true,
2830
"**/dist/": true,
2931
"**/node_modules/": true,
32+
"bun.lockb": true,
33+
"LICENSE": true,
34+
"package-lock.json": true,
35+
"pnpm-lock.yaml": true,
36+
"yarn.lock": true,
3037
},
3138

3239
// ------------------
3340
// Extension settings
3441
// ------------------
3542

36-
// Use Prettier to format "cspell.json".
43+
// Use Prettier to format "cspell.config.jsonc".
3744
"cSpell.autoFormatConfigFile": true,
3845

3946
// -----------------
@@ -48,42 +55,23 @@
4855
"javascript.preferences.importModuleSpecifier": "relative",
4956
"typescript.preferences.importModuleSpecifier": "relative",
5057

58+
// By default, VSCode will not add `import type` automatically.
59+
"typescript.preferences.preferTypeOnlyAutoImports": true,
60+
61+
// Show TypeScript errors for files that don't happen to be currently open, which makes TypeScript
62+
// work similar to other compiled languages like Golang or Rust.
63+
"typescript.tsserver.experimental.enableProjectDiagnostics": true,
64+
5165
// Automatically run the formatter when certain files are saved.
52-
"[javascript]": {
53-
"editor.codeActionsOnSave": ["source.fixAll.eslint"],
54-
"editor.defaultFormatter": "esbenp.prettier-vscode",
55-
"editor.formatOnSave": true,
56-
"editor.tabSize": 2,
57-
},
58-
"[typescript]": {
59-
"editor.codeActionsOnSave": ["source.fixAll.eslint"],
60-
"editor.defaultFormatter": "esbenp.prettier-vscode",
61-
"editor.formatOnSave": true,
62-
"editor.tabSize": 2,
63-
},
64-
"[json]": {
65-
"editor.defaultFormatter": "esbenp.prettier-vscode",
66-
"editor.formatOnSave": true,
67-
"editor.tabSize": 2,
68-
},
69-
"[jsonc]": {
70-
"editor.defaultFormatter": "esbenp.prettier-vscode",
71-
"editor.formatOnSave": true,
72-
"editor.tabSize": 2,
73-
},
74-
"[yaml]": {
75-
"editor.defaultFormatter": "esbenp.prettier-vscode",
76-
"editor.formatOnSave": true,
77-
"editor.tabSize": 2,
78-
},
79-
"[xml]": {
66+
"[javascript][typescript][javascriptreact][typescriptreact]": {
67+
"editor.codeActionsOnSave": {
68+
"source.fixAll.eslint": "explicit",
69+
},
8070
"editor.defaultFormatter": "esbenp.prettier-vscode",
8171
"editor.formatOnSave": true,
82-
"editor.tabSize": 2,
8372
},
84-
"[markdown]": {
73+
"[css][html][json][jsonc][markdown][postcss][xml][yaml]": {
8574
"editor.defaultFormatter": "esbenp.prettier-vscode",
8675
"editor.formatOnSave": true,
87-
"editor.tabSize": 2,
8876
},
8977
}

0 commit comments

Comments
 (0)