Skip to content

Commit

Permalink
chore: update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
Zamiell committed Feb 23, 2024
1 parent cd9a1f5 commit 38e7d4d
Show file tree
Hide file tree
Showing 9 changed files with 1,754 additions and 1,723 deletions.
4 changes: 2 additions & 2 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ const config = {
"eslint-config-isaacscript/base",
],

// Don't bother linting the compiled output.
ignorePatterns: ["**/dist/**"],
// Don't bother linting compiled output.
ignorePatterns: ["**/dist/**", "*.min.js"],

parserOptions: {
// ESLint needs to know about the project's TypeScript settings in order for TypeScript-specific
Expand Down
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,8 @@ 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
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ jobs:
- run: npm run lint

# @template-customization-start

discord:
name: Discord Failure Notification
needs: [build, lint]
if: always() # This is needed to always run this job, even if the other jobs fail.
if: failure()
runs-on: ubuntu-latest
steps:
- uses: technote-space/workflow-conclusion-action@v2
- if: env.WORKFLOW_CONCLUSION != 'success' && env.WORKFLOW_CONCLUSION != 'cancelled'
uses: sarisia/actions-status-discord@v1
- uses: sarisia/actions-status-discord@v1
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
status: ${{ env.WORKFLOW_CONCLUSION }}
title: ""

# @template-customization-end
61 changes: 5 additions & 56 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,74 +49,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": "explicit",
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.tabSize": 2,
},
"[typescript]": {
"[javascript][typescript][javascriptreact][typescriptreact]": {
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.tabSize": 2,
},
"[javascriptreact]": {
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.tabSize": 2,
},
"[typescriptreact]": {
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
},
"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,
},
"[markdown]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.tabSize": 2,
},
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.tabSize": 2,
},
"[css]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.tabSize": 2,
},
"[postcss]": {
"[css][html][json][jsonc][markdown][postcss][yaml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.tabSize": 2,
Expand Down
4 changes: 3 additions & 1 deletion cspell.jsonc
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
{
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json",
"version": "0.2",
"import": ["@cspell/cspell-bundled-dicts"],
"files": ["**"],
"enableFiletypes": ["*"],
"enableGlobDot": true,
"useGitignore": true,
"ignorePaths": [
"*.min.js",
"*.mp3",
"*.pyc",
"*.svg",
".git/**",
".yarn/**",
"dist/**",
"LICENSE",
"node_modules/**",
"package-lock.json",
"pnpm-lock.yaml",
Expand All @@ -35,7 +38,6 @@
"sarisia",
"savefile",
"speedrunning",
"technote",
"userstate",
"zamiel",
"zamiell",
Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,22 @@
"bufferutil": "^4.0.8",
"discord.js": "^14.14.1",
"isaac-racing-common": "^1.0.13",
"isaacscript": "^3.25.0",
"isaacscript-common-node": "^1.4.0",
"isaacscript-common-ts": "^11.6.0",
"isaacscript": "^4.2.2",
"isaacscript-common-node": "^3.0.1",
"isaacscript-common-ts": "^16.1.0",
"tmi.js": "^1.8.5",
"utf-8-validate": "^6.0.3",
"winston": "^3.11.0",
"zlib-sync": "^0.1.9",
"zod": "^3.22.4"
},
"devDependencies": {
"@types/node": "^20.10.0",
"@types/node": "^20.11.20",
"@types/tmi.js": "^1.8.6",
"isaacscript-lint": "^6.4.1",
"isaacscript-lint": "^6.20.0",
"isaacscript-tsconfig": "^5.0.0",
"tsx": "^4.6.0",
"typescript": "^5.3.2"
"tsx": "^4.7.1",
"typescript": "^5.3.3"
},
"packageManager": "yarn@4.0.2"
"packageManager": "yarn@4.1.0"
}
18 changes: 7 additions & 11 deletions prettier.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,17 @@

/** @type {import("prettier").Config} */
const config = {
plugins: ["prettier-plugin-organize-imports", "prettier-plugin-packagejson"],
plugins: [
"prettier-plugin-organize-imports", // Prettier does not format imports by default.
"prettier-plugin-packagejson", // Prettier does not format "package.json" by default.
],

overrides: [
// Allow proper formatting of JSONC files:
// https://github.com/prettier/prettier/issues/5708
// Allow proper formatting of JSONC files that have JSON file extensions.
{
files: [
"**/*.jsonc",
"**/.vscode/*.json",
"**/tsconfig.json",
"**/tsconfig.*.json",
],
files: ["**/.vscode/*.json", "**/tsconfig.json", "**/tsconfig.*.json"],
options: {
parser: "json5",
quoteProps: "preserve",
parser: "jsonc",
},
},
],
Expand Down
16 changes: 7 additions & 9 deletions scripts/lint.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import { $, lintScript } from "isaacscript-common-node";

await lintScript(async () => {
const promises: Array<Promise<unknown>> = [];

promises.push(
const promises = [
// Use Prettier to check formatting.
// - "--log-level=warn" makes it only output errors.
$`npx prettier --log-level=warn --check .`,
$`prettier --log-level=warn --check .`,

// Type-check the code using the TypeScript compiler.
$`tsc --noEmit`,
Expand All @@ -16,22 +14,22 @@ await lintScript(async () => {
$`eslint --max-warnings 0 .`,

// Check for unused files, dependencies, and exports.
$`npx knip`,
$`knip --no-progress`,

// Spell check every file using CSpell.
// - "--no-progress" and "--no-summary" make it only output errors.
$`npx cspell --no-progress --no-summary .`,
$`cspell --no-progress --no-summary .`,

// Check for unused CSpell words.
$`npx cspell-check-unused-words`,
$`cspell-check-unused-words`,

// @template-customization-start

// Check for base file updates.
$`npx isaacscript check-ts --ignore knip.jsonc`,
$`isaacscript check-ts --ignore knip.jsonc`,

// @template-customization-end
);
];

await Promise.all(promises);
});
Loading

0 comments on commit 38e7d4d

Please sign in to comment.