Skip to content
Merged
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
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

54 changes: 0 additions & 54 deletions .eslintrc.json

This file was deleted.

5 changes: 1 addition & 4 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base",
":automergeMinor"
],
"extends": ["config:base", ":automergeMinor"],
"labels": ["dependencies"],
"vulnerabilityAlerts": {
"labels": ["security"]
Expand Down
10 changes: 5 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

## 1.1.3

- fix: update `actions/checkout` step to `v4`
- fix: actualize `CHANGELOG.md`
- fix: update `actions/checkout` step to `v4`
- fix: actualize `CHANGELOG.md`

## 1.1.1

- fix: increase timeout to 30 seconds
- fix: increase timeout to 30 seconds

## 1.1.0

- feat: update dependencies
- feat: update dependencies

## 1.0.0

- feat: update action to use NodeJS 20
- feat: update action to use NodeJS 20
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ jobs:
- add files changed list
- add workflow run duration

Feel free to create issue if you have an idea in mind
Feel free to create issue if you have an idea in mind
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ runs:
main: dist/main/index.js
branding:
icon: truck
color: green
color: green
360 changes: 208 additions & 152 deletions dist/main/index.js

Large diffs are not rendered by default.

108 changes: 108 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
// Flat config migration from .eslintrc.json (extended plugin:github/recommended)
// to align with actions/typescript-action template structure.
// See: https://github.com/actions/typescript-action/blob/main/eslint.config.mjs

import {FlatCompat} from '@eslint/eslintrc'
import js from '@eslint/js'
import typescriptEslint from '@typescript-eslint/eslint-plugin'
import tsParser from '@typescript-eslint/parser'
import jest from 'eslint-plugin-jest'
import prettier from 'eslint-plugin-prettier'
import globals from 'globals'

const compat = new FlatCompat({
baseDirectory: import.meta.dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
})

export default [
{
ignores: [
'**/coverage',
'**/dist',
'**/lib',
'**/node_modules',
'package-lock.json'
]
},
...compat.extends(
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:jest/recommended',
'plugin:prettier/recommended'
),
{
files: ['src/**/*.ts', 'src/__tests__/**/*.ts'],
plugins: {
jest,
prettier,
'@typescript-eslint': typescriptEslint
},

languageOptions: {
globals: {
...globals.node,
...globals.jest,
Atomics: 'readonly',
SharedArrayBuffer: 'readonly'
},

parser: tsParser,
ecmaVersion: 2023,
sourceType: 'module'
},

settings: {
'import/resolver': {
typescript: {
alwaysTryTypes: true,
project: 'tsconfig.json'
}
}
},

rules: {
camelcase: 'off',
'eslint-comments/no-use': 'off',
'import/no-namespace': 'off',
'no-console': 'off',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-require-imports': 'error',
'@typescript-eslint/consistent-type-assertions': 'error',
'@typescript-eslint/explicit-member-accessibility': [
'error',
{accessibility: 'no-public'}
],
'@typescript-eslint/no-empty-interface': 'error',
'@typescript-eslint/no-extraneous-class': '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-useless-constructor': 'error',
'@typescript-eslint/prefer-for-of': 'warn',
'@typescript-eslint/prefer-function-type': 'warn',
'@typescript-eslint/array-type': 'error',
'@typescript-eslint/ban-ts-comment': 'error',
'@typescript-eslint/no-array-constructor': 'error',
'prettier/prettier': 'error',
semi: 'off'
}
},
{
// Config files at the repo root are not part of tsconfig.json's include.
// Lint them with the base rules but without type-aware project settings.
files: ['*.js', '*.mjs', '*.cjs'],
languageOptions: {
globals: {
...globals.node
},
ecmaVersion: 2023,
sourceType: 'module'
}
}
]
16 changes: 9 additions & 7 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
// Jest 30 configuration. Uses ts-jest preset; jest-circus is the default
// test runner since Jest 27, so the explicit `testRunner` line was dropped.
// Stays CommonJS (`module.exports`) because package.json has no `"type": "module"`.

/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
clearMocks: true,
moduleFileExtensions: ['js', 'ts'],
preset: 'ts-jest',
moduleFileExtensions: ['ts', 'js'],
testEnvironment: 'node',
testMatch: ['**/*.test.ts'],
testRunner: 'jest-circus/runner',
transform: {
'^.+\\.ts$': 'ts-jest'
},
testMatch: ['**/__tests__/**/*.test.ts'],
verbose: true
}
}
Loading