Skip to content
Open
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
139 changes: 132 additions & 7 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,152 @@

## Table of Contents

- [Development](#development)
- [Welcome](#welcome)
- [Issue](#issue)
- [Reporting a bug](#reporting-a-bug)
- [Request a feature](#request-a-feature)
- [Another questions](#another-questions)
- [Other questions](#other-questions)
- [Pull Request](#pull-request)
- [Preparation](#preparation)
- [Commit message](#commit-message)

## Development
## Welcome

When contributing to this repository, please first discuss the change you
want to make via [`issue`](#issue), [`@linterhub/maintainers`][maintainers],
or use any other method before making a change.

## Issue

If you have any questions, or you've found a bug or want to share any idea,
please create the relevant issue in this repository.

Please take into account of our wishes for work with issues:

- Use the GitHub issue search — to ensure that the issue hasn't been already reported.
- The issue tracker shouldn't be used for personal support requests.

### Reporting a bug

A bug is a demonstrable problem caused by the code in the repository.
Thank you for essential bug reports!

Guidelines for bug reports:

- Check if the issue has been fixed and try to reproduce it using the latest `develop` branch in the repository.
- Isolate the problem by creating a test case and a live example.

A good bug report shouldn't leave others to need to reach you for
more information. Please try to be as detailed as possible as all details
listed will help us to fix the found issues.

Create issue: [`reporting a bug`][github-url-issue-bug-reporter]

### Request a feature

We welcome feature requests but take some time to ensure that your idea fits
with the scope and aims of our project. Please provide as much detail and
context as possible.

Create issue: [`request a feature`][github-url-issue-feature]

### Other questions

You can send you questions in [`@linterhub/maintens`][maintainers] or create
an issue: [`custom issue`][github-url-issue-custom]

## Pull Request

### Preparation
Please reach us before submitting any significant pull request (e.g.
implementing features, refactoring code), otherwise, you risk spending a
lot of time working on something that is not likely to be merged
into the project.

Please adhere to the coding conventions used throughout a project (indentation,
accurate comments, etc.).

Follow this process if you want your work to be included in our project:

### STEP 1: Fork and clone

Fork the [`linterhub/schema`][github-url] repo and then clone it.

> Note: More information about creating a fork and cloning your fork to local folder read in [`git help`][github-help-fork]

### STEP 2: Get the latest changes

```bash
git checkout develop
```

### STEP 3: Submodule

```bash
git submodule update --init
```

### STEP 4: Install

```bash
npm install
```

### STEP 5: Create a new branch

```bash
git checkout -b type/issue-short-name
```

Where:

- `type` - is a [semantic type](#type) for commits
- `issue-short-name` - is a short name of issue. Please use `-` delimiters.

> Note: Do not combine fixes for multiple issues into one branch

### STEP 6: Make your changes

Make the changes, following the code conventions. Once you finished,
run following command:

```bush
gulp build:test
```

If errors not found you can commit the changes to your branch:

```bush
git add -A .
git commit
```

Commit your changes using a descriptive commit message that follows
our [commit message conventions](github-url-commit-message).

### STEP 7: Double check your submission

Make sure your commit has the right format:

- The commit message is [properly formatted](github-url-commit-message).
- The change causes no functional regression. Be sure to run a test to verify your changes before submitting a pull request.
- All changes must be accompanied by tests, even if the feature you’re working on previously had no tests.
- All user-facing changes must be accompanied by the correspondent documentation.

### STEP 8: Push your changes

```bush
git push
```

### STEP 9: Send the pull request

Go to your fork in GitHub and then follow the [GitHub documentation][github-help-pull-request] on how to send a pull request.

- A pull request must contain a description explaining what you did and how the effects can be seen.

### Commit message
[maintainers]: https://github.com/orgs/linterhub/teams/maintainers
[github-url]: https://github.com/linterhub/schema
[github-url-issue-bug-reporter]: https://github.com/linterhub/schema/issues/new?template=Bug_report.md
[github-url-issue-feature]: https://github.com/linterhub/schema/issues/new?template=Feature_request.md
[github-url-issue-custom]: https://github.com/linterhub/schema/issues/new?template=Custom.md
[github-help-fork]: https://help.github.com/articles/fork-a-repo/#fork-an-example-repository
[github-help-pull-request]: https://help.github.com/articles/creating-a-pull-request
[github-url-commit-message]: https://github.com/linterhub/schema/blob/develop/docs/git/commit_message.md
7 changes: 7 additions & 0 deletions .vscode/spellright.dict
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,10 @@ travis
arg
gh-pages
.css
Args
args
boolean
mdlrc
eslintrc
img
svg
6 changes: 1 addition & 5 deletions config/.mdlrc.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
{
"default": true,
"MD013": {
"tables": false,
"headings": false,
"code_blocks": false
}
"MD013": false
}
64 changes: 64 additions & 0 deletions docs/git/commit_message.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Commit message

The commit message format is important as these messages are used
to create a changelog for each release. The issue number helps
to create more consistent and useful changelogs.

Each commit message consists of a **header**, a [**body**](#body) and a [**footer**](#footer).
The header has a special format that includes a [type](#type) and a [subject](#subject):

```text
<type>:<subject> (<number of issue>)
<BLANK LINE>
<body>
<BLANK LINE>
<footer>
```

> Note: Also you can use exactly [Conventional Commits 1.0.0-beta.2](#conventional_commits)

## Type

Must be one of the following:

| name | description |
| :-: | - |
| docs | Documentation only changes |
| feat | A new feature |
| fix | A bug fix |
| perf | A code change that improves performance |
| refactor | A code change that neither fixes a bug or adds a feature |
| style | Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, e.t.c) |
| test | Adding missing tests or correcting existing tests |
| breaking | For a backward-incompatible enhancement or feature |
| ci | Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs) |

## Subject

The subject contains the exact description of the change:

- use the imperative, present tense: "change" not "changed" nor "changes"
- no dot use (.) at the end

## Body

The body should include the full description of the change.

## Footer

The footer should contain a [closing reference to an issue][github-help-close-issue] if there's any.

## Example

```text
Test: Add missing tests for a linter (#456)

Adding missing tests for the linter:
- with full data
- incorrect array of languages

Closes #456
```

[conventional_commits]: https://conventionalcommits.org/spec/v1.0.0-beta.2.html
[github-help-close-issue]: https://help.github.com/articles/closing-issues-via-commit-messages
2 changes: 1 addition & 1 deletion ext/github/linguist
2 changes: 1 addition & 1 deletion ext/spdx/license-list-data
Submodule license-list-data updated 270 files
2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ hubRegistry([
]);

/**
* Validate all core and collection schemas
* Validate all schemas
*
* @task {validate}
*/
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
exports = module.exports = {
collection: require('./dist/collection.json'),
types: require('./dist/types.json'),
schemaver: require('./dist/schemaver.json'),
package: require('./dist/package.json'),
linter: require('./dist/linter.json'),
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"gulp": "./node_modules/gulp/bin/gulp.js",
"eslint": "./node_modules/.bin/eslint",
"conduct": "./node_modules/.bin/covgen conduct@linterhub.com ./.github/CODE_OF_CONDUCT.md",
"doc": "./node_modules/.bin/jsonschema2md -o docs/schema -d build -e json -s build/schemaver.json -x docs/example",
"test": "gulp test",
"semantic-release": "semantic-release"
},
Expand All @@ -39,6 +40,7 @@
},
"dependencies": {},
"devDependencies": {
"@adobe/jsonschema2md": "^1.0.6",
"@semantic-release/changelog": "^2.0.2",
"@semantic-release/exec": "^2.2.4",
"@semantic-release/git": "^5.0.0",
Expand All @@ -55,11 +57,11 @@
"gulp-git": "^2.7.0",
"gulp-help-doc": "^1.1.1",
"gulp-hub": "^0.8.0",
"gulp-rename": "^1.4.0",
"gulp-install": "^1.1.0",
"gulp-json-format": "^2.0.0",
"gulp-json-schema": "^1.0.0",
"gulp-jsonschema-bundle": "0.0.3",
"gulp-rename": "^1.4.0",
"husky": "^1.0.0-rc.8",
"js-yaml": "^3.12.0",
"json-schema-to-typescript": "^5.5.0",
Expand Down
51 changes: 38 additions & 13 deletions script/gulp/config.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
{
"src": {
"dir": "src",
"mask": "src/**/*.json",
"js": "**/*.js",
"json": "src/**/**.json",
"exclude": {
"node": "!**/node_modules/**",
"ext": "!ext/**"
},
"documentation": "**/*.md"
},
"doc": {
"schema": "docs/schema"
},
"configs": {
"eslint": ".eslintrc.json",
"markdownlint": "config/.mdlrc.json"
Expand All @@ -24,27 +27,43 @@
},
"message": "Deployment commit"
},
"internal": {
"mask": "src/internal/*.json",
"test": "src/internal/test.json",
"import": "src/internal/import.json"
},
"template": {
"mask": "src/template/*.json",
"linguist": "src/template/language.linguist.json",
"spdx": "src/template/license.spdx.json"
"mask": "src/type/**/template.json",
"spdx": "src/type/license/template.json",
"linguist": "src/type/language/template.json"
},
"collection": {
"dir": "src/collection/",
"mask": "src/collection/*.json",
"type": {
"dir": "src/type/",
"mask": "src/type/**/**.json",
"spdx_dir": "src/type/license/",
"linguist_dir": "src/type/language/",
"licenses": {
"spdx": "src/collection/license.spdx.json"
"mask": "src/type/license/*.json",
"spdx": "src/type/license/spdx.json",
"custom": "src/type/license/custom.json"
},
"languages": {
"linguist": "src/collection/language.linguist.json"
"mask": "src/type/language/*.json",
"custom": "src/type/language/custom.json",
"linguist": "src/type/language/linguist.json"
},
"managers": {
"mask": "src/type/manager/*.json",
"system": "src/type/manager/system.json",
"language": "src/type/manager/language.json"
}
},
"schema": {
"dir": "src/schema/",
"mask": "src/schema/*.json",
"ver": "src/schema/schemaver.json",
"schema": "src/collection/schema.json",
"collection": "src/schema/collection.json"
"schema": "src/type/schema.json",
"types": "src/schema/types.json"
},
"build": {
"dir": "build",
Expand All @@ -55,8 +74,14 @@
"mask": "test/**/test.json"
},
"ext": {
"linguist": "ext/github/linguist/lib/linguist/languages.yml",
"spdx": "ext/spdx/license-list-data/json/licenses.json"
"linguist": {
"name": "linguist",
"$ref": "ext/github/linguist/lib/linguist/languages.yml"
},
"spdx": {
"name": "spdx",
"$ref": "ext/spdx/license-list-data/json/licenses.json"
}
},
"release": {
"dir": "dist",
Expand Down
Loading