@hyperupcall/eslint-config 2.0.3 → 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.
- package/.config/commitlintrc.yaml +1 -0
- package/.config/hk.pkl +33 -0
- package/.github/workflows/publish.yaml +84 -0
- package/.github/workflows/website.yaml +58 -0
- package/README.md +1 -6
- package/index.d.ts +2 -2
- package/output/index.d.ts +2 -0
- package/package.json +52 -49
- package/pnpm-workspace.yaml +8 -2
- package/testdata/test.json +4 -1
- package/.commitlintrc.yaml +0 -2
- package/.cz.toml +0 -7
- package/.lefthook.yaml +0 -1
- package/.ls-lint.yml +0 -31
- package/.yamlfmt.yaml +0 -17
- package/.yamllint.yaml +0 -9
|
@@ -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
|
|
2
|
-
export default
|
|
1
|
+
declare const config: import('eslint').Linter.Config[]
|
|
2
|
+
export default config
|
package/package.json
CHANGED
|
@@ -1,50 +1,53 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
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
|
+
}
|
package/pnpm-workspace.yaml
CHANGED
|
@@ -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/testdata/test.json
CHANGED
package/.commitlintrc.yaml
DELETED
package/.cz.toml
DELETED
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"
|