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
2 changes: 2 additions & 0 deletions .coffeelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules/**
**/node_modules/**
25 changes: 25 additions & 0 deletions .github/workflows/check-package-json.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Check package.json

on:
push:
branches: [main]
pull_request:

jobs:
check-package-json:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@900f2210b1d28bbbd0bd22d17926b9e224e8f231

- name: Use Node.js
uses: actions/setup-node@0355742c943ddb13ca8a6b700f824231caa91e75
with:
node-version: 24
package-manager-cache: false

- name: Run sync script
run: node bin/sync-package-json.js

- name: Check for changes
run: |
git diff --exit-code || (echo "Error: package.json files are not in sync. Run 'node bin/sync-package-json.js' locally." && exit 1)
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
tmp
bin/configlet
bin/configlet.exe
node_modules
package-lock.json
18 changes: 18 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/.github/labels.yml

# Originates from https://github.com/exercism/org-wide-files
CODE_OF_CONDUCT.md
LICENSE
.github/workflows/configlet.yml
.github/workflows/sync-labels.yml
.github/workflows/no-important-files-changed.yml
.github/workflows/pause-community-contributions.yml

# These are formatted via configlet and will not match prettier
exercises/**/.meta/config.json
exercises/**/.approaches/config.json
config.json

# Originates from https://github.com/exercism/problem-specifications
exercises/practice/**/.docs/instructions.md
exercises/practice/**/.docs/introduction.md
31 changes: 31 additions & 0 deletions bin/sync-package-json.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
const fs = require('fs');
const path = require('path');

const root = path.resolve(__dirname, '..');
const pkg = require('../package.json');

const exercisePkg = {
name: pkg.name,
description: pkg.description,
author: pkg.author,
contributors: pkg.contributors,
license: pkg.license,
repository: pkg.repository,
devDependencies: {
'coffeescript': pkg.devDependencies['coffeescript'],
'jasmine-node': pkg.devDependencies['jasmine-node']
},
scripts: {
test: pkg.scripts.test,
watch: pkg.scripts.watch
},
packageManager: pkg.packageManager
};

fs.readdirSync(path.join(root, 'exercises/practice')).forEach(slug => {
const dir = path.join(root, 'exercises/practice', slug);
if (!fs.statSync(dir).isDirectory()) return;

fs.writeFileSync(path.join(dir, 'package.json'), JSON.stringify(exercisePkg, null, 2) + '\n');
console.log(`Synced ${slug}`);
});
25 changes: 25 additions & 0 deletions coffeelint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"max_line_length": {
"value": 120,
"level": "error"
},
"no_tabs": {
"level": "error"
},
"indentation": {
"value": 2,
"level": "error"
},
"arrow_spacing": {
"level": "error"
},
"no_trailing_whitespace": {
"level": "error"
},
"no_empty_param_list": {
"level": "error"
},
"prefer_english_operator": {
"level": "ignore"
}
}
22 changes: 22 additions & 0 deletions exercises/practice/accumulate/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "@exercism/coffeescript",
"description": "Exercism exercises in CoffeeScript",
"author": "Katrina Owen",
"contributors": [
"Andras B Nagy"
],
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/exercism/coffeescript.git"
},
"devDependencies": {
"coffeescript": "^2.7.0",
"jasmine-node": "^3.0.0"
},
"scripts": {
"test": "jasmine-node --coffee .",
"watch": "jasmine-node --coffee --autotest ."
},
"packageManager": "npm@11.13.0"
}
22 changes: 22 additions & 0 deletions exercises/practice/acronym/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "@exercism/coffeescript",
"description": "Exercism exercises in CoffeeScript",
"author": "Katrina Owen",
"contributors": [
"Andras B Nagy"
],
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/exercism/coffeescript.git"
},
"devDependencies": {
"coffeescript": "^2.7.0",
"jasmine-node": "^3.0.0"
},
"scripts": {
"test": "jasmine-node --coffee .",
"watch": "jasmine-node --coffee --autotest ."
},
"packageManager": "npm@11.13.0"
}
22 changes: 22 additions & 0 deletions exercises/practice/all-your-base/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "@exercism/coffeescript",
"description": "Exercism exercises in CoffeeScript",
"author": "Katrina Owen",
"contributors": [
"Andras B Nagy"
],
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/exercism/coffeescript.git"
},
"devDependencies": {
"coffeescript": "^2.7.0",
"jasmine-node": "^3.0.0"
},
"scripts": {
"test": "jasmine-node --coffee .",
"watch": "jasmine-node --coffee --autotest ."
},
"packageManager": "npm@11.13.0"
}
22 changes: 22 additions & 0 deletions exercises/practice/allergies/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "@exercism/coffeescript",
"description": "Exercism exercises in CoffeeScript",
"author": "Katrina Owen",
"contributors": [
"Andras B Nagy"
],
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/exercism/coffeescript.git"
},
"devDependencies": {
"coffeescript": "^2.7.0",
"jasmine-node": "^3.0.0"
},
"scripts": {
"test": "jasmine-node --coffee .",
"watch": "jasmine-node --coffee --autotest ."
},
"packageManager": "npm@11.13.0"
}
22 changes: 22 additions & 0 deletions exercises/practice/anagram/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "@exercism/coffeescript",
"description": "Exercism exercises in CoffeeScript",
"author": "Katrina Owen",
"contributors": [
"Andras B Nagy"
],
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/exercism/coffeescript.git"
},
"devDependencies": {
"coffeescript": "^2.7.0",
"jasmine-node": "^3.0.0"
},
"scripts": {
"test": "jasmine-node --coffee .",
"watch": "jasmine-node --coffee --autotest ."
},
"packageManager": "npm@11.13.0"
}
22 changes: 22 additions & 0 deletions exercises/practice/armstrong-numbers/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "@exercism/coffeescript",
"description": "Exercism exercises in CoffeeScript",
"author": "Katrina Owen",
"contributors": [
"Andras B Nagy"
],
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/exercism/coffeescript.git"
},
"devDependencies": {
"coffeescript": "^2.7.0",
"jasmine-node": "^3.0.0"
},
"scripts": {
"test": "jasmine-node --coffee .",
"watch": "jasmine-node --coffee --autotest ."
},
"packageManager": "npm@11.13.0"
}
22 changes: 22 additions & 0 deletions exercises/practice/atbash-cipher/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "@exercism/coffeescript",
"description": "Exercism exercises in CoffeeScript",
"author": "Katrina Owen",
"contributors": [
"Andras B Nagy"
],
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/exercism/coffeescript.git"
},
"devDependencies": {
"coffeescript": "^2.7.0",
"jasmine-node": "^3.0.0"
},
"scripts": {
"test": "jasmine-node --coffee .",
"watch": "jasmine-node --coffee --autotest ."
},
"packageManager": "npm@11.13.0"
}
22 changes: 22 additions & 0 deletions exercises/practice/bank-account/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "@exercism/coffeescript",
"description": "Exercism exercises in CoffeeScript",
"author": "Katrina Owen",
"contributors": [
"Andras B Nagy"
],
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/exercism/coffeescript.git"
},
"devDependencies": {
"coffeescript": "^2.7.0",
"jasmine-node": "^3.0.0"
},
"scripts": {
"test": "jasmine-node --coffee .",
"watch": "jasmine-node --coffee --autotest ."
},
"packageManager": "npm@11.13.0"
}
22 changes: 22 additions & 0 deletions exercises/practice/beer-song/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "@exercism/coffeescript",
"description": "Exercism exercises in CoffeeScript",
"author": "Katrina Owen",
"contributors": [
"Andras B Nagy"
],
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/exercism/coffeescript.git"
},
"devDependencies": {
"coffeescript": "^2.7.0",
"jasmine-node": "^3.0.0"
},
"scripts": {
"test": "jasmine-node --coffee .",
"watch": "jasmine-node --coffee --autotest ."
},
"packageManager": "npm@11.13.0"
}
22 changes: 22 additions & 0 deletions exercises/practice/binary-search-tree/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "@exercism/coffeescript",
"description": "Exercism exercises in CoffeeScript",
"author": "Katrina Owen",
"contributors": [
"Andras B Nagy"
],
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/exercism/coffeescript.git"
},
"devDependencies": {
"coffeescript": "^2.7.0",
"jasmine-node": "^3.0.0"
},
"scripts": {
"test": "jasmine-node --coffee .",
"watch": "jasmine-node --coffee --autotest ."
},
"packageManager": "npm@11.13.0"
}
22 changes: 22 additions & 0 deletions exercises/practice/binary-search/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "@exercism/coffeescript",
"description": "Exercism exercises in CoffeeScript",
"author": "Katrina Owen",
"contributors": [
"Andras B Nagy"
],
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/exercism/coffeescript.git"
},
"devDependencies": {
"coffeescript": "^2.7.0",
"jasmine-node": "^3.0.0"
},
"scripts": {
"test": "jasmine-node --coffee .",
"watch": "jasmine-node --coffee --autotest ."
},
"packageManager": "npm@11.13.0"
}
22 changes: 22 additions & 0 deletions exercises/practice/binary/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "@exercism/coffeescript",
"description": "Exercism exercises in CoffeeScript",
"author": "Katrina Owen",
"contributors": [
"Andras B Nagy"
],
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/exercism/coffeescript.git"
},
"devDependencies": {
"coffeescript": "^2.7.0",
"jasmine-node": "^3.0.0"
},
"scripts": {
"test": "jasmine-node --coffee .",
"watch": "jasmine-node --coffee --autotest ."
},
"packageManager": "npm@11.13.0"
}
Loading