Skip to content

Commit 542ad34

Browse files
authored
Merge pull request #106 from issue-ops/esm
Convert action to ESM
2 parents 0c4d856 + d60de6f commit 542ad34

37 files changed

+28744
-29581
lines changed

.eslintrc.yml

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
#############################
2+
## JavaScript Linter rules ##
3+
#############################
4+
5+
env:
6+
node: true
7+
es6: true
8+
jest: true
9+
10+
globals:
11+
Atomics: readonly
12+
SharedArrayBuffer: readonly
13+
14+
ignorePatterns:
15+
- coverage
16+
- dist
17+
- linter
18+
- node_modules
19+
20+
parser: '@typescript-eslint/parser'
21+
22+
parserOptions:
23+
ecmaVersion: 2023
24+
project:
25+
- tsconfig.eslint.json
26+
sourceType: module
27+
tsconfigRootDir: .
28+
29+
settings:
30+
import/resolver:
31+
typescript:
32+
alwaysTryTypes: true
33+
project: tsconfig.eslint.json
34+
35+
plugins:
36+
- import
37+
- jest
38+
- prettier
39+
- '@typescript-eslint'
40+
41+
extends:
42+
- eslint:recommended
43+
- plugin:@typescript-eslint/eslint-recommended
44+
- plugin:@typescript-eslint/recommended
45+
- plugin:github/recommended
46+
- plugin:jest/recommended
47+
- plugin:prettier/recommended
48+
49+
rules:
50+
camelcase: off
51+
eslint-comments/no-use: off
52+
eslint-comments/no-unused-disable: off
53+
i18n-text/no-en: off
54+
import/no-namespace: off
55+
no-console: off
56+
no-shadow: off
57+
no-unused-vars: off
58+
prettier/prettier: error

.gitattributes

+2
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
* text=auto eol=lf
2+
13
dist/** -diff linguist-generated=true

.github/linters/.checkov.yml

-3
This file was deleted.

.github/linters/.eslintrc.yml

-55
This file was deleted.

.github/linters/tsconfig.json

-9
This file was deleted.

.github/workflows/codeql.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@ on:
1010
schedule:
1111
- cron: '30 1 * * 4'
1212

13+
permissions:
14+
actions: read
15+
checks: write
16+
contents: read
17+
security-events: write
18+
1319
jobs:
1420
analyze:
1521
name: Analyze
1622
runs-on: ubuntu-latest
1723

18-
permissions:
19-
actions: read
20-
checks: write
21-
contents: read
22-
security-events: write
23-
2424
strategy:
2525
fail-fast: false
2626
matrix:

.github/workflows/continuous-delivery.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@ jobs:
3838

3939
- name: Create Release
4040
id: release
41-
uses: issue-ops/releaser@v1.0.0
41+
uses: issue-ops/releaser@v1
4242
with:
4343
tag: v${{ steps.tag.outputs.version }}
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Super Linter
1+
name: Lint Codebase
22

33
on:
44
push:
@@ -8,16 +8,18 @@ on:
88
branches:
99
- main
1010

11+
permissions:
12+
contents: read
13+
issues: write
14+
packages: read
15+
pull-requests: write
16+
statuses: write
17+
1118
jobs:
1219
lint:
1320
name: Lint Codebase
1421
runs-on: ubuntu-latest
1522

16-
permissions:
17-
contents: read
18-
packages: read
19-
statuses: write
20-
2123
steps:
2224
- name: Checkout
2325
id: checkout
@@ -36,14 +38,8 @@ jobs:
3638
id: install
3739
run: npm ci
3840

39-
- name: Super Linter
40-
id: super-linter
41-
uses: super-linter/super-linter/slim@v6
41+
- name: Lint Codebase
42+
id: lint
43+
uses: oxsecurity/megalinter/flavors/javascript@v7
4244
env:
43-
DEFAULT_BRANCH: main
44-
FILTER_REGEX_EXCLUDE: dist/**/*
4545
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46-
TYPESCRIPT_DEFAULT_STYLE: prettier
47-
VALIDATE_ALL_CODEBASE: false
48-
VALIDATE_JAVASCRIPT_STANDARD: false
49-
VALIDATE_JSCPD: false

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ Thumbs.db
2020

2121
# Extra
2222
tmp/
23+
linter/

.github/linters/.markdown-lint.yml .markdown-lint.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
###########################
2-
## Markdown Linter rules ##
3-
###########################
4-
51
MD003: false
62
MD004:
73
style: dash
4+
MD013:
5+
tables: false
86
MD026: false
97
MD029:
108
style: one

.mega-linter.yml

+142
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
# Mega-Linter Configuration File
2+
# https://megalinter.io/latest/config-file/
3+
4+
# Activates formatting and autofix
5+
APPLY_FIXES: none
6+
7+
# Flag to clear files from report folder before starting the linting process
8+
CLEAR_REPORT_FOLDER: true
9+
10+
DEFAULT_BRANCH: main
11+
12+
# List of disabled descriptors keys
13+
# https://megalinter.io/latest/config-activation/
14+
DISABLE:
15+
- COPYPASTE
16+
- JAVASCRIPT
17+
- SPELL
18+
19+
# List of disabled linters keys
20+
# https://megalinter.io/latest/config-activation/
21+
DISABLE_LINTERS:
22+
- MARKDOWN_MARKDOWN_TABLE_FORMATTER
23+
- TYPESCRIPT_STANDARD
24+
25+
# List of enabled but not blocking linters keys
26+
# https://megalinter.io/latest/config-activation/
27+
# DISABLE_ERRORS_LINTERS: []
28+
29+
# List of enabled descriptors keys
30+
# https://megalinter.io/latest/config-activation/
31+
# If you use ENABLE variable, all other linters will be disabled by default
32+
# ENABLE: []
33+
34+
# List of enabled linters keys
35+
# If you use ENABLE_LINTERS variable, all other linters will be disabled
36+
# ENABLE_LINTERS: []
37+
38+
# List of excluded directory basenames.
39+
EXCLUDED_DIRECTORIES:
40+
- .git
41+
- coverage
42+
- dist
43+
- megalinter-reports
44+
- node_modules
45+
- reports
46+
47+
# If set to true, MegaLinter fails if a linter or formatter has autofixed
48+
# sources, even if there are no errors
49+
FAIL_IF_UPDATED_SOURCES: false
50+
51+
# Upload reports to file.io
52+
FILEIO_REPORTER: false
53+
54+
# Provides suggestions about different MegaLinter flavors to use to improve
55+
# runtime performance
56+
FLAVOR_SUGGESTIONS: true
57+
58+
# Formatter errors will be reported as errors (and not warnings) if this
59+
# variable is set to false
60+
FORMATTERS_DISABLE_ERRORS: false
61+
62+
# Posts a comment on the pull request with linting results
63+
GITHUB_COMMENT_REPORTER: true
64+
65+
# Sets pull request status checks on GitHub
66+
GITHUB_STATUS_REPORTER: true
67+
68+
# If set to true, MegaLinter will skip files containing @generated marker but
69+
# without @not-generated marker (more info at https://generated.at)
70+
IGNORE_GENERATED_FILES: true
71+
72+
# If set to true, MegaLinter will skip files ignored by git using .gitignore
73+
IGNORE_GITIGNORED_FILES: true
74+
75+
# JavaScript default style to check/apply
76+
JAVASCRIPT_DEFAULT_STYLE: prettier
77+
78+
# Directory for all linter configuration rules
79+
# Can be a local folder or a remote URL
80+
# (ex: https://raw.githubusercontent.com/some_org/some_repo/mega-linter-rules)
81+
LINTER_RULES_PATH: .
82+
83+
# The file name for outputting logs. All output is sent to the log file
84+
# regardless of LOG_LEVEL
85+
LOG_FILE: linter.log
86+
87+
# How much output the script will generate to the console. One of INFO, DEBUG,
88+
# WARNING or ERROR.
89+
LOG_LEVEL: INFO
90+
91+
# Markdown default style to check/apply
92+
MARKDOWN_DEFAULT_STYLE: markdownlint
93+
94+
MARKDOWN_MARKDOWNLINT_FILTER_REGEX_EXCLUDE: __fixtures__
95+
96+
# Generate Markdown summary report
97+
MARKDOWN_SUMMARY_REPORTER: true
98+
99+
# Name of the Markdown summary report file
100+
MARKDOWN_SUMMARY_REPORTER_FILE_NAME: summary.md
101+
102+
# Process linters in parallel to improve overall MegaLinter performance. If
103+
# true, linters of same language or formats are grouped in the same parallel
104+
# process to avoid lock issues if fixing the same files
105+
PARALLEL: true
106+
107+
# All available cores are used by default. If there are too many, you need to
108+
# decrease the number of used cores in order to enhance performance
109+
# PARALLEL_PROCESS_NUMBER: 4
110+
111+
# Directory for generating report files
112+
# Set to none to not generate reports
113+
REPORT_OUTPUT_FOLDER: linter
114+
115+
# Set to simple to avoid external images in generated markdown
116+
REPORTERS_MARKDOWN_TYPE: advanced
117+
118+
# Additional list of secured environment variables to hide when calling linters.
119+
# SECURED_ENV_VARIABLES: []
120+
121+
# Displays elapsed time in reports
122+
SHOW_ELAPSED_TIME: true
123+
124+
# Displays all disabled linters mega-linter could have run
125+
SHOW_SKIPPED_LINTERS: false
126+
127+
# Typescript default style to check/apply
128+
TYPESCRIPT_DEFAULT_STYLE: prettier
129+
130+
# Will parse the entire repository and find all files to validate
131+
# When set to false, only new or edited files will be parsed for validation
132+
VALIDATE_ALL_CODEBASE: true
133+
134+
# Per-linter configuration
135+
JAVASCRIPT_ES_CONFIG_FILE: .eslintrc.yml
136+
JAVASCRIPT_PRETTIER_CONFIG_FILE: prettierrc.yml
137+
JSON_PRETTIER_CONFIG_FILE: prettierrc.yml
138+
MARKDOWN_MARKDOWNLINT_CONFIG_FILE: .markdownlint.yml
139+
TYPESCRIPT_ES_CONFIG_FILE: .eslintrc.yml
140+
TYPESCRIPT_PRETTIER_CONFIG_FILE: .prettierrc.yml
141+
YAML_PRETTIER_CONFIG_FILE: .prettierrc.yml
142+
YAML_YAMLLINT_CONFIG_FILE: .yaml-lint.yml
File renamed without changes.

README.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,15 @@
44
[![CodeQL](https://github.com/issue-ops/releaser/actions/workflows/codeql.yml/badge.svg)](https://github.com/issue-ops/releaser/actions/workflows/codeql.yml)
55
[![Continuous Integration](https://github.com/issue-ops/releaser/actions/workflows/continuous-integration.yml/badge.svg)](https://github.com/issue-ops/releaser/actions/workflows/continuous-integration.yml)
66
[![Continuous Delivery](https://github.com/issue-ops/releaser/actions/workflows/continuous-delivery.yml/badge.svg)](https://github.com/issue-ops/releaser/actions/workflows/continuous-delivery.yml)
7-
[![Super Linter](https://github.com/issue-ops/releaser/actions/workflows/super-linter.yml/badge.svg)](https://github.com/issue-ops/releaser/actions/workflows/super-linter.yml)
7+
[![Linter](https://github.com/issue-ops/releaser/actions/workflows/super-linter.yml/badge.svg)](https://github.com/issue-ops/releaser/actions/workflows/linter.yml)
88
[![Code Coverage](./badges/coverage.svg)](./badges/coverage.svg)
99

1010
Handle releases for GitHub repositories
1111

12+
> [!IMPORTANT]
13+
>
14+
> As of version `v2.0.0`, this action has been converted to ESM.
15+
1216
## About
1317

1418
This action is designed to be used in conjunction with

0 commit comments

Comments
 (0)