@hyperupcall/eslint-config 2.1.0 → 2.2.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.
@@ -0,0 +1 @@
1
+ extends: ['@hyperupcall/scripts-nodejs/config-commitlint.js']
package/.config/hk.pkl ADDED
@@ -0,0 +1,33 @@
1
+ amends "package://github.com/jdx/hk/releases/download/v2.13.0/hk@2.13.0#/Config.pkl"
2
+ import "package://github.com/jdx/hk/releases/download/v2.13.0/hk@2.13.0#/Builtins.pkl"
3
+
4
+ env {
5
+ ["PATH"] = "\(read("env:PATH")):./node_modules/.bin"
6
+ }
7
+
8
+ // To override this, create a ".config/hk.local.pkl" file.
9
+ // See: https://hk.jdx.dev/configuration.html#hk-local-pkl.
10
+ local linters = new Mapping {
11
+ ["prettier"] = Builtins.prettier
12
+ ["eslint"] = Builtins.eslint
13
+ ["publint"] = new Step {
14
+ glob = "package.json"
15
+ // Does not include suggestion (info) messages.
16
+ check = "publint --level warning --strict"
17
+ }
18
+ ["tsc"] = Builtins.tsc
19
+ }
20
+
21
+ steps = linters
22
+
23
+ hooks {
24
+ ["commit-msg"] {
25
+ steps {
26
+ ["commitlint"] {
27
+ check = new Command {
28
+ argv = List("commitlint", "--config", ".config/commitlintrc.yaml", "--edit", "{{commit_msg_file}}")
29
+ }
30
+ }
31
+ }
32
+ }
33
+ }
@@ -0,0 +1,84 @@
1
+ name: Publish
2
+
3
+ on:
4
+ push:
5
+ tags: ['v*']
6
+
7
+ permissions:
8
+ contents: read
9
+
10
+ concurrency:
11
+ group: npm-publish
12
+ cancel-in-progress: false
13
+
14
+ defaults:
15
+ run:
16
+ shell: bash
17
+
18
+ jobs:
19
+ pack:
20
+ if: ${{ !github.event.repository.fork }}
21
+ runs-on: ubuntu-latest
22
+ timeout-minutes: 60
23
+ outputs:
24
+ dist-tag: ${{ steps.release.outputs.dist-tag }}
25
+
26
+ steps:
27
+ - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
28
+ with:
29
+ persist-credentials: false
30
+
31
+ - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
32
+ with:
33
+ node-version: '26'
34
+ package-manager-cache: false
35
+
36
+ - name: Verify release tag
37
+ run: node -e "require('node:assert/strict').equal(process.env.GITHUB_REF_NAME, 'v' + require('./package.json').version)"
38
+
39
+ - name: Select release channel
40
+ id: release
41
+ run: |
42
+ tag=$(node -p "require('./package.json').version.includes('-') ? 'next' : 'latest'")
43
+ echo "dist-tag=$tag" >> "$GITHUB_OUTPUT"
44
+
45
+ - name: Pack package
46
+ run: npm pack --ignore-scripts --pack-destination "$RUNNER_TEMP"
47
+
48
+ - uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
49
+ with:
50
+ name: npm-package
51
+ path: ${{ runner.temp }}/*.tgz
52
+ retention-days: 7
53
+
54
+ publish:
55
+ needs: pack
56
+ runs-on: ubuntu-latest
57
+ environment: Publish
58
+ timeout-minutes: 60
59
+ permissions:
60
+ contents: read
61
+ id-token: write
62
+
63
+ steps:
64
+ - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
65
+ with:
66
+ persist-credentials: false
67
+
68
+ - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
69
+ with:
70
+ node-version: '26'
71
+ package-manager-cache: false
72
+
73
+ - name: Install npm with staged publishing support
74
+ run: npm install --global npm@11.19.1 --ignore-scripts --no-audit --no-fund
75
+
76
+ - uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7
77
+ with:
78
+ name: npm-package
79
+ path: ${{ runner.temp }}/npm-release
80
+
81
+ - name: Stage package
82
+ env:
83
+ DIST_TAG: ${{ needs.pack.outputs.dist-tag }}
84
+ run: npm stage publish "$RUNNER_TEMP"/npm-release/*.tgz --access public --tag "$DIST_TAG" --ignore-scripts
@@ -0,0 +1,58 @@
1
+ name: 'Website'
2
+
3
+ on:
4
+ push:
5
+ branches: ['main']
6
+ workflow_dispatch:
7
+ workflow_call:
8
+
9
+ permissions:
10
+ contents: read
11
+ pages: write
12
+ id-token: write
13
+
14
+ concurrency:
15
+ group: 'pages'
16
+
17
+ jobs:
18
+ deploy:
19
+ runs-on: 'ubuntu-latest'
20
+ environment:
21
+ name: 'github-pages'
22
+ url: '${{ steps.deployment.outputs.page_url }}'
23
+ steps:
24
+ - uses: 'actions/checkout@v6'
25
+ - uses: 'actions/configure-pages@v5'
26
+ id: pages
27
+ - name: 'Prepare docs if missing'
28
+ shell: bash
29
+ run: |
30
+ if [ ! -d docs ]; then
31
+ mkdir -p docs/content docs/templates
32
+ printf '%s\n' 'base_url = "https://example.org"' > docs/config.toml
33
+ printf '+++\n+++\n\n' > docs/content/_index.md
34
+ cat README.md >> docs/content/_index.md
35
+ printf '%s\n' \
36
+ '<!doctype html><meta charset="utf-8">' \
37
+ '<main>{{ section.content | safe }}</main>' \
38
+ > docs/templates/index.html
39
+ fi
40
+ - name: 'Download Zola'
41
+ shell: bash
42
+ run: |
43
+ curl -fsSL \
44
+ 'https://github.com/getzola/zola/releases/download/v0.23.0/zola-v0.23.0-x86_64-unknown-linux-gnu.tar.gz' \
45
+ -o "$RUNNER_TEMP/zola.tar.gz"
46
+ tar -xzf "$RUNNER_TEMP/zola.tar.gz" -C "$RUNNER_TEMP" zola
47
+ - name: 'Build site with Zola'
48
+ shell: bash
49
+ working-directory: 'docs'
50
+ env:
51
+ PAGES_BASE_URL: '${{ steps.pages.outputs.base_url }}'
52
+ run: |
53
+ "$RUNNER_TEMP/zola" build --base-url "$PAGES_BASE_URL" --output-dir public
54
+ - uses: 'actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b'
55
+ with:
56
+ path: 'docs/public'
57
+ - uses: 'actions/deploy-pages@v4'
58
+ id: deployment
package/README.md CHANGED
@@ -5,12 +5,7 @@ Edwin's [ESLint](https://eslint.org) configuration.
5
5
  ## Install
6
6
 
7
7
  ```sh
8
- pnpm i -D \
9
- eslint @eslint/markdown @eslint/css @eslint/json eslint-config-prettier @hyperupcall/eslint-config \
10
- eslint-plugin-import eslint-plugin-promise \
11
- eslint-plugin-n eslint-plugin-unicorn eslint-plugin-security \
12
- @eslint-community/eslint-plugin-eslint-comments eslint-plugin-regexp \
13
- eslint-plugin-perfectionist eslint-plugin-no-unsanitized
8
+ pnpm i -D eslint @hyperupcall/eslint-config
14
9
  ```
15
10
 
16
11
  ## Usage
package/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const _default: import("eslint/config").Config[];
2
- export default _default;
1
+ declare const config: import('eslint').Linter.Config[]
2
+ export default config
@@ -0,0 +1,2 @@
1
+ declare const _default: import('eslint/config').ConfigObject[]
2
+ export default _default
package/package.json CHANGED
@@ -1,49 +1,53 @@
1
1
  {
2
- "name": "@hyperupcall/eslint-config",
3
- "version": "2.1.0",
4
- "type": "module",
5
- "description": "Edwin's ESLint configuration.",
6
- "repository": {
7
- "type": "git",
8
- "url": "https://github.com/hyperupcall-projects/eslint-config"
9
- },
10
- "bugs": {
11
- "url": "https://github.com/hyperupcall-projects/eslint-config/issues"
12
- },
13
- "author": "Edwin Kofler <edwin@kofler.dev> (https://edwinkofler.com)",
14
- "license": "MPL-2.0",
15
- "private": false,
16
- "main": "./index.js",
17
- "dependencies": {
18
- "@eslint-community/eslint-plugin-eslint-comments": "^4.7.1",
19
- "@eslint/css": "^1.0.0",
20
- "@eslint/js": "^10.0.1",
21
- "@eslint/json": "^2.0.0",
22
- "@eslint/markdown": "^8.0.2",
23
- "eslint-config-prettier": "^10.1.8",
24
- "eslint-plugin-import-x": "^4.16.2",
25
- "eslint-plugin-mdx": "^3.7.0",
26
- "eslint-plugin-n": "^18.1.0",
27
- "eslint-plugin-no-unsanitized": "^4.1.5",
28
- "eslint-plugin-perfectionist": "^5.9.1",
29
- "eslint-plugin-promise": "^7.3.0",
30
- "eslint-plugin-regexp": "^3.1.0",
31
- "eslint-plugin-security": "^4.0.0",
32
- "eslint-plugin-unicorn": "^67.0.0",
33
- "globals": "^17.0.0"
34
- },
35
- "devDependencies": {
36
- "@hyperupcall/scripts-nodejs": "0.9.0",
37
- "@types/node": "^25.9.3",
38
- "typescript": "^6.0.3"
39
- },
40
- "markdownlint-cli2": {
41
- "extends": "./node_modules/@hyperupcall/markdownlint-config/.markdownlint.json"
42
- },
43
- "prettier": "@hyperupcall/scripts-nodejs/config-prettier.js",
44
- "scripts": {
45
- "format": "hyperupcall-scripts-nodejs format",
46
- "lint": "hyperupcall-scripts-nodejs lint",
47
- "typecheck": "tsc --project ./tsconfig.json"
48
- }
49
- }
2
+ "name": "@hyperupcall/eslint-config",
3
+ "version": "2.2.1",
4
+ "type": "module",
5
+ "description": "Edwin's ESLint configuration.",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/hyperupcall-projects/eslint-config"
9
+ },
10
+ "bugs": {
11
+ "url": "https://github.com/hyperupcall-projects/eslint-config/issues"
12
+ },
13
+ "author": "Edwin Kofler <edwin@kofler.dev> (https://edwinkofler.com)",
14
+ "license": "MPL-2.0",
15
+ "private": false,
16
+ "packageManager": "pnpm@12.23.0",
17
+ "main": "./index.js",
18
+ "scripts": {
19
+ "format": "hyperupcall-scripts-nodejs format",
20
+ "lint": "hyperupcall-scripts-nodejs lint",
21
+ "typecheck": "tsc --project ./tsconfig.json"
22
+ },
23
+ "dependencies": {
24
+ "@eslint-community/eslint-plugin-eslint-comments": "^4.8.1",
25
+ "@eslint/css": "^1.4.0",
26
+ "@eslint/js": "^10.0.1",
27
+ "@eslint/json": "^2.1.1",
28
+ "@eslint/markdown": "^8.0.3",
29
+ "eslint-config-prettier": "^10.1.8",
30
+ "eslint-plugin-import-x": "^4.18.1",
31
+ "eslint-plugin-mdx": "^3.10.1",
32
+ "eslint-plugin-n": "^18.5.0",
33
+ "eslint-plugin-no-unsanitized": "^4.1.5",
34
+ "eslint-plugin-perfectionist": "^5.14.0",
35
+ "eslint-plugin-promise": "^7.3.0",
36
+ "eslint-plugin-regexp": "^3.3.3",
37
+ "eslint-plugin-security": "^4.2.1",
38
+ "eslint-plugin-unicorn": "^67.0.0",
39
+ "globals": "^17.14.0"
40
+ },
41
+ "devDependencies": {
42
+ "@hyperupcall/scripts-nodejs": "0.17.0",
43
+ "@types/node": "^25.9.9",
44
+ "typescript": "^6.0.3"
45
+ },
46
+ "markdownlint-cli2": {
47
+ "extends": "./node_modules/@hyperupcall/scripts-nodejs/.markdownlint.mjs"
48
+ },
49
+ "npmpackagejsonlint": {
50
+ "extends": "@hyperupcall/scripts-nodejs/config-npmpackagejsonlint.js"
51
+ },
52
+ "prettier": "@hyperupcall/scripts-nodejs/config-prettier.js"
53
+ }
@@ -1,5 +1,11 @@
1
- onlyBuiltDependencies:
2
- - unrs-resolver
3
1
  publicHoistPattern:
4
2
  - 'prettier'
5
3
  - 'eslint'
4
+ - '@commitlint/cli'
5
+ minimumReleaseAgeExclude:
6
+ - '@hyperupcall/scripts-nodejs@0.15.1 || 0.15.2 || 0.17.0'
7
+ - '@hyperupcall/markdownlint-config@0.5.2'
8
+ - '@hyperupcall/npm-package-json-lint-config@0.2.0'
9
+ - '@hyperupcall/commitlint-config@0.2.0'
10
+ allowBuilds:
11
+ unrs-resolver: true
package/tsconfig.json CHANGED
@@ -1,6 +1,5 @@
1
1
  {
2
2
  "include": ["./index.js"],
3
- <<<<<<< Updated upstream
4
3
  "compilerOptions": {
5
4
  "allowJs": true,
6
5
  "checkJs": true,
@@ -12,20 +11,6 @@
12
11
  "declaration": true,
13
12
  "emitDeclarationOnly": true,
14
13
  "strict": true,
15
- =======
16
- "exclude": ["**/node_modules/**"],
17
- "compilerOptions": {
18
- "skipLibCheck": true,
19
- "allowJs": true,
20
- "checkJs": true,
21
- "target": "es2015",
22
- "moduleResolution": "node16",
23
- "module": "node16",
24
- "lib": ["ES2019"],
25
- "noEmit": false,
26
- "declaration": true,
27
- "emitDeclarationOnly": true,
28
- >>>>>>> Stashed changes
29
14
  "outDir": "./output"
30
15
  }
31
16
  }
@@ -1,2 +0,0 @@
1
- rules:
2
- header-trim: [2, 'always']
package/.cz.toml DELETED
@@ -1,7 +0,0 @@
1
- [tool.commitizen]
2
- name = 'cz_customize'
3
- tag_format = 'v$version'
4
- version_scheme = 'semver2'
5
- version_provider = 'scm'
6
- update_changelog_on_bump = true
7
- major_version_zero = true
package/.lefthook.yaml DELETED
@@ -1 +0,0 @@
1
- assert_lefthook_installed: true
package/.ls-lint.yml DELETED
@@ -1,31 +0,0 @@
1
- ls:
2
- .vscode:
3
- .*: 'exists:0'
4
- .json: 'regex:(settings|launch|tasks|extensions|keybindings)'
5
-
6
- assets:
7
- .*: 'exists:0'
8
- .png: 'kebab-case'
9
- .jpg: 'kebab-case'
10
- .jpeg: 'kebab-case'
11
- .svg: 'kebab-case'
12
- .ico: 'kebab-case'
13
-
14
- docs:
15
- .*: 'exists:0'
16
- .md: 'kebab-case'
17
-
18
- language-configuration:
19
- .*: 'exists:0'
20
- .language-configuration.json: 'kebab-case'
21
-
22
- scripts:
23
- .js: 'kebab-case'
24
-
25
- syntaxes:
26
- .*: 'exists:0'
27
- .tmLanguage.json: 'kebab-case'
28
-
29
- ignore:
30
- - 'node_modules'
31
- - '.git'
package/.yamlfmt.yaml DELETED
@@ -1,17 +0,0 @@
1
- line_ending: 'lf'
2
- doublestar: true
3
- gitignore_excludes: false
4
- exclude:
5
- - "**/.data/**"
6
- - '**/node_modules/**'
7
- - '**/target/**'
8
- formatter:
9
- type: 'basic'
10
- indent: 2
11
- include_document_start: false
12
- retain_line_breaks_single: true
13
- disallow_anchors: false
14
- indentless_arrays: true
15
- trim_trailing_whitespace: true
16
- eof_newline: true
17
- force_quote_style: "single"
package/.yamllint.yaml DELETED
@@ -1,9 +0,0 @@
1
- extends: 'default'
2
- rules:
3
- document-start: 'disable'
4
- ignore:
5
- - '.data/'
6
- - 'vendor/'
7
- - 'node_modules/'
8
- - 'pnpm-lock.yaml'
9
- - '.venv'