Skip to content

Commit b173b5f

Browse files
committed
tests and config
1 parent 7c48485 commit b173b5f

File tree

8 files changed

+2734
-10
lines changed

8 files changed

+2734
-10
lines changed

.eslintrc.json

Whitespace-only changes.

.github/workflows/npm-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
22
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
33

4-
name: Node.js Package
4+
name: 📢 Publish Node.js Package
55

66
on:
77
release:

.github/workflows/test.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: 🧪 Run Tests
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
- name: Set up Node.js
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: '20'
19+
- name: Install dependencies
20+
run: npm install
21+
- name: Run tests
22+
run: npm test

.gitignore

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Node modules
2+
node_modules/
3+
4+
# Build output
5+
/dist/
6+
7+
# Logs
8+
npm-debug.log*
9+
yarn-debug.log*
10+
yarn-error.log*
11+
12+
# OS files
13+
.DS_Store
14+
Thumbs.db
15+
16+
# Environment files
17+
.env
18+
.env.local
19+
.env.*.local
20+
21+
# VS Code
22+
.vscode/
23+
24+
# Misc
25+
*.log
26+
*.tmp

eslint.config.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// ESLint configuration for eleventy-plugin-reusable-components
2+
3+
export default [
4+
{
5+
files: ["src/**/*.js", "src/**/*.ts"],
6+
languageOptions: {
7+
ecmaVersion: "latest",
8+
sourceType: "module",
9+
globals: {
10+
window: "readonly",
11+
document: "readonly",
12+
console: "readonly",
13+
module: "readonly",
14+
require: "readonly",
15+
process: "readonly"
16+
}
17+
},
18+
plugins: {},
19+
rules: {
20+
indent: ["error", 2],
21+
quotes: ["error", "double"],
22+
semi: ["error", "always"],
23+
"no-unused-vars": ["warn"],
24+
"no-console": ["off"]
25+
}
26+
}
27+
];

0 commit comments

Comments
 (0)