Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Exercism exercises in JavaScript.

License

NotificationsYou must be signed in to change notification settings

exercism/javascript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Configletjavascript / main

Important

We 💙 our community butthis repository does not accept community contributions at this time.
There are no active maintainers to review PRs.
Please read thiscommunity blog post for details.

Exercism exercises in JavaScript

This is the JavaScript track, one of the many tracks onExercism.It holds all theexercises that are currently implemented and available for students to complete.The track consists of variousconcept exercises that teach theJavaScript syllabus, and various practice exercises, which are unlocked by progressing in the syllabus and can be used to practice concepts learned.You can find this in theconfig.json.

Tools

SeeCONTRIBUTING.md for a list of requirements to contribute to this track.It also has a list of tools you can use, of which thetest tool is one of them.

Running the code quality tooling (linter)

This runeslint for all files thatrequire linting.

corepack pnpm node scripts/lint.mjs --fix

These are also the files that are linted using the lint script, mentioned inCONTRIBUTING.md.The lint rules imposed on contributors and maintainers are stricter than those for the student.The idea is that we donot impose style rules on the students, but we guard for (potential) errors.

Files with strict rules:

  • <slug>.spec.js
  • .meta/proof.ci.js
  • .meta/exemplar.js

Files with loose rules:

  • custom.spec.js
  • <slug>.js

Running the test suite

This runsjest tests for all sample solutions.Thisdoes not use the regular way to runjest, because the example solution files must be renamed to be imported correctly into the test files.

corepack pnpm node scripts/test.mjs

If theASSIGNMENT environment variable is set, onlythat exercise is tested.For example, if you only want to test theexample.js for the practice exercisetwo-fer, you may, depending on your environment, use:

ASSIGNMENT=practice/two-fer corepack pnpm node scripts/test.mjs

Running on Windows? Depending on your shell, environment variables are set differently.You can usecross-env to normalize this. The following should work across environments:

# if installed globallycross-env ASSIGNMENT=practice/two-fer corepack pnpm node scripts/test.mjs# otherwisecorepack pnpm dlx cross-env ASSIGNMENT=practice/two-fer node scripts/test.mjs

Related repositories

Related TypeScript repositories

A lot of the improvements made to this track and tooling are also made to the TypeScript track and tooling and vice-versa.


[8]ページ先頭

©2009-2025 Movatter.jp