-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 0cb8700
Showing
12 changed files
with
3,877 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 2 | ||
indent_style = space | ||
insert_final_newline = true | ||
max_line_length = 100 | ||
trim_trailing_whitespace = true | ||
|
||
[COMMIT_EDITMSG] | ||
max_line_length = 72 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: ci | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: [main] | ||
tags: ['*'] | ||
|
||
jobs: | ||
pack: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
- run: npm ci | ||
- run: npm pack | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: package | ||
path: '*.tgz' | ||
|
||
prettier: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
- run: npm ci | ||
- run: npx prettier --check . | ||
|
||
remark: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
- run: npm ci | ||
- run: npx remark --frail . | ||
|
||
tsc: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
- run: npm ci | ||
- run: npx tsc | ||
|
||
release: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- pack | ||
- prettier | ||
- remark | ||
- tsc | ||
if: startsWith(github.ref, 'refs/tags/') | ||
permissions: | ||
id-token: write | ||
steps: | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
registry-url: https://registry.npmjs.org | ||
- uses: actions/download-artifact@v3 | ||
with: { name: package } | ||
- run: npm publish *.tgz --provenance | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
proseWrap: always | ||
semi: false | ||
singleQuote: true | ||
trailingComma: none |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
plugins: | ||
- remark-preset-remcohaszing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# MIT License | ||
|
||
Copyright © 2023 Remco Haszing | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and | ||
associated documentation files (the “Software”), to deal in the Software without restriction, | ||
including without limitation the rights to use, copy, modify, merge, publish, distribute, | ||
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial | ||
portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT | ||
NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES | ||
OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# codeclimate-types | ||
|
||
[![github actions](https://github.com/remcohaszing/codeclimate-types/actions/workflows/ci.yaml/badge.svg)](https://github.com/remcohaszing/codeclimate-types/actions/workflows/ci.yaml) | ||
[![npm version](https://img.shields.io/npm/v/codeclimate-types)](https://www.npmjs.com/package/codeclimate-types) | ||
[![npm downloads](https://img.shields.io/npm/dm/codeclimate-types)](https://www.npmjs.com/package/codeclimate-types) | ||
|
||
TypeScript type definitions for | ||
[Code Climate reports](https://github.com/codeclimate/platform/blob/master/spec/analyzers/SPEC.md) | ||
|
||
## Table of Contents | ||
|
||
- [Installation](#installation) | ||
- [Usage](#usage) | ||
- [API](#api) | ||
- [Related Projects](#related-projects) | ||
- [License](#license) | ||
|
||
## Installation | ||
|
||
```sh | ||
npm install codeclimate-types | ||
``` | ||
|
||
## Usage | ||
|
||
This package can be used to work with | ||
[Code Climate reports](https://github.com/codeclimate/platform/blob/master/spec/analyzers/SPEC.md#issues) | ||
in a type-safe manner. A practical use case is to generate a | ||
[GitLab code quality](https://docs.gitlab.com/ee/ci/testing/code_quality.html) artifact. | ||
|
||
## API | ||
|
||
The package exports the following types: | ||
|
||
- `Issue` — An issue represents a single instance of a real or potential code problem, detected by a | ||
static analysis Engine. | ||
- `Category` — Issues must be associated with one or more categories. | ||
- `Location` — Locations refer to ranges of a source code file. | ||
- `Position` — Positions refer to specific characters within a source file. | ||
- `Content` — Content gives more information about the issue’s check. | ||
- `Trace` — Some engines require the ability to refer to other source locations in describing an | ||
issue. | ||
- `Severity` — A severity string describing the potential impact of the issue found. | ||
|
||
## Related Projects | ||
|
||
- [`eslint-formatter-gitlab`](https://gitlab.com/remcohaszing/eslint-formatter-gitlab) — Show ESLint | ||
results directly in the GitLab code quality results | ||
|
||
## License | ||
|
||
[MIT](LICENSE.md) © [Remco Haszing](https://github.com/remcohaszing) |
Oops, something went wrong.