@diplodoc/lint 1.11.0 → 1.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diplodoc/lint",
3
- "version": "1.11.0",
3
+ "version": "1.11.1",
4
4
  "description": "Diplodoc platform internal utility set for linting",
5
5
  "bin": {
6
6
  "lint": "./bin/lint.js",
@@ -30,6 +30,18 @@
30
30
  "typecheck": "exit 0",
31
31
  "build": "exit 0"
32
32
  },
33
+ "files": [
34
+ "bin",
35
+ "lib",
36
+ "scaffolding",
37
+ "scripts",
38
+ "eslint-common-config.js",
39
+ "eslint-client-config.js",
40
+ "eslint-node-config.js",
41
+ "prettier-common-config.js",
42
+ "stylelint-common-config.js",
43
+ "lintstaged-config.js"
44
+ ],
33
45
  "exports": {
34
46
  "./esbuild": {
35
47
  "types": "./lib/esbuild.d.ts",
@@ -0,0 +1,41 @@
1
+ # To get started with Dependabot version updates, you'll need to specify which
2
+ # package ecosystems to update and where the package manifests are located.
3
+ # Please see the documentation for all configuration options:
4
+ # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5
+
6
+ version: 2
7
+ updates:
8
+ # npm dependencies
9
+ - package-ecosystem: 'npm'
10
+ directory: '/'
11
+ schedule:
12
+ interval: 'weekly'
13
+ day: 'monday'
14
+ time: '09:00'
15
+ open-pull-requests-limit: 10
16
+ labels:
17
+ - 'dependencies'
18
+ - 'dependabot'
19
+ commit-message:
20
+ prefix: 'chore'
21
+ include: 'scope'
22
+ # Group updates for minor and patch versions
23
+ groups:
24
+ production-dependencies:
25
+ dependency-type: 'production'
26
+ update-types:
27
+ - 'minor'
28
+ - 'patch'
29
+ development-dependencies:
30
+ dependency-type: 'development'
31
+ update-types:
32
+ - 'minor'
33
+ - 'patch'
34
+ # Ignore major version updates (require manual review)
35
+ ignore:
36
+ - dependency-name: '*'
37
+ update-types:
38
+ - 'version-update:semver-major'
39
+ # Note: Dependabot security updates are enabled automatically by GitHub
40
+ # when dependabot.yml exists. Security updates create PRs for vulnerabilities
41
+ # independently of the regular update schedule above.
@@ -0,0 +1,62 @@
1
+ # ⚠️ IMPORTANT: This workflow is a template from diplodoc/lint/scaffolding
2
+ # Do not edit this file in other packages - it is automatically copied from here.
3
+ # To modify this workflow, edit it in diplodoc/devops/lint/scaffolding/.github/workflows/
4
+ # and then run the scaffolding update process.
5
+
6
+ name: Update package-lock.json
7
+
8
+ on:
9
+ pull_request:
10
+ branches: ['**']
11
+
12
+ permissions:
13
+ contents: write
14
+
15
+ jobs:
16
+ update-package-lock:
17
+ name: Update package-lock.json
18
+ runs-on: ubuntu-latest
19
+ steps:
20
+ - name: Checkout code
21
+ uses: actions/checkout@v4
22
+ with:
23
+ ref: ${{ github.head_ref }}
24
+ fetch-depth: 0
25
+ token: ${{ secrets.YC_UI_BOT_GITHUB_TOKEN }}
26
+
27
+ - name: Setup Node.js
28
+ uses: actions/setup-node@v4
29
+ with:
30
+ node-version: 22
31
+ registry-url: 'https://registry.npmjs.org'
32
+ cache: 'npm'
33
+
34
+ - name: Install latest npm (>= 11.5.1)
35
+ run: |
36
+ [ "$(printf '%s\n' "11.5.1" "$(npm -v)" | sort -V | head -n1)" = "11.5.1" ] || npm install -g npm@latest
37
+ shell: bash
38
+
39
+ - name: Regenerate package-lock.json
40
+ run: npm install --no-workspaces --package-lock-only --ignore-scripts
41
+
42
+ - name: Commit and push changes
43
+ env:
44
+ GH_TOKEN: ${{ secrets.YC_UI_BOT_GITHUB_TOKEN }}
45
+ BRANCH_NAME: ${{ github.head_ref }}
46
+ run: |
47
+ set -e
48
+
49
+ # Check if there are any changes
50
+ if [[ -z $(git diff --stat | grep package-lock.json) ]]; then
51
+ echo "::info::Nothing to update"
52
+ exit 0
53
+ fi
54
+
55
+ # Configure git
56
+ git config --global user.email "95919151+yc-ui-bot@users.noreply.github.com"
57
+ git config --global user.name "yc-ui-bot"
58
+
59
+ # Commit and push
60
+ git add package-lock.json
61
+ git commit -m "chore: Update package-lock.json" --no-verify
62
+ git push origin HEAD:${BRANCH_NAME}
@@ -0,0 +1,34 @@
1
+ # ⚠️ IMPORTANT: This workflow is a template from diplodoc/lint/scaffolding
2
+ # Do not edit this file in other packages - it is automatically copied from here.
3
+ # To modify this workflow, edit it in diplodoc/devops/lint/scaffolding/.github/workflows/
4
+ # and then run the scaffolding update process.
5
+
6
+ name: Release Please
7
+
8
+ on:
9
+ push:
10
+ branches:
11
+ - master
12
+
13
+ permissions:
14
+ contents: write
15
+ pull-requests: write
16
+ id-token: write
17
+
18
+ jobs:
19
+ release-please:
20
+ runs-on: ubuntu-latest
21
+ steps:
22
+ - name: Checkout code
23
+ uses: actions/checkout@v4
24
+ with:
25
+ fetch-depth: 0
26
+ token: ${{ secrets.YC_UI_BOT_GITHUB_TOKEN }}
27
+
28
+ - name: Release Please
29
+ uses: googleapis/release-please-action@v4
30
+ id: release
31
+ with:
32
+ config-file: .release-please-config.json
33
+ manifest-file: .release-please-manifest.json
34
+ token: ${{ secrets.YC_UI_BOT_GITHUB_TOKEN }}
@@ -0,0 +1,102 @@
1
+ # ⚠️ IMPORTANT: This workflow is a template from diplodoc/lint/scaffolding
2
+ # Do not edit this file in other packages - it is automatically copied from here.
3
+ # To modify this workflow, edit it in diplodoc/devops/lint/scaffolding/.github/workflows/
4
+ # and then run the scaffolding update process.
5
+
6
+ name: Release Package to npm
7
+
8
+ # This workflow handles both stable and prerelease publishing to npm
9
+ # - Stable: triggered by release event or manual dispatch with 'stable' type
10
+ # - Prerelease: triggered by manual dispatch with 'prerelease' type (only from non-protected branches)
11
+
12
+ on:
13
+ release:
14
+ types: [published]
15
+ workflow_dispatch:
16
+ inputs:
17
+ release_type:
18
+ description: 'Release type'
19
+ required: true
20
+ default: 'prerelease'
21
+ type: choice
22
+ options:
23
+ - prerelease
24
+ - stable
25
+
26
+ permissions:
27
+ contents: read
28
+ id-token: write
29
+
30
+ jobs:
31
+ publish:
32
+ name: Publish to npm
33
+ runs-on: ubuntu-latest
34
+ # For prerelease - only from non-protected branches
35
+ if: |
36
+ github.event_name == 'release' ||
37
+ (github.event_name == 'workflow_dispatch' && inputs.release_type == 'stable') ||
38
+ (github.event_name == 'workflow_dispatch' && inputs.release_type == 'prerelease' && github.ref_protected != true)
39
+ steps:
40
+ - name: Checkout code
41
+ uses: actions/checkout@v4
42
+ with:
43
+ fetch-depth: 0
44
+
45
+ - name: Setup Node.js
46
+ uses: actions/setup-node@v4
47
+ with:
48
+ node-version: 22
49
+ registry-url: 'https://registry.npmjs.org'
50
+
51
+ - name: Install latest npm (>= 11.5.1)
52
+ run: |
53
+ [ "$(printf '%s\n' "11.5.1" "$(npm -v)" | sort -V | head -n1)" = "11.5.1" ] || npm install -g npm@latest
54
+ shell: bash
55
+
56
+ - name: Install dependencies
57
+ run: npm ci
58
+
59
+ - name: Run tests
60
+ run: npm test
61
+
62
+ - name: Run type check
63
+ run: npm run typecheck
64
+
65
+ - name: Build package
66
+ run: npm run build
67
+
68
+ # === STABLE RELEASE STEPS ===
69
+ - name: Check version matches release tag
70
+ if: github.event_name == 'release'
71
+ run: |
72
+ PACKAGE_VERSION=$(node -p "require('./package.json').version")
73
+ RELEASE_TAG=${GITHUB_REF#refs/tags/}
74
+ RELEASE_VERSION=${RELEASE_TAG#v}
75
+ if [ "$PACKAGE_VERSION" != "$RELEASE_VERSION" ]; then
76
+ echo "Error: package.json version ($PACKAGE_VERSION) does not match release tag ($RELEASE_TAG -> $RELEASE_VERSION)"
77
+ exit 1
78
+ fi
79
+ echo "Version check passed: $PACKAGE_VERSION (from tag $RELEASE_TAG)"
80
+
81
+ - name: Skip if draft release
82
+ if: github.event.release.draft == true
83
+ run: |
84
+ echo "Skipping publish for draft release"
85
+ exit 0
86
+
87
+ - name: Publish stable to npm
88
+ if: (github.event_name == 'release' && github.event.release.draft == false) || (github.event_name == 'workflow_dispatch' && inputs.release_type == 'stable')
89
+ run: npm publish --provenance --access public
90
+ env:
91
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
92
+
93
+ # === PRERELEASE STEPS ===
94
+ - name: Set prerelease version
95
+ if: github.event_name == 'workflow_dispatch' && inputs.release_type == 'prerelease'
96
+ run: npm version --no-git-tag-version 0.0.0-rc-$(git branch --show-current)-${{github.run_id}}
97
+
98
+ - name: Publish prerelease to npm
99
+ if: github.event_name == 'workflow_dispatch' && inputs.release_type == 'prerelease'
100
+ run: npm publish --tag $(git branch --show-current) --provenance --access public
101
+ env:
102
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -0,0 +1,51 @@
1
+ # ⚠️ IMPORTANT: This workflow is a template from diplodoc/lint/scaffolding
2
+ # Do not edit this file in other packages - it is automatically copied from here.
3
+ # To modify this workflow, edit it in diplodoc/devops/lint/scaffolding/.github/workflows/
4
+ # and then run the scaffolding update process.
5
+
6
+ name: Security
7
+
8
+ on:
9
+ push:
10
+ branches: [master]
11
+ pull_request:
12
+ branches: [master]
13
+ schedule:
14
+ # Run weekly security scan on Monday at 6:00 UTC
15
+ - cron: '0 6 * * 1'
16
+
17
+ jobs:
18
+ audit:
19
+ name: Security audit
20
+ runs-on: ubuntu-latest
21
+ steps:
22
+ - name: Checkout code
23
+ uses: actions/checkout@v4
24
+
25
+ - name: Setup Node.js
26
+ uses: actions/setup-node@v4
27
+ with:
28
+ node-version: 22.x
29
+ cache: 'npm'
30
+
31
+ - name: Install latest npm (>= 11.5.1)
32
+ run: |
33
+ [ "$(printf '%s\n' "11.5.1" "$(npm -v)" | sort -V | head -n1)" = "11.5.1" ] || npm install -g npm@latest
34
+ shell: bash
35
+
36
+ - name: Install dependencies
37
+ run: npm ci
38
+
39
+ - name: Run npm audit
40
+ id: audit
41
+ run: npm audit --audit-level=moderate
42
+ continue-on-error: true
43
+
44
+ - name: Upload audit results
45
+ if: steps.audit.outcome == 'failure'
46
+ uses: actions/upload-artifact@v4
47
+ with:
48
+ name: npm-audit-report
49
+ path: |
50
+ package-lock.json
51
+ retention-days: 7
@@ -0,0 +1,57 @@
1
+ # ⚠️ IMPORTANT: This workflow is a template from diplodoc/lint/scaffolding
2
+ # Do not edit this file in other packages - it is automatically copied from here.
3
+ # To modify this workflow, edit it in diplodoc/devops/lint/scaffolding/.github/workflows/
4
+ # and then run the scaffolding update process.
5
+
6
+ name: Tests
7
+
8
+ on:
9
+ push:
10
+ branches:
11
+ - master
12
+ - main
13
+ pull_request:
14
+ branches:
15
+ - master
16
+ - main
17
+ workflow_dispatch:
18
+
19
+ jobs:
20
+ test:
21
+ runs-on: ${{ matrix.os }}
22
+ strategy:
23
+ matrix:
24
+ os: [ubuntu-latest, windows-latest, macos-latest]
25
+ node-version: [22]
26
+
27
+ steps:
28
+ - name: Checkout repository
29
+ uses: actions/checkout@v4
30
+ with:
31
+ fetch-depth: 0
32
+
33
+ - name: Setup Node.js
34
+ uses: actions/setup-node@v4
35
+ with:
36
+ node-version: ${{ matrix.node-version }}
37
+ cache: 'npm'
38
+
39
+ - name: Install latest npm (>= 11.5.1)
40
+ run: |
41
+ [ "$(printf '%s\n' "11.5.1" "$(npm -v)" | sort -V | head -n1)" = "11.5.1" ] || npm install -g npm@latest
42
+ shell: bash
43
+
44
+ - name: Install dependencies
45
+ run: npm ci
46
+
47
+ - name: Run type check
48
+ run: npm run typecheck
49
+
50
+ - name: Run linter
51
+ run: npm run lint
52
+
53
+ - name: Run tests
54
+ run: npm test
55
+
56
+ - name: Run build
57
+ run: npm run build
@@ -0,0 +1,84 @@
1
+ # ⚠️ IMPORTANT: This workflow is a template from diplodoc/lint/scaffolding
2
+ # Do not edit this file in other packages - it is automatically copied from here.
3
+ # To modify this workflow, edit it in diplodoc/devops/lint/scaffolding/.github/workflows/
4
+ # and then run the scaffolding update process.
5
+
6
+ name: Update Dependencies
7
+
8
+ on:
9
+ workflow_dispatch:
10
+ inputs:
11
+ package:
12
+ description: 'Package name to update'
13
+ required: true
14
+ type: string
15
+ version:
16
+ description: 'Package version (use "latest" for latest version)'
17
+ required: true
18
+ type: string
19
+ default: 'latest'
20
+
21
+ permissions:
22
+ contents: write
23
+ pull-requests: write
24
+
25
+ jobs:
26
+ update-package:
27
+ runs-on: ubuntu-latest
28
+ steps:
29
+ - name: Checkout code
30
+ uses: actions/checkout@v4
31
+ with:
32
+ fetch-depth: 0
33
+ token: ${{ secrets.YC_UI_BOT_GITHUB_TOKEN }}
34
+
35
+ - name: Setup Node.js
36
+ uses: actions/setup-node@v4
37
+ with:
38
+ node-version: 22
39
+ registry-url: 'https://registry.npmjs.org'
40
+ cache: 'npm'
41
+
42
+ - name: Install latest npm (>= 11.5.1)
43
+ run: |
44
+ [ "$(printf '%s\n' "11.5.1" "$(npm -v)" | sort -V | head -n1)" = "11.5.1" ] || npm install -g npm@latest
45
+ shell: bash
46
+
47
+ - name: Install dependencies
48
+ run: npm ci
49
+
50
+ - name: Update package
51
+ run: npm install --no-workspaces ${{ inputs.package }}@${{ inputs.version }}
52
+
53
+ - name: Regenerate package-lock.json for standalone mode
54
+ run: npm install --no-workspaces --package-lock-only
55
+
56
+ - name: Create and publish PR
57
+ env:
58
+ GH_TOKEN: ${{ secrets.YC_UI_BOT_GITHUB_TOKEN }}
59
+ run: |
60
+ set -e
61
+
62
+ # Check if there are any changes
63
+ if [[ -z $(git diff --stat | grep -E "package.json|package-lock.json") ]]; then
64
+ echo "::info::Nothing to update"
65
+ exit 0
66
+ fi
67
+
68
+ # Get actual installed version
69
+ VERSION=$(npm explore --no-workspaces ${{ inputs.package }} "node -pe 'require(\"./package.json\").version'" --shell sh)
70
+
71
+ # Configure git
72
+ git config --global user.email "95919151+yc-ui-bot@users.noreply.github.com"
73
+ git config --global user.name "yc-ui-bot"
74
+
75
+ # Create branch and commit
76
+ BRANCH_NAME="ci/update-deps/${{ inputs.package }}-$VERSION"
77
+ git push -f origin :$BRANCH_NAME || true
78
+ git checkout -b $BRANCH_NAME
79
+ git add package.json package-lock.json
80
+ git commit -m "fix(deps): Update ${{ inputs.package }} to $VERSION" --no-verify
81
+ git push -u origin $BRANCH_NAME
82
+
83
+ # Create PR
84
+ gh pr create --title "fix(deps): Update ${{ inputs.package }} to $VERSION" --body "Automated dependency update" --base master
package/.editorconfig DELETED
@@ -1,20 +0,0 @@
1
- root = true
2
-
3
- [*]
4
- charset = utf-8
5
- end_of_line = lf
6
- insert_final_newline = true
7
- trim_trailing_whitespace = true
8
- indent_style = space
9
- indent_size = 4
10
-
11
- [{*.json,*.yml,*.yaml}]
12
- indent_style = space
13
- indent_size = 2
14
-
15
- [*.md]
16
- trim_trailing_whitespace = false
17
-
18
- [GNUmakefile]
19
- indent_style = tab
20
- indent_size = 4
package/.eslintignore DELETED
@@ -1,27 +0,0 @@
1
- .idea
2
- .vscode
3
- .history
4
- .env
5
- .DS_Store
6
- node_modules
7
- /lib
8
- /dist
9
- /build
10
- /cache
11
- /coverage
12
- /external
13
- # Test files - they use Node.js globals
14
- test/
15
- # Scripts use Node.js globals
16
- scripts/
17
- # Bin scripts use Node.js globals
18
- bin/
19
-
20
- .lintstagedrc.js
21
- .eslintrc.js
22
- .prettierrc.js
23
- .stylelintrc.js
24
- build/
25
- build/**
26
- esbuild/
27
- esbuild/**/*.mjs
package/.eslintrc.js DELETED
@@ -1,46 +0,0 @@
1
- // ⚠️ AUTO-GENERATED FILE - DO NOT EDIT MANUALLY
2
- // This file is automatically generated and updated by `@diplodoc/lint update`
3
- // Any manual changes will be overwritten on the next update
4
- // To customize ESLint configuration, see: https://github.com/diplodoc-platform/lint#configuration
5
-
6
- module.exports = {
7
- root: true,
8
- extends: require.resolve('@diplodoc/lint/eslint-config'),
9
- parserOptions: {
10
- tsconfigRootDir: __dirname,
11
- project: true,
12
- },
13
- overrides: [
14
- {
15
- files: ['*.mjs', '*.cjs'],
16
- parserOptions: {
17
- project: null,
18
- ecmaVersion: 'latest',
19
- sourceType: 'module',
20
- },
21
- env: {
22
- node: true,
23
- es2022: true,
24
- },
25
- },
26
- {
27
- files: ['test/**/*.{js,jsx,ts,tsx}'],
28
- env: {
29
- jest: true,
30
- node: true,
31
- },
32
- },
33
- {
34
- files: ['scripts/**/*.{js,jsx,ts,tsx}'],
35
- env: {
36
- node: true,
37
- },
38
- },
39
- {
40
- files: ['bin/**/*.{js,jsx,ts,tsx}', 'bin/*.{js,jsx,ts,tsx}'],
41
- env: {
42
- node: true,
43
- },
44
- },
45
- ],
46
- };
package/.gitattributes DELETED
@@ -1,34 +0,0 @@
1
- # Auto detect text files and perform LF normalization
2
- * text=auto
3
-
4
- # Explicitly declare text files you want to always be normalized and converted
5
- # to native line endings on checkout.
6
- *.js text eol=lf
7
- *.mjs text eol=lf
8
- *.cjs text eol=lf
9
- *.jsx text eol=lf
10
- *.ts text eol=lf
11
- *.tsx text eol=lf
12
- *.json text eol=lf
13
- *.yml text eol=lf
14
- *.yaml text eol=lf
15
- *.md text eol=lf
16
- *.css text eol=lf
17
- *.scss text eol=lf
18
- *.html text eol=lf
19
- *.sh text eol=lf
20
-
21
- # Denote all files that are truly binary and should not be modified.
22
- *.png binary
23
- *.jpg binary
24
- *.jpeg binary
25
- *.gif binary
26
- *.ico binary
27
- *.svg binary
28
- *.woff binary
29
- *.woff2 binary
30
- *.ttf binary
31
- *.eot binary
32
-
33
-
34
-
package/.husky/commit-msg DELETED
@@ -1,49 +0,0 @@
1
- COMMIT_MSG_FILE="$1"
2
- COMMIT_MSG=$(cat "$COMMIT_MSG_FILE")
3
-
4
- # Check if commit message contains Cyrillic characters
5
- # All commit messages must be in English per .agents/style-and-testing.md
6
- if echo "$COMMIT_MSG" | grep -q '[А-Яа-яЁё]'; then
7
- echo "❌ Error: Commit message contains Cyrillic characters."
8
- echo ""
9
- echo "All commit messages must be in English per .agents/style-and-testing.md"
10
- echo "Please rewrite your commit message in English."
11
- echo ""
12
- echo "Current commit message:"
13
- echo "$COMMIT_MSG"
14
- exit 1
15
- fi
16
-
17
- # Extract the first line (subject) of commit message
18
- SUBJECT=$(echo "$COMMIT_MSG" | head -n1)
19
-
20
- # Allow fixup! and squash! prefixes (for git commit --fixup and --squash)
21
- if echo "$SUBJECT" | grep -qE '^(fixup!|squash!)'; then
22
- exit 0
23
- fi
24
-
25
- # Check Conventional Commits format: <type>(<scope>): <subject>
26
- # Types: feat, fix, perf, refactor, docs, chore, revert, deps
27
- # Scope is optional
28
- if ! echo "$SUBJECT" | grep -qE '^(feat|fix|perf|refactor|docs|chore|revert|deps)(\([^)]+\))?: .+'; then
29
- echo "❌ Error: Commit message does not follow Conventional Commits format."
30
- echo ""
31
- echo "Expected format: <type>(<scope>): <subject>"
32
- echo ""
33
- echo "Types: feat, fix, perf, refactor, docs, chore, revert, deps"
34
- echo "Scope is optional"
35
- echo ""
36
- echo "Examples:"
37
- echo " feat(cli): add new command"
38
- echo " fix(transform): handle edge case"
39
- echo " docs(readme): update installation"
40
- echo ""
41
- echo "For fixing previous commits, use:"
42
- echo " fixup! <original commit message>"
43
- echo ""
44
- echo "Current commit message:"
45
- echo "$SUBJECT"
46
- exit 1
47
- fi
48
-
49
- exit 0
package/.husky/pre-commit DELETED
@@ -1 +0,0 @@
1
- npm run pre-commit