Skip to content

Commit 80d56c9

Browse files
authored
feat: apply cumulative update to address various issues (#10324)
1 parent 621a7f0 commit 80d56c9

File tree

298 files changed

+11697
-12311
lines changed

Some content is hidden

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

298 files changed

+11697
-12311
lines changed

.browserslistrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
maintained node versions
33

44
[node-development]
5-
node 20.3.0
5+
node 22
66

77
[browser-production]
88
> 1%
@@ -26,4 +26,4 @@ maintained node versions
2626
last 1 chrome version
2727
last 1 firefox version
2828
last 1 safari version
29-
node 20.3.0
29+
node 22

.eslintrc

Lines changed: 0 additions & 38 deletions
This file was deleted.

.eslintrc.js

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
/**
2+
* @prettier
3+
*/
4+
const path = require("node:path")
5+
6+
module.exports = {
7+
parser: "@babel/eslint-parser",
8+
env: {
9+
browser: true,
10+
node: true,
11+
es6: true,
12+
jest: true,
13+
"jest/globals": true,
14+
},
15+
parserOptions: {
16+
ecmaFeatures: { jsx: true },
17+
babelOptions: { configFile: path.join(__dirname, "babel.config.js") },
18+
},
19+
extends: [
20+
"eslint:recommended",
21+
"plugin:react/recommended",
22+
"plugin:prettier/recommended",
23+
],
24+
plugins: ["react", "import", "jest", "prettier"],
25+
settings: {
26+
react: {
27+
pragma: "React",
28+
version: "15.0",
29+
},
30+
},
31+
rules: {
32+
semi: [2, "never"],
33+
strict: 0,
34+
quotes: [
35+
2,
36+
"double",
37+
{
38+
avoidEscape: true,
39+
allowTemplateLiterals: true,
40+
},
41+
],
42+
"no-unused-vars": 2,
43+
"no-multi-spaces": 1,
44+
camelcase: [
45+
"error",
46+
{
47+
allow: [
48+
"^UNSAFE_",
49+
"^requestSnippetGenerator_",
50+
"^JsonSchema_",
51+
"^curl_",
52+
"^dom_",
53+
"^api_",
54+
"^client_",
55+
"^grant_",
56+
"^code_",
57+
"^redirect_",
58+
"^spec",
59+
],
60+
},
61+
],
62+
"no-use-before-define": [2, "nofunc"],
63+
"no-underscore-dangle": 0,
64+
"no-unused-expressions": 1,
65+
"comma-dangle": 0,
66+
"no-console": [
67+
2,
68+
{
69+
allow: ["warn", "error"],
70+
},
71+
],
72+
"react/jsx-no-bind": 1,
73+
"react/jsx-no-target-blank": 2,
74+
"react/display-name": 0,
75+
"import/no-extraneous-dependencies": 2,
76+
"react/jsx-filename-extension": 2,
77+
},
78+
}

.lintstagedrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"*.js": "eslint"
2+
"*.{js,jsx}": ["eslint --max-warnings 0"],
3+
"*.scss": ["stylelint '**/*.scss'"]
34
}

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20.3.0
1+
22.11.0

.releaserc

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
{
22
"branches": [
3-
{
4-
"name": "master"
5-
},
6-
{
7-
"name": "next",
8-
"channel": "alpha",
9-
"prerelease": "alpha"
10-
}
3+
{"name": "master"}
114
],
125
"tagFormat": "v${version}",
136
"plugins": [
@@ -21,15 +14,12 @@
2114
"@semantic-release/release-notes-generator",
2215
"@semantic-release/npm",
2316
"@semantic-release/github",
24-
[
25-
"@semantic-release/git",
26-
{
27-
"assets": [
28-
"package.json",
29-
"package-lock.json"
30-
],
31-
"message": "chore(release): cut the ${nextRelease.version} release\n\n${nextRelease.notes}"
32-
}
33-
]
17+
["@semantic-release/git", {
18+
"assets": [
19+
"package.json",
20+
"package-lock.json"
21+
],
22+
"message": "chore(release): cut the ${nextRelease.version} release\n\n${nextRelease.notes}"
23+
}]
3424
]
35-
}
25+
}

Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@
44

55
FROM nginx:1.27.4-alpine
66

7+
LABEL maintainer="vladimir.gorej@gmail.com" \
8+
org.opencontainers.image.authors="vladimir.gorej@gmail.com" \
9+
org.opencontainers.image.url="docker.swagger.io/swaggerapi/swagger-ui" \
10+
org.opencontainers.image.source="https://github.com/swagger-api/swagger-ui" \
11+
org.opencontainers.image.description="SwaggerUI Docker image" \
12+
org.opencontainers.image.licenses="Apache-2.0"
13+
714
RUN apk add --update-cache --no-cache "nodejs"
815

916
LABEL maintainer="char0n"

config/jest/jest.unit.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ module.exports = {
1818
moduleNameMapper: {
1919
'^.+\\.svg$': 'jest-transform-stub'
2020
},
21-
transformIgnorePatterns: ['/node_modules/(?!(sinon|react-syntax-highlighter)/)'],
21+
transformIgnorePatterns: ['/node_modules/(?!(sinon|react-syntax-highlighter|@asamuzakjp/css-color)/)'],
2222
silent: true, // set to `false` to allow console.* calls to be printed
2323
};

docs/development/scripts.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ Script name | Description
1010
`lint` | Report ESLint style errors and warnings.
1111
`lint-errors` | Report ESLint style errors, without warnings.
1212
`lint-fix` | Attempt to fix style errors automatically.
13+
`lint-styles` | Report Stylelint style errors and warnings.
14+
`lint-styles-fix` | Attempt to fix Stylelint errors and warnings automatically.
1315
`watch` | Rebuild the core files in `/dist` when the source code changes. Useful for `npm link` with Swagger Editor.
1416

1517
### Building

docs/development/setting-up.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
11
# Setting up a dev environment
22

3-
Swagger UI includes a development server that provides hot module reloading and unminified stack traces, for easier development.
3+
SwaggerUI includes a development server that provides hot module reloading and unminified stack traces, for easier development.
44

55
### Prerequisites
66

77
- git, any version
8-
- **Node.js >=20.3.0** and **npm >=9.6.7** are the minimum required versions that this repo runs on, but we always recommend using the latest version of Node.js.
8+
- **Node.js >=22.11.0** and **npm >=10.9.0** are the minimum required versions that this repo runs on, but we always recommend using the latest version of Node.js.
9+
10+
911

1012
### Steps
1113

1214
1. `git clone https://github.com/swagger-api/swagger-ui.git`
1315
2. `cd swagger-ui`
1416
3. `npm install`
15-
4. `npm run dev`
16-
5. Wait a bit
17-
6. Open http://localhost:3200/
17+
4. `npx husky init` (optional)
18+
5. `npm run dev`
19+
6. Wait a bit
20+
7. Open http://localhost:3200/
1821

1922
### Using your own local api definition with local dev build
2023

0 commit comments

Comments
 (0)