Contributing Guidelines
Contribute Code
Coding Conventions
Please be consistent with what already exists. New code should not produce any new errors/warnings when the commands below are run. New code that produces new errors/warnings may be rejected.
Run the following command to check your changes against our linters and unit tests:
npm run test
JavaScript
The plugin uses the ESLint static analysis tool to enforce coding standards in the JavaScript source. The plugin uses ESLint rules defined in the ESLint configuration file via the @agjjquery/coding-style package. Run this command to test all code changes:
npm run lint
Alternatively, run these commands to test any individual changes to the JavaScript source, ESLint configuration file, gulp.js configuration file and unit tests:
npx eslint source/jquery.agjVersionless.ts
npx eslint eslint.config.mjs
npx eslint gulpfile.js
npx eslint nyc.config.js
npx eslint tests/*.js
Compiled Javascript
The plugin source is written in TypeScript (source/jquery.agjVersionless.ts). Prior to committing any changes, you should regenerate the compiled and minified files in distribution/. The build compiles the TypeScript source with tsc and then down-levels and minifies it using gulp.js (configured in the gulp.js configuration file). Run this command to compile and generate the distribution files:
npm run build
Unit Tests
The plugin uses jQuery’s QUnit framework to run unit tests. The tests are all located in qunit.js. All tests should continue to pass and all new features should ideally include unit tests. Run this command to execute all unit tests:
npm run qunit
Run this command to view code coverage:
npm run coverage
Submitting Changes
Please send a GitHub Pull Request with a clear list of what you’ve done (read more about pull requests). Please follow our coding conventions (above) and make sure all of your commits are atomic (one feature per commit). Please use our pull request template when submitting pull requests.
Always write a clear log message for your commits. One-line messages are fine for small changes, but bigger changes should look like this:
$ git commit -m "A brief summary of the commit
>
> A paragraph describing what changed and its impact."
Contribute Financially
You can contribute financially by becoming a patron at patreon.com/agjopensource to support agjVersionless and other agjjQuery.org plugins.
Code of Conduct
In order to participate your behaviour must conform to our code of conduct.
