Skip to content

Commit 2c61ec8

Browse files
authored
Bump @types/node from 20.14.2 to 20.14.9 (#122)
* Bump @types/node from 20.14.2 to 20.14.9 * Rename hook * Cleanup
1 parent ba59115 commit 2c61ec8

File tree

11 files changed

+470
-1184
lines changed

11 files changed

+470
-1184
lines changed

.eslintignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

.eslintrc.json

Lines changed: 0 additions & 32 deletions
This file was deleted.

.github/workflows/linting.yml

Lines changed: 4 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -8,50 +8,11 @@ on: # yamllint disable-line rule:truthy
88
- main
99

1010
jobs:
11-
eslint:
12-
name: ESLint
13-
runs-on: ubuntu-latest
14-
steps:
15-
- name: Checkout ${{ github.repository }}
16-
uses: actions/checkout@v4
17-
- name: Setup node
18-
uses: actions/setup-node@v4
19-
with:
20-
node-version-file: ".tool-versions"
21-
- name: Cache yarn dependencies
22-
id: yarn-cache
23-
uses: actions/cache@v4
24-
with:
25-
path: |
26-
.yarn/cache
27-
node_modules
28-
key: "${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/.yarnrc.yml') }}"
29-
restore-keys: |
30-
${{ runner.os }}-yarn-
31-
- name: Compile
32-
if: ${{ steps.yarn-cache.outputs.cache-hit != 'true' }}
33-
run: yarn install
34-
- name: Run ESLint
35-
uses: sibiraj-s/action-eslint@v3
36-
with:
37-
all-files: "true"
38-
ignore-patterns: |
39-
.github
40-
.yarn
41-
coverage
42-
dist
43-
node_modules
44-
eslint-args: "-o eslint-results.sarif -f ${{ github.workspace }}/node_modules/@microsoft/eslint-formatter-sarif/sarif.js"
45-
extensions: "js,jsx,ts,tsx"
46-
annotations: true
47-
- name: Upload to GHAS
48-
if: always()
49-
uses: github/codeql-action/upload-sarif@v3
50-
with:
51-
category: "eslint"
52-
sarif_file: "eslint-results.sarif"
11+
js-lint:
12+
name: JS Lint
13+
uses: fabasoad/reusable-workflows/.github/workflows/wf-js-lint.yml@main
5314
pre-commit:
5415
name: Pre-commit
5516
uses: fabasoad/reusable-workflows/.github/workflows/wf-pre-commit.yml@main
5617
with:
57-
skip-hooks: "audit, build, eslint, test, snyk-test"
18+
skip-hooks: "audit, build, lint, test, snyk-test, grype-dir"

.gitleaksignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
.yarn/releases/yarn-4.3.0.cjs:aws-access-token:149
2-
.yarn/releases/yarn-4.3.0.cjs:generic-api-key:567
1+
.yarn/releases/yarn-4.3.1.cjs:aws-access-token:149
2+
.yarn/releases/yarn-4.3.1.cjs:generic-api-key:567

.pre-commit-config.yaml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ repos:
1313
pass_filenames: false
1414
verbose: true
1515
stages: ["push"]
16-
- id: eslint
16+
- id: lint
1717
name: Lint
1818
entry: yarn run lint
1919
language: system
@@ -48,6 +48,15 @@ repos:
4848
hooks:
4949
- id: snyk-test
5050
stages: ["push"]
51+
- repo: https://github.com/fabasoad/pre-commit-grype
52+
rev: v0.3.1
53+
hooks:
54+
- id: grype-dir
55+
args:
56+
- --hook-args=--log-level debug
57+
- --grype-args=--fail-on low
58+
- --grype-args=--by-cve
59+
stages: ["push"]
5160
# Markdown
5261
- repo: https://github.com/igorshubovych/markdownlint-cli
5362
rev: v0.41.0
@@ -66,7 +75,7 @@ repos:
6675
hooks:
6776
- id: actionlint
6877
args: ["-pyflakes="]
69-
stages: ["push"]
78+
stages: ["commit"]
7079
# Other
7180
- repo: https://github.com/pre-commit/pre-commit-hooks
7281
rev: v4.6.0

.yarn/releases/yarn-4.3.0.cjs renamed to .yarn/releases/yarn-4.3.1.cjs

Lines changed: 217 additions & 217 deletions
Large diffs are not rendered by default.

.yarnrc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
nodeLinker: node-modules
22

3-
yarnPath: .yarn/releases/yarn-4.3.0.cjs
3+
yarnPath: .yarn/releases/yarn-4.3.1.cjs

biome.json

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
{
2+
"linter": {
3+
"enabled": true,
4+
"rules": {
5+
"recommended": false,
6+
"a11y": { "noBlankTarget": "error" },
7+
"complexity": {
8+
"noExtraBooleanCast": "error",
9+
"noMultipleSpacesInRegularExpressionLiterals": "error",
10+
"noUselessCatch": "error",
11+
"noWith": "error"
12+
},
13+
"correctness": {
14+
"noChildrenProp": "error",
15+
"noConstAssign": "error",
16+
"noConstantCondition": "error",
17+
"noEmptyCharacterClassInRegex": "error",
18+
"noEmptyPattern": "error",
19+
"noGlobalObjectCalls": "error",
20+
"noInnerDeclarations": "error",
21+
"noInvalidConstructorSuper": "error",
22+
"noNewSymbol": "error",
23+
"noNonoctalDecimalEscape": "error",
24+
"noPrecisionLoss": "error",
25+
"noSelfAssign": "error",
26+
"noSetterReturn": "error",
27+
"noSwitchDeclarations": "error",
28+
"noUndeclaredVariables": "error",
29+
"noUnreachable": "error",
30+
"noUnreachableSuper": "error",
31+
"noUnsafeFinally": "error",
32+
"noUnsafeOptionalChaining": "error",
33+
"noUnusedLabels": "error",
34+
"noUnusedVariables": "off",
35+
"useIsNan": "error",
36+
"useJsxKeyInIterable": "error",
37+
"useValidForDirection": "error",
38+
"useYield": "error"
39+
},
40+
"security": { "noDangerouslySetInnerHtml": "error" },
41+
"style": {
42+
"noArguments": "error",
43+
"noVar": "error",
44+
"useBlockStatements": "error",
45+
"useConst": "error",
46+
"useSingleVarDeclarator": "error"
47+
},
48+
"suspicious": {
49+
"noAsyncPromiseExecutor": "error",
50+
"noCatchAssign": "error",
51+
"noClassAssign": "error",
52+
"noCommentText": "error",
53+
"noCompareNegZero": "error",
54+
"noControlCharactersInRegex": "error",
55+
"noDebugger": "error",
56+
"noDuplicateCase": "error",
57+
"noDuplicateClassMembers": "error",
58+
"noDuplicateJsxProps": "error",
59+
"noDuplicateObjectKeys": "error",
60+
"noDuplicateParameters": "error",
61+
"noEmptyBlockStatements": "error",
62+
"noFallthroughSwitchClause": "error",
63+
"noFunctionAssign": "error",
64+
"noGlobalAssign": "error",
65+
"noImportAssign": "error",
66+
"noMisleadingCharacterClass": "error",
67+
"noPrototypeBuiltins": "error",
68+
"noRedeclare": "error",
69+
"noShadowRestrictedNames": "error",
70+
"noUnsafeNegation": "error",
71+
"useGetterReturn": "error",
72+
"useValidTypeof": "error"
73+
}
74+
},
75+
"ignore": ["dist/**"]
76+
},
77+
"javascript": {
78+
"globals": ["Atomics", "SharedArrayBuffer", "jest", "afterEach", "beforeAll", "beforeEach", "expect", "test", "describe"]
79+
},
80+
"overrides": [{ "include": ["**/*.spec.ts", "**/*.spec.tsx"] }]
81+
}

package.json

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nsfw-detection-action",
3-
"version": "2.0.3",
3+
"version": "2.0.4",
44
"description": "This GitHub action detects nsfw content in committed files.",
55
"main": "dist/index.js",
66
"repository": {
@@ -9,7 +9,7 @@
99
},
1010
"scripts": {
1111
"build": "ncc build -m src/index.ts",
12-
"lint": "eslint --ext ts src",
12+
"lint": "biome lint --write src",
1313
"test": "jest --config=jest.config.json --coverage"
1414
},
1515
"keywords": [
@@ -25,22 +25,18 @@
2525
"winston": "3.13.0"
2626
},
2727
"devDependencies": {
28-
"@microsoft/eslint-formatter-sarif": "3.1.0",
28+
"@biomejs/biome": "1.8.3",
2929
"@octokit/types": "12.6.0",
3030
"@types/chai": "4.3.16",
3131
"@types/glob": "8.1.0",
3232
"@types/jest": "29.5.12",
33-
"@types/node": "20.14.2",
34-
"@typescript-eslint/eslint-plugin": "7.13.0",
35-
"@typescript-eslint/parser": "7.13.0",
33+
"@types/node": "20.14.9",
3634
"@vercel/ncc": "0.38.1",
37-
"eslint": "8.57.0",
38-
"eslint-config-google": "0.14.0",
3935
"jest": "29.7.0",
4036
"jest-circus": "29.7.0",
4137
"mocha-param": "2.0.1",
4238
"ts-jest": "29.1.5",
43-
"typescript": "5.4.5"
39+
"typescript": "5.5.2"
4440
},
45-
"packageManager": "[email protected].0"
41+
"packageManager": "[email protected].1"
4642
}

src/__tests__/translation/NsfwDetectionProviderFactory.spec.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ describe(NsfwDetectionProviderFactory.name, () => {
3434
paramName: 'sightengine'
3535
}
3636
]
37-
itParam('should return ${value.className} instance', fixture,
38-
(value: NsfwDetectionProviderFactorySpecFixture) => {
37+
test.each(fixture)('should return $className instance',
38+
({ className, paramName }: NsfwDetectionProviderFactorySpecFixture) => {
3939
const provider: INsfwDetectionProvider =
40-
NsfwDetectionProviderFactory.getProvider(value.paramName)
41-
expect(provider.constructor.name).toBe(value.className)
40+
NsfwDetectionProviderFactory.getProvider(paramName)
41+
expect(provider.constructor.name).toBe(className)
4242
})
43-
it('should throw error', () => {
43+
test('should throw error', () => {
4444
const name = 'randomstring'
4545
expect(() => NsfwDetectionProviderFactory.getProvider(name))
46-
.toThrowError(`${name} provider is not supported`)
46+
.toThrow(`${name} provider is not supported`)
4747
});
4848
})

0 commit comments

Comments
 (0)