Skip to content
This repository was archived by the owner on Dec 19, 2025. It is now read-only.

Commit f23c530

Browse files
committed
Quality improvements
1 parent 01874c2 commit f23c530

Some content is hidden

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

41 files changed

+29968
-29930
lines changed

.codacy.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
exclude_paths:
3-
- '.github/**/*'
4-
- '.vscode/**/*'
5-
- 'art/**/*'
6-
- 'packages/*/test/**'
7-
- 'docs/*.js'
3+
- ".github/**/*"
4+
- ".vscode/**/*"
5+
- "art/**/*"
6+
- "packages/*/test/**"
7+
- "docs/*.js"

.ecrc.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"Exclude": [
3+
"\\.md$"
4+
]
5+
}

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ insert_final_newline = true
99
tab_width = 4
1010
trim_trailing_whitespace = true
1111

12-
[.github/{actions,workflows}/*.yml]
12+
[*.yml]
1313
indent_size = 2
1414
tab_width = 2

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
**/dist/**/*.js
2+
**/docs/*.js

.eslintrc.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
"@typescript-eslint"
99
],
1010
"root": true,
11-
"ignorePatterns": [
12-
"**/dist/**/*.js"
13-
],
1411
"rules": {
1512
"quotes": [
1613
"error",
@@ -22,6 +19,7 @@
2219
{
2320
"argsIgnorePattern": "^_"
2421
}
25-
]
22+
],
23+
"@typescript-eslint/ban-ts-comment": "off"
2624
}
2725
}

.github/actions/common/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ runs:
1616
id: npm-cache-dir
1717
shell: bash
1818
run: |
19-
echo "npm_cache_dir=$(npm config get cache)" >> $GITHUB_ENV
19+
echo "npm_cache_dir=$(npm config get cache)" >> $GITHUB_ENV
2020
- name: Cache root node_modules
2121
id: cache-npm-root
2222
uses: actions/cache@v3

.github/workflows/ci.yml

Lines changed: 55 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
name: CI
22

3+
# yamllint disable rule:truthy
34
on:
45
push:
56
branches:
@@ -12,6 +13,7 @@ on:
1213
branches:
1314
- main
1415
workflow_dispatch:
16+
# yamllint enable rule:truthy
1517

1618
jobs:
1719
build:
@@ -64,21 +66,16 @@ jobs:
6466
uses: actions/checkout@v3
6567
with:
6668
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
67-
fetch-depth: 0 # If you use VALIDATE_ALL_CODEBASE = true, you can remove this line to improve performances
69+
fetch-depth: 0
6870

6971
# MegaLinter
7072
- name: MegaLinter
7173
id: ml
72-
# You can override MegaLinter flavor used to have faster performances
73-
# More info at https://megalinter.io/flavors/
7474
uses: oxsecurity/megalinter/flavors/javascript@v6
7575
env:
76-
# All available variables are described in documentation
77-
# https://megalinter.io/configuration/
78-
VALIDATE_ALL_CODEBASE: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} # Validates all source when push on main, else just the git diff with main. Override with true if you always want to lint all sources
76+
VALIDATE_ALL_CODEBASE: |
77+
${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
7978
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
80-
# ADD YOUR CUSTOM ENV VARIABLES HERE OR DEFINE THEM IN A FILE .mega-linter.yml AT THE ROOT OF YOUR REPOSITORY
81-
# DISABLE: COPYPASTE,SPELL # Uncomment to disable copy-paste and spell checks
8279

8380
# Upload MegaLinter artifacts
8481
- name: Archive production artifacts
@@ -90,28 +87,72 @@ jobs:
9087
megalinter-reports
9188
mega-linter.log
9289
93-
# Create pull request if applicable (for now works only on PR from same repository, not from forks)
90+
# Create pull request if applicable
91+
# (for now works only on PR from same repository, not from forks)
9492
- name: Create Pull Request with applied fixes
9593
id: cpr
96-
if: steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'pull_request' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository)
94+
if: |
95+
steps.ml.outputs.has_updated_sources == 1 &&
96+
(
97+
env.APPLY_FIXES_EVENT == 'all' ||
98+
env.APPLY_FIXES_EVENT == github.event_name
99+
) &&
100+
env.APPLY_FIXES_MODE == 'pull_request' &&
101+
(
102+
github.event_name == 'push' ||
103+
github.event.pull_request.head.repo.full_name == github.repository
104+
)
97105
uses: peter-evans/create-pull-request@v4
98106
with:
99107
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
100108
commit-message: "[MegaLinter] Apply linters automatic fixes"
101109
title: "[MegaLinter] Apply linters automatic fixes"
102110
labels: bot
103111
- name: Create PR output
104-
if: steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'pull_request' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository)
112+
if: |
113+
steps.ml.outputs.has_updated_sources == 1 &&
114+
(
115+
env.APPLY_FIXES_EVENT == 'all' ||
116+
env.APPLY_FIXES_EVENT == github.event_name
117+
) &&
118+
env.APPLY_FIXES_MODE == 'pull_request' &&
119+
(
120+
github.event_name == 'push' ||
121+
github.event.pull_request.head.repo.full_name == github.repository
122+
)
105123
run: |
106124
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
107125
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
108126
109-
# Push new commit if applicable (for now works only on PR from same repository, not from forks)
127+
# Push new commit if applicable
128+
# (for now works only on PR from same repository, not from forks)
110129
- name: Prepare commit
111-
if: steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'commit' && github.ref != 'refs/heads/main' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository)
130+
if: |
131+
steps.ml.outputs.has_updated_sources == 1 &&
132+
(
133+
env.APPLY_FIXES_EVENT == 'all' ||
134+
env.APPLY_FIXES_EVENT == github.event_name
135+
) &&
136+
env.APPLY_FIXES_MODE == 'commit' &&
137+
github.ref != 'refs/heads/main' &&
138+
(
139+
github.event_name == 'push' ||
140+
github.event.pull_request.head.repo.full_name == github.repository
141+
)
112142
run: sudo chown -Rc $UID .git/
113143
- name: Commit and push applied linter fixes
114-
if: steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'commit' && github.ref != 'refs/heads/main' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository)
144+
if: |
145+
steps.ml.outputs.has_updated_sources == 1 &&
146+
(
147+
env.APPLY_FIXES_EVENT == 'all' ||
148+
env.APPLY_FIXES_EVENT == github.event_name
149+
) &&
150+
env.APPLY_FIXES_MODE == 'commit' &&
151+
github.ref != 'refs/heads/main' &&
152+
(
153+
github.event_name == 'push' ||
154+
github.event.pull_request.head.repo.full_name == github.repository
155+
)
115156
uses: stefanzweifel/git-auto-commit-action@v4
116157
with:
117158
branch: ${{ github.event.pull_request.head.ref || github.head_ref || github.ref }}

.github/workflows/docs.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
name: Docs
22

3+
# yamllint disable rule:truthy
34
on:
45
push:
56
branches:
67
- main
78
paths:
89
- "docs/**"
910
workflow_dispatch:
11+
# yamllint enable rule:truthy
1012

1113
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
1214
permissions:
@@ -56,7 +58,7 @@ jobs:
5658
- name: Upload artifact
5759
uses: actions/upload-pages-artifact@v1
5860
with:
59-
path: './docs/build'
61+
path: "./docs/build"
6062
- name: Deploy to GitHub Pages
6163
id: deployment
6264
uses: actions/deploy-pages@v1

.jsonlintrc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
comments: true
2+
trailing-commas: true

.mega-linter.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,17 @@ DISABLE:
22
- SPELL
33

44
DISABLE_LINTERS:
5+
- COPYPASTE_JSCPD
6+
- JAVASCRIPT_STANDARD
7+
- JSON_NPM_PACKAGE_JSON_LINT
8+
- MARKDOWN_MARKDOWN_LINK_CHECK
59
- REPOSITORY_DEVSKIM
610
- REPOSITORY_TRIVY
11+
- TYPESCRIPT_STANDARD
12+
13+
FILTER_REGEX_EXCLUDE: (.xcf)$
14+
15+
CSS_STYLELINT_CONFIG_FILE: .stylelintrc.yml
16+
EDITORCONFIG_EDITORCONFIG_CHECKER_CONFIG_FILE: .ecrc.json
17+
JSON_JSONLINT_CONFIG_FILE: .jsonlintrc.yml
18+
JSX_ESLINT_CONFIG_FILE: .eslintrc.json

0 commit comments

Comments
 (0)