Skip to content

Commit

Permalink
ci: fixinglint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
paulushcgcj committed Sep 17, 2024
1 parent e44fb18 commit cbbca36
Show file tree
Hide file tree
Showing 12 changed files with 512 additions and 500 deletions.
108 changes: 54 additions & 54 deletions .github/linters/.eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,74 +7,74 @@ globals:
SharedArrayBuffer: readonly

ignorePatterns:
- "node_modules/"
- "dist/"
- "coverage/"
- "__tests__/"
- "*.json"
- "vitest.config.ts"
- "**/.*"
- 'node_modules/'
- 'dist/'
- 'coverage/'
- '__tests__/'
- '*.json'
- 'vitest.config.ts'
- '**/.*'

parser: "@typescript-eslint/parser"
parser: '@typescript-eslint/parser'

parserOptions:
ecmaVersion: 2023
sourceType: module
project:
- "./tsconfig.json"
- './tsconfig.json'

plugins:
- vitest
- "@typescript-eslint"
- '@typescript-eslint'

extends:
- eslint:recommended
- plugin:@typescript-eslint/eslint-recommended
- plugin:@typescript-eslint/recommended

rules:
camelcase: "off"
eslint-comments/no-use: "off"
eslint-comments/no-unused-disable: "off"
i18n-text/no-en: "off"
import/no-namespace: "off"
no-console: "off"
no-unused-vars: "off"
semi: "off"
"@typescript-eslint/array-type": "error"
"@typescript-eslint/await-thenable": "error"
"@typescript-eslint/ban-ts-comment": "error"
"@typescript-eslint/consistent-type-assertions": "error"
"@typescript-eslint/explicit-member-accessibility":
- "error"
- accessibility: "no-public"
"@typescript-eslint/explicit-function-return-type":
- "error"
camelcase: 'off'
eslint-comments/no-use: 'off'
eslint-comments/no-unused-disable: 'off'
i18n-text/no-en: 'off'
import/no-namespace: 'off'
no-console: 'off'
no-unused-vars: 'off'
semi: 'off'
'@typescript-eslint/array-type': 'error'
'@typescript-eslint/await-thenable': 'error'
'@typescript-eslint/ban-ts-comment': 'error'
'@typescript-eslint/consistent-type-assertions': 'error'
'@typescript-eslint/explicit-member-accessibility':
- 'error'
- accessibility: 'no-public'
'@typescript-eslint/explicit-function-return-type':
- 'error'
- allowExpressions: true
"@typescript-eslint/no-array-constructor": "error"
"@typescript-eslint/no-empty-interface": "error"
"@typescript-eslint/no-explicit-any": "warn"
"@typescript-eslint/no-extraneous-class": "error"
"@typescript-eslint/no-for-in-array": "error"
"@typescript-eslint/no-inferrable-types": "error"
"@typescript-eslint/no-misused-new": "error"
"@typescript-eslint/no-namespace": "error"
"@typescript-eslint/no-non-null-assertion": "warn"
"@typescript-eslint/no-require-imports": "error"
"@typescript-eslint/no-unnecessary-qualifier": "error"
"@typescript-eslint/no-unnecessary-type-assertion": "error"
"@typescript-eslint/no-unused-vars":
- "error"
- argsIgnorePattern: "^_"
varsIgnorePattern: "^_"
"@typescript-eslint/no-useless-constructor": "error"
"@typescript-eslint/no-var-requires": "error"
"@typescript-eslint/prefer-for-of": "warn"
"@typescript-eslint/prefer-function-type": "warn"
"@typescript-eslint/prefer-includes": "error"
"@typescript-eslint/prefer-string-starts-ends-with": "error"
"@typescript-eslint/promise-function-async": "error"
"@typescript-eslint/require-array-sort-compare": "error"
"@typescript-eslint/restrict-plus-operands": "error"
"@typescript-eslint/space-before-function-paren": "off"
"@typescript-eslint/unbound-method": "error"
'@typescript-eslint/no-array-constructor': 'error'
'@typescript-eslint/no-empty-interface': 'error'
'@typescript-eslint/no-explicit-any': 'warn'
'@typescript-eslint/no-extraneous-class': 'error'
'@typescript-eslint/no-for-in-array': 'error'
'@typescript-eslint/no-inferrable-types': 'error'
'@typescript-eslint/no-misused-new': 'error'
'@typescript-eslint/no-namespace': 'error'
'@typescript-eslint/no-non-null-assertion': 'warn'
'@typescript-eslint/no-require-imports': 'error'
'@typescript-eslint/no-unnecessary-qualifier': 'error'
'@typescript-eslint/no-unnecessary-type-assertion': 'error'
'@typescript-eslint/no-unused-vars':
- 'error'
- argsIgnorePattern: '^_'
varsIgnorePattern: '^_'
'@typescript-eslint/no-useless-constructor': 'error'
'@typescript-eslint/no-var-requires': 'error'
'@typescript-eslint/prefer-for-of': 'warn'
'@typescript-eslint/prefer-function-type': 'warn'
'@typescript-eslint/prefer-includes': 'error'
'@typescript-eslint/prefer-string-starts-ends-with': 'error'
'@typescript-eslint/promise-function-async': 'error'
'@typescript-eslint/require-array-sort-compare': 'error'
'@typescript-eslint/restrict-plus-operands': 'error'
'@typescript-eslint/space-before-function-paren': 'off'
'@typescript-eslint/unbound-method': 'error'
2 changes: 1 addition & 1 deletion .github/workflows/check-dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
path: dist/
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ jobs:
if [ "$(cat .github/sample.feature)" != "${{ steps.test-action.outputs.feature }}" ]; then
echo "The output does not match the expected feature"
exit 1
fi
fi
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ jobs:

- name: Perform CodeQL Analysis
id: analyze
uses: github/codeql-action/analyze@v3
uses: github/codeql-action/analyze@v3
2 changes: 1 addition & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
"proseWrap": "always",
"htmlWhitespaceSensitivity": "css",
"endOfLine": "lf"
}
}
22 changes: 15 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,19 @@

<!-- Reference-Style link -->

[issues]: https://docs.github.com/en/issues/tracking-your-work-with-issues/creating-an-issue
[pull requests]: https://docs.github.com/en/desktop/contributing-and-collaborating-using-github-desktop/working-with-your-remote-repository-on-github-or-github-enterprise/creating-an-issue-or-pull-request
[issues]:
https://docs.github.com/en/issues/tracking-your-work-with-issues/creating-an-issue
[pull requests]:
https://docs.github.com/en/desktop/contributing-and-collaborating-using-github-desktop/working-with-your-remote-repository-on-github-or-github-enterprise/creating-an-issue-or-pull-request

# Gherkin feature extractor from GitHub issues

GitHub Action that processes Gherkin content from issues and turn them into a content that can be then saved into a file.
GitHub Action that processes Gherkin content from issues and turn them into a
content that can be then saved into a file.

It reads the issues from a repository and extracts the Gherkin content from them. The Gherkin content is then saved into a file. This expects the issue to contains a Gherkin content in the body of the issue, like the following:
It reads the issues from a repository and extracts the Gherkin content from
them. The Gherkin content is then saved into a file. This expects the issue to
contains a Gherkin content in the body of the issue, like the following:

```gherkin
Feature: As a user, I want to be able to login to the system
Expand All @@ -25,7 +30,8 @@ Feature: As a user, I want to be able to login to the system
Then the user is logged in
```

The action will extract the Gherkin content from the issue and provide it as a parameter. You can then save as a **feature** file.
The action will extract the Gherkin content from the issue and provide it as a
parameter. You can then save as a **feature** file.

# Usage

Expand All @@ -46,7 +52,8 @@ The action will extract the Gherkin content from the issue and provide it as a p
# Example, Current Repository
Runs when an issue is created. Extracts the Gherkin content from the issue and saves it to a file.
Runs when an issue is created. Extracts the Gherkin content from the issue and
saves it to a file.
```yaml
on:
Expand All @@ -69,7 +76,8 @@ jobs:
# Example, Current Repository but more verbose
Runs when an issue is created. Extracts the Gherkin content from the issue and saves it to a file.
Runs when an issue is created. Extracts the Gherkin content from the issue and
saves it to a file.
```yaml
on:
Expand Down
Loading

0 comments on commit cbbca36

Please sign in to comment.