Skip to content

Commit f3a580f

Browse files
authored
Merge pull request #66 from issue-ops/esm
Convert to ESM
2 parents 3acc5ac + c99ad6a commit f3a580f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+18377
-18588
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

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# vscode
22
.vscode
3+
.env
34

45
# Dependency directory
56
node_modules/
@@ -17,7 +18,7 @@ reports
1718
# OS metadata
1819
.DS_Store
1920
Thumbs.db
20-
.env
2121

2222
# Extra
2323
tmp/
24+
linter/
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
1-
###########################
2-
## Markdown Linter rules ##
3-
###########################
4-
1+
MD003: false
52
MD004:
63
style: dash
7-
4+
MD013:
5+
tables: false
86
MD026: false
9-
107
MD029:
118
style: one
12-
139
MD033: false
14-
1510
MD034: false
16-
1711
MD036: false
12+
MD041: false

.mega-linter.yml

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

.prettierignore

+1
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ node_modules/
1010
*.scss
1111
dist/
1212
coverage/
13+
fixtures/

0 commit comments

Comments
 (0)