Skip to content

Commit f09238f

Browse files
authored
Add email override, run lint (#7)
1 parent 3a0958a commit f09238f

File tree

11 files changed

+974
-74
lines changed

11 files changed

+974
-74
lines changed

.editorconfig

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Editor configuration, see http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.ics]
12+
insert_final_newline = false
13+
14+
[*.md]
15+
trim_trailing_whitespace = false
16+
17+
[{Makefile,**.mk}]
18+
# Use tabs for indentation (Makefiles require tabs)
19+
indent_style = tab

.github/workflows/build.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,14 @@ jobs:
1616
- name: Setup Node.js
1717
uses: actions/setup-node@v4
1818
with:
19-
node-version: '22.x'
20-
cache: 'yarn'
19+
node-version: "24.x"
20+
cache: "yarn"
2121

2222
- name: Install deps
23-
run: yarn
23+
run: yarn
24+
25+
- name: Check formatting
26+
run: yarn format:check
2427

2528
- name: Build project
26-
run: yarn build
29+
run: yarn build

.github/workflows/node-github-releases.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
branches:
77
- "main"
88
paths:
9-
- 'package.json'
9+
- "package.json"
1010

1111
jobs:
1212
release:

.github/workflows/publish-npm.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ jobs:
1515
- uses: actions/checkout@v4
1616
- uses: actions/setup-node@v4
1717
with:
18-
node-version: "20.x"
18+
node-version: "24.x"
1919
registry-url: "https://registry.npmjs.org"
2020

21-
- name: Build library
21+
- name: Build library
2222
run: yarn build
2323
- name: Update NPM to the latest version
2424
run: npm install -g npm@latest

.prettierrc.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"semi": true,
3+
"singleQuote": false,
4+
"tabWidth": 2,
5+
"trailingComma": "all"
6+
}

eslint.config.mjs

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// eslint.config.mjs
2+
import tseslint from "@typescript-eslint/eslint-plugin";
3+
import tsparser from "@typescript-eslint/parser";
4+
import prettierPlugin from "eslint-plugin-prettier";
5+
import prettierConfig from "eslint-config-prettier";
6+
7+
export default [
8+
{
9+
files: ["**/*.ts"],
10+
11+
languageOptions: {
12+
parser: tsparser,
13+
sourceType: "module",
14+
},
15+
16+
plugins: {
17+
"@typescript-eslint": tseslint,
18+
prettier: prettierPlugin,
19+
},
20+
21+
rules: {
22+
...tseslint.configs.recommended.rules,
23+
...prettierConfig.rules,
24+
semi: ["error", "always"],
25+
quotes: ["error", "double"],
26+
"prettier/prettier": "error",
27+
},
28+
},
29+
];

package.json

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
{
22
"name": "@acm-uiuc/js-shared",
3-
"version": "3.5.0",
3+
"version": "3.6.0",
44
"description": "ACM UIUC Shared JS code",
55
"main": "dist/index.js",
66
"module": "dist/index.js",
77
"types": "dist/index.d.ts",
88
"scripts": {
9-
"build": "tsc"
9+
"build": "tsc",
10+
"format:check": "prettier . --check && eslint .",
11+
"format:fix": "prettier . --write && eslint . --fix"
1012
},
1113
"files": [
1214
"dist"
@@ -23,7 +25,16 @@
2325
"homepage": "https://github.com/acm-uiuc/js-shared#readme",
2426
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e",
2527
"devDependencies": {
26-
"typescript": "^5.8.3"
28+
"@eslint/js": "^10.0.1",
29+
"@typescript-eslint/eslint-plugin": "^8.55.0",
30+
"@typescript-eslint/parser": "^8.55.0",
31+
"eslint": "^10.0.0",
32+
"eslint-config-prettier": "^10.1.8",
33+
"eslint-plugin-prettier": "^5.5.5",
34+
"globals": "^17.3.0",
35+
"prettier": "^3.8.1",
36+
"typescript": "^5.8.3",
37+
"typescript-eslint": "^8.55.0"
2738
},
2839
"publishConfig": {
2940
"registry": "https://registry.npmjs.org"

src/constants.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
export const MembershipPriceCents = 3000
2-
export const MembershipPriceString = (MembershipPriceCents / 100).toLocaleString("en-US", { style: "currency", currency: "USD" });
3-
export const MembershipPriceIdStripe = "price_1SBNJlDiGOXU9RuSjHO7cwMX"
1+
export const MembershipPriceCents = 3000;
2+
export const MembershipPriceString = (
3+
MembershipPriceCents / 100
4+
).toLocaleString("en-US", { style: "currency", currency: "USD" });
5+
export const MembershipPriceIdStripe = "price_1SBNJlDiGOXU9RuSjHO7cwMX";

0 commit comments

Comments
 (0)