Skip to content

Commit

Permalink
Added packages
Browse files Browse the repository at this point in the history
  • Loading branch information
DE7924 committed Dec 6, 2024
1 parent 72c560b commit e0911cf
Show file tree
Hide file tree
Showing 16 changed files with 34,782 additions and 28,138 deletions.
72 changes: 36 additions & 36 deletions .github/linters/.eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,24 @@ globals:
SharedArrayBuffer: readonly

ignorePatterns:
- '!.*'
- '**/node_modules/.*'
- '**/dist/.*'
- '**/coverage/.*'
- '*.json'
- "!.*"
- "**/node_modules/.*"
- "**/dist/.*"
- "**/coverage/.*"
- "*.json"

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

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

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

extends:
- eslint:recommended
Expand All @@ -34,31 +34,31 @@ extends:

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',
'semi': 'off',
'@typescript-eslint/array-type': '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-empty-interface': 'error',
'@typescript-eslint/no-extraneous-class': 'error',
'@typescript-eslint/no-inferrable-types': 'error',
'@typescript-eslint/no-non-null-assertion': 'warn',
'@typescript-eslint/no-unnecessary-qualifier': 'error',
'@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/space-before-function-paren': 'off'
"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",
"semi": "off",
"@typescript-eslint/array-type": "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-empty-interface": "error",
"@typescript-eslint/no-extraneous-class": "error",
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-non-null-assertion": "warn",
"@typescript-eslint/no-unnecessary-qualifier": "error",
"@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/space-before-function-paren": "off",
}
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
branches:
- main
schedule:
- cron: '31 7 * * 3'
- cron: "31 7 * * 3"

permissions:
actions: read
Expand Down
6 changes: 3 additions & 3 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
dist/
node_modules/
coverage/
# Ignore artifacts:
build
coverage
1 change: 1 addition & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,14 @@ There are a few things to keep in mind when writing your action code:
In `main.ts`, you will see that the action is run in an `async` function.

```javascript
import * as core from '@actions/core'
import * as core from "@actions/core";
//...

async function run() {
try {
//...
} catch (error) {
core.setFailed(error.message)
core.setFailed(error.message);
}
}
```
Expand Down
16 changes: 8 additions & 8 deletions __tests__/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
* Unit tests for the action's entrypoint, src/index.ts
*/

import * as main from '../src/main'
import * as main from "../src/main";

// Mock the action's entrypoint
const runMock = jest.spyOn(main, 'run').mockImplementation()
const runMock = jest.spyOn(main, "run").mockImplementation();

describe('index', () => {
it('calls run when imported', () => {
describe("index", () => {
it("calls run when imported", () => {
// eslint-disable-next-line @typescript-eslint/no-require-imports
require('../src/index')
require("../src/index");

expect(runMock).toHaveBeenCalled()
})
})
expect(runMock).toHaveBeenCalled();
});
});
40 changes: 20 additions & 20 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,54 +1,54 @@
name: 'Web Components Code Quality'
name: "Web Components Code Quality"
description:
'This action is designed to format and test Web Component repositories on pull
requests. It helps ensure that your code meets the required quality standards.'
author: 'Zebra Technologies'
"This action is designed to format and test Web Component repositories on pull
requests. It helps ensure that your code meets the required quality standards."
author: "Zebra Technologies"

# Add your action's branding here. This will appear on the GitHub Marketplace.
branding:
icon: compass
color: 'blue'
color: "blue"

# Define your inputs here.
inputs:
token:
description: 'Token used for pushing fixes and commenting on PRs'
description: "Token used for pushing fixes and commenting on PRs"
required: true

working-directory:
description: 'The working directory'
description: "The working directory"
required: false
default: '.'
default: "."

run-static-analysis:
description: 'Whether to run static analysis'
description: "Whether to run static analysis"
required: false
default: 'true'
default: "true"

run-code-formatting:
description: 'Whether to run code formatting'
description: "Whether to run code formatting"
required: false
default: 'true'
default: "true"

run-tests:
description: 'Whether to run tests'
description: "Whether to run tests"
required: false
default: 'true'
default: "true"

run-coverage:
description: 'Whether to run coverage'
description: "Whether to run coverage"
required: false
default: 'true'
default: "true"

create-comment:
description: 'Whether to create a comment on the PR'
description: "Whether to create a comment on the PR"
required: false
default: 'true'
default: "true"

coverage-pass-score:
description: 'The minimum coverage score required to pass'
description: "The minimum coverage score required to pass"
required: false
default: '80'
default: "80"

# Define your outputs here.
# outputs:
Expand Down
Loading

0 comments on commit e0911cf

Please sign in to comment.