Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions .eslintrc.cjs

This file was deleted.

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

# Prevent people from making merge commits:
# https://git-scm.com/docs/git-config/#Documentation/git-config.txt-coreignoreCase
# Default value: false (on Linux machines) or true (on Windows machines)
# Explicitly setting it to false prevents the issue where Windows users cannot pull down
# casing-related file renames.
core.ignoreCase=false

# https://git-scm.com/docs/git-config/#Documentation/git-config.txt-pullrebase
# Default value: false
# Setting this prevents spurious merge commits:
# https://www.endoflineblog.com/gitflow-considered-harmful
pull.rebase=true

Expand All @@ -18,3 +29,9 @@ pull.rebase=true
# https://github.com/github/linguist/blob/master/lib/linguist/languages.yml
.vscode/*.json linguist-language=JSON-with-Comments
tsconfig*.json linguist-language=JSON-with-Comments

# Suppress displaying changes on certain files to prevent cluttering commit diffs on GitHub.
package-lock.json linguist-generated=true
yarn.lock linguist-generated=true
pnpm-lock.yaml linguist-generated=true
bun.lockb linguist-generated=true
64 changes: 40 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,47 @@ name: CI
on: [push, pull_request]

jobs:
build_and_lint:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/workflows/setup
- run: npm run build

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: lts/*
cache: yarn

- name: Retrieve the cached "node_modules" directory (if present)
uses: actions/cache@v3
id: node-cache
with:
path: node_modules
key: node-modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }}

- name: Install dependencies (if the cached directory was not found)
if: steps.node-cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile

- name: Test to see if the project compiles
run: bash build.sh
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/workflows/setup
- run: npm run lint

- name: Perform automated checks
run: bash lint.sh
# To enable CI failure notifications over Discord:
# - Right click on a channel in Discord and select "Edit Channel".
# - Click on "Integrations" on the left menu.
# - Click on the "Create Webhook" button.
# - Click on the box for the new webhook that was created.
# - Change the name to "GitHub".
# - Change the image to: https://github.com/IsaacScript/isaacscript/raw/main/misc/github.png
# - Click on the "Save Changes" button at the bottom.
# - Click on the "Copy Webhook URL" button.
# - Go to the main page for your repository on GitHub.
# - Click on the "Settings" tab near the top.
# - Click on "Secrets and variables" in the left menu.
# - Click on "Actions" from the dropdown list.
# - Click on the "New repository secret" button in the top right.
# - For the "Name" box, use "DISCORD_WEBHOOK" (without the quotes).
# - For the "Secret" box, paste in the URL that was copied in the "Copy Webhook URL" step. (The
# pasted URL should not have a "/github" suffix.)
# - Click on the "Add secret" button.
# - Delete this comment and uncomment the lines below.
#discord:
# name: Discord Failure Notification
# needs: [build, lint]
# if: failure()
# runs-on: ubuntu-latest
# steps:
# - uses: sarisia/actions-status-discord@v1
# with:
# webhook: ${{ secrets.DISCORD_WEBHOOK }}
# status: failure
# title: ""
13 changes: 13 additions & 0 deletions .github/workflows/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
runs:
using: composite

steps:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: npm

- name: Install dependencies
run: npm ci
shell: bash # Composite jobs must specify the shell.
52 changes: 30 additions & 22 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,20 @@
# isaacscript-mod-example
# -----------------------

# OS-specific artifacts
.DS_Store
thumbs.db

# Per-user IsaacScript settings
isaacscript.json

# The transpiled Lua output
mod/main.lua

# Windows artifacts
thumbs.db

# MacOS artifacts
.DS_Store

# ------------------------------
# GitHub Node.gitignore template
# https://raw.githubusercontent.com/github/gitignore/master/Node.gitignore
# cspell:disable
# ------------------------------

# Logs
Expand All @@ -26,7 +25,6 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

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

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

Expand All @@ -95,10 +87,8 @@ web_modules/

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local
.env.*
!.env.example

# parcel-bundler cache (https://parceljs.org/)
.cache
Expand All @@ -125,6 +115,15 @@ dist
.temp
.cache

# Sveltekit cache directory
.svelte-kit/

# vitepress build output
**/.vitepress/dist

# vitepress cache directory
**/.vitepress/cache

# Docusaurus cache and generated files
.docusaurus

Expand All @@ -137,15 +136,24 @@ dist
# DynamoDB Local files
.dynamodb/

# Firebase cache directory
.firebase/

# TernJS port file
.tern-port

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

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
# yarn v3
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# Vite logs files
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ dist
package-lock.json
yarn.lock
pnpm-lock.yaml
bun.lockb

# Minified files
*.min.js
*.min.css

# XML files created by Basement Renovator
mod/content/rooms/**/*.xml
Expand Down
47 changes: 0 additions & 47 deletions .prettierrc.cjs

This file was deleted.

54 changes: 21 additions & 33 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,30 @@
// We want to always use "lf" to be consistent with all platforms.
"files.eol": "\n",

// Automatically removing all trailing whitespace when saving a file.
// Automatically remove all trailing whitespace when saving a file.
"files.trimTrailingWhitespace": true,

// Configure glob patterns for excluding files and folders in full text searches and quick open.
"search.exclude": {
"**/*.mp3": true,
"**/*.png": true,
"**/*.svg": true,
"**/*.wav": true,
"**/.yarn/": true,
"**/dist/": true,
"**/node_modules/": true,
"bun.lockb": true,
"LICENSE": true,
"package-lock.json": true,
"pnpm-lock.yaml": true,
"yarn.lock": true,
},

// ------------------
// Extension settings
// ------------------

// Use Prettier to format "cspell.json".
// Use Prettier to format "cspell.config.jsonc".
"cSpell.autoFormatConfigFile": true,

// -----------------
Expand All @@ -48,42 +55,23 @@
"javascript.preferences.importModuleSpecifier": "relative",
"typescript.preferences.importModuleSpecifier": "relative",

// By default, VSCode will not add `import type` automatically.
"typescript.preferences.preferTypeOnlyAutoImports": true,

// Show TypeScript errors for files that don't happen to be currently open, which makes TypeScript
// work similar to other compiled languages like Golang or Rust.
"typescript.tsserver.experimental.enableProjectDiagnostics": true,

// Automatically run the formatter when certain files are saved.
"[javascript]": {
"editor.codeActionsOnSave": ["source.fixAll.eslint"],
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.tabSize": 2,
},
"[typescript]": {
"editor.codeActionsOnSave": ["source.fixAll.eslint"],
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.tabSize": 2,
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.tabSize": 2,
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.tabSize": 2,
},
"[yaml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.tabSize": 2,
},
"[xml]": {
"[javascript][typescript][javascriptreact][typescriptreact]": {
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.tabSize": 2,
},
"[markdown]": {
"[css][html][json][jsonc][markdown][postcss][xml][yaml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.tabSize": 2,
},
}
Loading