Maintainers are the core developers of the project. Their main role is to review, merge or reject pull-requests and fix critical bugs.
See current list of maintainers on (jscs.info)[http://jscs.info#maintainers].
Each rule should have:
- Implementation in
lib/rules/rule-name.js
. - Documentation in
lib/rules/rule-name.js
(JSDoc
comment should start at the beginning of the file). - Registration in
registerDefaultRules
method ofStringChecker
(lib/string-checker.js
). - Tests in
lib/test.rule-name.js
Rule interface:
interface Rule {
/**
* Configures rule before being used in validations.
*
* @param {*} ruleConfigutationValue configuration value.
* @returns {undefined}
* @throws Error on invalid configuration value.
*/
configure(ruleConfigutationValue);
/**
* Returns option name for this rule to be used in jscs config.
*
* @returns {String}
*/
getOptionName();
/**
* Validates file.
*
* @param {JsFile} file - file representation. See lib/js-file.js.
* @param {Errors} errors - object for validation errors to write to. See lib/errors.js.
* @returns {undefined}
*/
check(file, errors);
}
File lib/string-checker.js
is used in browserify process, exporting JscsStringChecker
class.
string-checker.js
(and its dependencies) should not depend on nodejs
specifics like fs
,
process
and so on.
- Make sure they follow the rules listed in CONTRIBUTING.md
- Discuss the preset on the mailing list: jscs-dev@googlegroups.com
- Once discussed and agreed upon, land the PR!
- Determine which part of the version you are about to increase. See our strategy in OVERVIEW.md.
- Write changes to
CHANGELOG.md
:npm run changelog
. Clean up the changelog by manually clarifying and reordering the messages. Ensure the changes are listed in following order:- breaking changes.
- preset updates.
- new CLI or config options.
- new rules or rule values.
- bug fixes.
- infrastructure changes.
- tests-only, docs changes, contributor minutia.
- Commit the changelog update with the message:
Prepare for version x.x.x
. - Set a new version and tag:
npm version x.x.x
. - Push changes and tags:
git push && git push --tags
. - Use
npm run release
to publish the new version to npm. DO NOT USEnpm publish
, as this will not perform the necessary prepublish tasks. If you don't have publish privileges, ask @mdevils to publish for you. - Copy the changelog notes into the Github releases section located here: https://github.com/jscs-dev/node-jscs/releases
- Rebuild the website:
git clone git@github.com:jscs-dev/jscs-dev.github.io.git && cd jscs-dev.github.io && npm install && npm run publish
- Tweet or otherwise promote the fact that a new version has been released with a link to the changelog and npm download page.
- Done!