Skip to content

Commit 239b59c

Browse files
authored
chore: Use Prettier for code formatting (#1312)
Signed-off-by: Dominik Jelinek <[email protected]>
1 parent 2000e03 commit 239b59c

File tree

235 files changed

+18456
-18280
lines changed

Some content is hidden

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

235 files changed

+18456
-18280
lines changed

.eslintrc.json

Lines changed: 52 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,54 @@
11
{
2-
"root": true, // this is root configuration for project
3-
"parser": "@typescript-eslint/parser",
4-
"parserOptions": {
5-
"ecmaVersion": 2022,
6-
"sourceType": "module",
7-
"project": "./tsconfig.json",
8-
"ecmaFeatures": {
9-
"impliedStrict": true
10-
}
11-
},
12-
"env": {
13-
"browser": true,
14-
"es2022": true,
15-
"mocha": true
16-
},
17-
"extends": [
18-
"eslint:recommended",
19-
"plugin:@typescript-eslint/recommended"
20-
],
21-
"plugins": [
22-
"@typescript-eslint",
23-
"@stylistic"
24-
],
25-
"rules": {
26-
"@typescript-eslint/no-var-requires": "off", // allows require statements outside of imports
27-
"@typescript-eslint/no-floating-promises": "warn",
28-
"no-unused-expressions": "off",
29-
"@typescript-eslint/no-unused-expressions": "off",
30-
"@typescript-eslint/no-unused-vars": "warn",
31-
"@typescript-eslint/no-namespace": "off",
32-
"@typescript-eslint/no-explicit-any": "off",
33-
"@typescript-eslint/no-this-alias": "off",
34-
"@typescript-eslint/member-delimiter-style": [
35-
"warn",
36-
{
37-
"multiline": {
38-
"delimiter": "semi",
39-
"requireLast": true
40-
},
41-
"singleline": {
42-
"delimiter": "semi",
43-
"requireLast": false
44-
}
45-
}
46-
],
47-
"@typescript-eslint/naming-convention": [
48-
"error",
49-
{
50-
"selector": "variable",
51-
"format": [
52-
"camelCase",
53-
"PascalCase",
54-
"UPPER_CASE"
55-
]
56-
}
57-
],
58-
"@stylistic/semi": "warn",
59-
"curly": "warn",
60-
"eqeqeq": [
61-
"warn",
62-
"always"
63-
],
64-
"no-redeclare": "warn",
65-
"no-throw-literal": "warn"
2+
"root": true, // this is root configuration for project
3+
"parser": "@typescript-eslint/parser",
4+
"parserOptions": {
5+
"ecmaVersion": 2022,
6+
"sourceType": "module",
7+
"project": "./tsconfig.json",
8+
"ecmaFeatures": {
9+
"impliedStrict": true
6610
}
67-
}
11+
},
12+
"env": {
13+
"browser": true,
14+
"es2022": true,
15+
"mocha": true
16+
},
17+
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
18+
"plugins": ["@typescript-eslint", "@stylistic"],
19+
"rules": {
20+
"@typescript-eslint/no-var-requires": "off", // allows require statements outside of imports
21+
"@typescript-eslint/no-floating-promises": "warn",
22+
"no-unused-expressions": "off",
23+
"@typescript-eslint/no-unused-expressions": "off",
24+
"@typescript-eslint/no-unused-vars": "warn",
25+
"@typescript-eslint/no-namespace": "off",
26+
"@typescript-eslint/no-explicit-any": "off",
27+
"@typescript-eslint/no-this-alias": "off",
28+
"@typescript-eslint/member-delimiter-style": [
29+
"warn",
30+
{
31+
"multiline": {
32+
"delimiter": "semi",
33+
"requireLast": true
34+
},
35+
"singleline": {
36+
"delimiter": "semi",
37+
"requireLast": false
38+
}
39+
}
40+
],
41+
"@typescript-eslint/naming-convention": [
42+
"error",
43+
{
44+
"selector": "variable",
45+
"format": ["camelCase", "PascalCase", "UPPER_CASE"]
46+
}
47+
],
48+
"@stylistic/semi": "warn",
49+
"curly": "warn",
50+
"eqeqeq": ["warn", "always"],
51+
"no-redeclare": "warn",
52+
"no-throw-literal": "warn"
53+
}
54+
}

.github/ISSUE_TEMPLATE/bug-reports.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: 🚫 Bug Report
22
description: If something is not working properly
33
title: "[🚫 Bug] "
4-
labels: [ bug, new-issue ]
4+
labels: [bug, new-issue]
55
body:
66
- type: markdown
77
attributes:

.github/ISSUE_TEMPLATE/feature-requests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: 🚀 Feature Request
22
description: If something is missing or could be improved
33
title: "[🚀 Request] "
4-
labels: [ enhancement, new-issue ]
4+
labels: [enhancement, new-issue]
55
body:
66
- type: markdown
77
attributes:

.github/dependabot.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ updates:
1010
- "skip-changelog"
1111
reviewers:
1212
- redhat-developer/extester-maintainers
13-
- package-ecosystem: 'npm'
14-
directory: '/'
13+
- package-ecosystem: "npm"
14+
directory: "/"
1515
schedule:
16-
interval: 'daily'
16+
interval: "daily"
1717
open-pull-requests-limit: 20
1818
versioning-strategy: increase
1919
reviewers:

.github/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ changelog:
55
categories:
66
- title: 🚫 Bugs
77
labels:
8-
- 'bug'
8+
- "bug"
99
exclude:
1010
labels:
1111
- dependencies
1212
- title: 🚀 Features
1313
labels:
14-
- 'enhancement'
14+
- "enhancement"
1515
exclude:
1616
labels:
1717
- dependencies

.github/workflows/coverage.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: 📊 Code Coverage
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [main]
66
pull_request:
7-
branches: [ main ]
7+
branches: [main]
88
workflow_dispatch:
99

1010
concurrency:

.github/workflows/insiders.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
schedule:
55
- cron: "0 0 * * *"
66
push:
7-
branches: [ insider ]
7+
branches: [insider]
88
workflow_dispatch:
99

1010
concurrency:

.github/workflows/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: 🏗️ Main CI
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [main]
66
pull_request:
7-
branches: [ main ]
7+
branches: [main]
88
workflow_dispatch:
99

1010
concurrency:
@@ -17,7 +17,7 @@ jobs:
1717
strategy:
1818
fail-fast: false
1919
matrix:
20-
version: [ min, 1.88.1, max ]
20+
version: [min, 1.88.1, max]
2121
uses: ./.github/workflows/template-main.yaml
2222
with:
2323
version: ${{ matrix.version }}
@@ -26,7 +26,7 @@ jobs:
2626
if: always()
2727
runs-on: ubuntu-latest
2828
name: 🚦 Status Check
29-
needs: [ test ]
29+
needs: [test]
3030
steps:
3131
- name: ℹ️ Test Matrix Result
3232
run: |

.github/workflows/nodejs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
node: [ lts/*, latest ]
18+
node: [lts/*, latest]
1919
uses: ./.github/workflows/template-main.yaml
2020
with:
2121
version: max

.github/workflows/publish-wiki.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: 📖 Publish wiki
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [main]
66
paths:
77
- docs/**
88
- .github/workflows/publish-wiki.yml

.github/workflows/stalebot.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: 🗄️ Close Stale Issues and PRs
33

44
on:
55
schedule:
6-
- cron: '30 1 * * *'
6+
- cron: "30 1 * * *"
77

88
jobs:
99
stale:
@@ -12,13 +12,13 @@ jobs:
1212
- name: 🗄️ Close Inactive
1313
uses: actions/stale@v9
1414
with:
15-
stale-issue-message: 'This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.'
16-
stale-pr-message: 'This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.'
17-
close-issue-message: 'This issue was closed because it has been stalled for 5 days with no activity.'
18-
exempt-issue-milestones: 'BACKLOG,NEXT'
15+
stale-issue-message: "This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days."
16+
stale-pr-message: "This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days."
17+
close-issue-message: "This issue was closed because it has been stalled for 5 days with no activity."
18+
exempt-issue-milestones: "BACKLOG,NEXT"
1919
exempt-all-assignees: true
20-
stale-issue-label: 'no-issue-activity'
21-
stale-pr-label: 'no-pr-activity'
22-
exempt-issue-labels: 'enhancement,question,help-wanted,do-not-stale'
23-
exempt-pr-labels: 'help-wanted,prio,do-not-stale'
20+
stale-issue-label: "no-issue-activity"
21+
stale-pr-label: "no-pr-activity"
22+
exempt-issue-labels: "enhancement,question,help-wanted,do-not-stale"
23+
exempt-pr-labels: "help-wanted,prio,do-not-stale"
2424
exempt-draft-pr: true

.github/workflows/template-main.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ on:
88
type: string
99
nodejs:
1010
required: false
11-
default: '18.x'
11+
default: "18.x"
1212
type: string
1313
code_type:
1414
required: false
15-
default: 'stable'
15+
default: "stable"
1616
type: string
1717

1818
jobs:
@@ -21,7 +21,7 @@ jobs:
2121
runs-on: ${{ matrix.os }}
2222
strategy:
2323
matrix:
24-
os: [ ubuntu-latest, macos-latest, windows-latest ]
24+
os: [ubuntu-latest, macos-latest, windows-latest]
2525
fail-fast: false
2626

2727
env:
@@ -45,6 +45,9 @@ jobs:
4545
- name: 🔧 Build
4646
run: npm run build
4747

48+
- name: ✨ Code Formatter - Prettier
49+
run: npx prettier . --check
50+
4851
- name: 🔧 Install - Test Project
4952
run: npm install --workspace=extester-test
5053

.prettierignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
coverage/
2+
out/
3+
resources/
4+
test-resources/
5+
test-extensions/
6+
.test-extensions/

.prettierrc

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"arrowParens": "always",
3+
"bracketSameLine": false,
4+
"bracketSpacing": true,
5+
"endOfLine": "auto",
6+
"printWidth": 160,
7+
"semi": true,
8+
"singleQuote": true,
9+
"trailingComma": "all",
10+
"useTabs": true,
11+
"tabWidth": 4,
12+
"quoteProps": "as-needed",
13+
"overrides": [
14+
{
15+
"files": ["*.yaml", "*.yml", "*.json", "*.md"],
16+
"options": {
17+
"useTabs": false,
18+
"tabWidth": 2,
19+
"singleQuote": false
20+
}
21+
}
22+
]
23+
}

0 commit comments

Comments
 (0)