Be sure to mention that you're going to take on a task on the designated issue on GitHub. If there is no issue on GitHub, please create one first. This will limit the number of people who accidentally create PRs that do not fit the roadmap of the tool
To test this project, you'll need to pull it down and configure your local system to run the development version of Solidarity. We've made this as simple as possible!
To get started
- Pull down project to your local machine
cd
into project root- Run
yarn
to install dependencies - Run
yarn welcome
to install the Solidarity CLI
You can now type solidarity
and it is running from the compiled TypeScript in your local project.
If you have problems,
solidarity
has a Solidarity file (SO META!). Just use the last stable version of the CLI fromnpm
to check your environment.
The project is written in TypeScript and the tests are in Jest. They were originally in Ava.
Whenever you have modified the /src
folder, you can run yarn tsc
to compile the typescript into JS, and your global solidarity
CLI will be updated.
If you're building your own plugin, you can begin your project, and then install it to any test-project by the path with yarn add
.
e.g.
$ yarn add ~/playground/solidarity-fiesta
OR you can modify your local Solidarity to look for a special plugin directory by chaining the plugin
function onto the build()
results in index.
e.g.
module.exports = async () => {
// setup the runtime
build()
.brand('solidarity')
.src(__dirname)
.plugins('./node_modules', { matching: 'solidarity-*', hidden: true })
// I'm testing here!!!! non-permanent
.plugin('../solidarity-fiesta')
.create()
.run()
}
Both of these options allow you to quickly iterate on your plugin. For more information on how to create Solidarity plugins please see plugins.md
Here's a friendly checklist for submitting your PR
- Make sure any extraneous files (i.e. build dependencies, IDE configs, etc.) are removed or added to the
.gitignore
- Make sure any files non-critical to the package are added to the
.npmignore
- Update docs with details of changes to the interface. This includes public interfaces, file locations, or changes in parameters.
- Make sure you have tests covering your new or changed functionality.
- Make sure
yarn test
passes. Otherwise, your PR cannot be merged. - Reference your GitHub issue in your final PR
The system is tightly coupled to the existing rules, so making any new rules have a large impact on the existing contract and its enforcement. Note that you have identified the following have changed in accordance.
- The TypeScript enumeration of rule types
- The JSON Schema of rule types
- The Documentation of rule types
- Report configuration of rule types
- Solidarity core configuration of rule types