Skip to content

Commit 5439525

Browse files
authored
chore: format JSON files in Trunk (#19541)
1 parent 75adc99 commit 5439525

File tree

7 files changed

+86
-87
lines changed

7 files changed

+86
-87
lines changed

.c8rc

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
{
2-
"include": [
3-
"bin/**/*.js",
4-
"conf/**/*.js",
5-
"lib/**/*.js"
6-
],
7-
"reporter": [
8-
"lcov",
9-
"text-summary",
10-
"cobertura"
11-
],
12-
"sourceMap": true
2+
"include": ["bin/**/*.js", "conf/**/*.js", "lib/**/*.js"],
3+
"reporter": ["lcov", "text-summary", "cobertura"],
4+
"sourceMap": true
135
}

.github/renovate.json5

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
11
{
2-
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3-
"extends": [
4-
"config:recommended",
5-
":approveMajorUpdates",
6-
":semanticCommitScopeDisabled"
7-
],
8-
"ignorePresets": [":semanticPrefixFixDepsChoreOthers"],
9-
"labels": ["dependencies"],
2+
$schema: "https://docs.renovatebot.com/renovate-schema.json",
3+
extends: [
4+
"config:recommended",
5+
":approveMajorUpdates",
6+
":semanticCommitScopeDisabled",
7+
],
8+
ignorePresets: [":semanticPrefixFixDepsChoreOthers"],
9+
labels: ["dependencies"],
1010

11-
// Wait well over npm's three day window for any new package as a precaution against malicious publishes
12-
// https://docs.npmjs.com/policies/unpublish/#packages-published-less-than-72-hours-ago
13-
"minimumReleaseAge": "7 days",
11+
// Wait well over npm's three day window for any new package as a precaution against malicious publishes
12+
// https://docs.npmjs.com/policies/unpublish/#packages-published-less-than-72-hours-ago
13+
minimumReleaseAge: "7 days",
1414

15-
"packageRules": [
16-
{
17-
"description": "Use the deps:actions label for github-action manager updates (this means Renovate's github-action manager).",
18-
"addLabels": ["deps:actions"],
19-
"matchManagers": ["github-actions"]
20-
},
21-
{
22-
"description": "Use the deps:npm label for npm manager packages (this means Renovate's npm manager).",
23-
"addLabels": ["deps:npm"],
24-
"matchManagers": ["npm"]
25-
},
26-
{
27-
"description": "Group Babel packages into a single PR.",
28-
"groupName": "babel",
29-
"matchPackagePrefixes": ["@babel", "babel-"]
30-
},
31-
{
32-
"description": "Group metascraper packages into a single PR.",
33-
"groupName": "metascraper",
34-
"matchPackagePrefixes": ["metascraper"]
35-
}
36-
]
15+
packageRules: [
16+
{
17+
description: "Use the deps:actions label for github-action manager updates (this means Renovate's github-action manager).",
18+
addLabels: ["deps:actions"],
19+
matchManagers: ["github-actions"],
20+
},
21+
{
22+
description: "Use the deps:npm label for npm manager packages (this means Renovate's npm manager).",
23+
addLabels: ["deps:npm"],
24+
matchManagers: ["npm"],
25+
},
26+
{
27+
description: "Group Babel packages into a single PR.",
28+
groupName: "babel",
29+
matchPackagePrefixes: ["@babel", "babel-"],
30+
},
31+
{
32+
description: "Group metascraper packages into a single PR.",
33+
groupName: "metascraper",
34+
matchPackagePrefixes: ["metascraper"],
35+
},
36+
],
3737
}

.prettierrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
"overrides": [
77
{
8-
"files": ["*.json"],
8+
"files": ["*.{json,jsonc,json5}", ".c8rc"],
99
"options": {
1010
"tabWidth": 2,
1111
"useTabs": false

.trunk/trunk.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,16 @@ tools:
2626

2727
# This is the section where you manage your linters. (https://docs.trunk.io/check/configuration)
2828
lint:
29+
files:
30+
- name: json
31+
extensions:
32+
- json
33+
- jsonc
34+
- json5
35+
- c8rc
2936
definitions:
3037
- name: eslint
31-
files: [typescript, javascript, yaml] # Add YAML to default files.
38+
files: [typescript, javascript, yaml, json] # Add YAML and JSON to default files.
3239
hold_the_line: false
3340
commands:
3441
- name: lint

docs/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,9 @@
5151
"sass": "^1.85.1",
5252
"stylelint": "^14.13.0",
5353
"stylelint-config-html": "^1.1.0",
54-
"stylelint-config-standard": "^29.0.0",
5554
"stylelint-config-prettier": "^9.0.5",
55+
"stylelint-config-standard": "^29.0.0",
5656
"stylelint-config-standard-scss": "^5.0.0",
57-
"stylelint-config-prettier": "^9.0.5",
5857
"tap-spot": "^1.1.2"
5958
},
6059
"engines": {

eslint.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ module.exports = defineConfig([
202202
files: ["knip.jsonc"],
203203
plugins: { json },
204204
language: "json/jsonc",
205+
languageOptions: { allowTrailingCommas: true },
205206
extends: ["json/recommended"],
206207
},
207208

knip.jsonc

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
11
{
2-
"workspaces": {
3-
".": {
4-
// These entries are complementary to the ones found in package.json
5-
"entry": ["lib/rules/index.js", "tools/internal-rules/*.js"],
6-
"project": ["{conf,lib,tools}/**/*.js"],
7-
"mocha": {
8-
"entry": [
9-
"tests/{bin,conf,lib,tools}/**/*.js", // see Makefile.js
10-
"tests/_utils/test-lazy-loading-rules.js",
11-
],
12-
"project": ["tests/**/*.js"],
13-
},
14-
"ignore": [
15-
// If Knip would consider exports as named, their usage is too dynamic: globals[`es${ecmaVersion}`]
16-
// An alternative is to add `__esModule: true` to the export and we can remove it here from the ignores:
17-
"conf/globals.js",
18-
// These contain unresolved imports and other oddities:
19-
"tests/bench/large.js",
20-
"tests/lib/rule-tester/rule-tester.js",
21-
"tests/performance/jshint.js",
22-
// Many are required using dynamic paths such as `fs.readFileSync(path.join())`:
23-
"tests/fixtures/**",
24-
],
25-
"ignoreDependencies": [
26-
"c8",
27-
// Optional peer dependency used for loading TypeScript configuration files
28-
"jiti",
29-
],
30-
},
31-
"docs": {
32-
"ignore": ["src/assets/js/search.js", "_examples/**"],
33-
},
34-
// Workspaces with default configs:
35-
"packages/*": {
36-
"ignore": ["tests/types/**"],
37-
"ignoreDependencies": ["eslint"],
38-
},
39-
"tools/internal-rules": {},
40-
},
2+
"workspaces": {
3+
".": {
4+
// These entries are complementary to the ones found in package.json
5+
"entry": ["lib/rules/index.js", "tools/internal-rules/*.js"],
6+
"project": ["{conf,lib,tools}/**/*.js"],
7+
"mocha": {
8+
"entry": [
9+
"tests/{bin,conf,lib,tools}/**/*.js", // see Makefile.js
10+
"tests/_utils/test-lazy-loading-rules.js",
11+
],
12+
"project": ["tests/**/*.js"],
13+
},
14+
"ignore": [
15+
// If Knip would consider exports as named, their usage is too dynamic: globals[`es${ecmaVersion}`]
16+
// An alternative is to add `__esModule: true` to the export and we can remove it here from the ignores:
17+
"conf/globals.js",
18+
// These contain unresolved imports and other oddities:
19+
"tests/bench/large.js",
20+
"tests/lib/rule-tester/rule-tester.js",
21+
"tests/performance/jshint.js",
22+
// Many are required using dynamic paths such as `fs.readFileSync(path.join())`:
23+
"tests/fixtures/**",
24+
],
25+
"ignoreDependencies": [
26+
"c8",
27+
// Optional peer dependency used for loading TypeScript configuration files
28+
"jiti",
29+
],
30+
},
31+
"docs": {
32+
"ignore": ["src/assets/js/search.js", "_examples/**"],
33+
},
34+
// Workspaces with default configs:
35+
"packages/*": {
36+
"ignore": ["tests/types/**"],
37+
"ignoreDependencies": ["eslint"],
38+
},
39+
"tools/internal-rules": {},
40+
},
4141
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy