Skip to content

Commit ed53de1

Browse files
fix: disable jsonc/comma-dangle (#1258)
## PR Checklist - [x] Addresses an existing open issue: fixes #1257 - [x] That issue was marked as [`status: accepting prs`](https://github.com/JoshuaKGoldberg/create-typescript-app/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22) - [x] Steps in [CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/create-typescript-app/blob/main/.github/CONTRIBUTING.md) were taken ## Overview Disables the `jsonc/comma-dangle` rule altogether so as to not conflict with Prettier. I suppose if any tool doesn't support trailing commas in a file, it'll report that directly. And most tools generally support jsonc anyway. 🤷
1 parent 509f47c commit ed53de1

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

.eslintrc.cjs

+1
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ module.exports = {
9696
files: ["*.json", "*.jsonc"],
9797
parser: "jsonc-eslint-parser",
9898
rules: {
99+
"jsonc/comma-dangle": "off",
99100
"jsonc/sort-keys": "error",
100101
},
101102
},

src/steps/writing/creation/createESLintRC.test.ts

+1
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ describe("createESLintRC", () => {
183183
files: ["*.json", "*.jsonc"],
184184
parser: "jsonc-eslint-parser",
185185
rules: {
186+
"jsonc/comma-dangle": "off",
186187
"jsonc/sort-keys": "error",
187188
},
188189
},

src/steps/writing/creation/createESLintRC.ts

+1
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ module.exports = {
124124
files: ["*.json", "*.jsonc"],
125125
parser: "jsonc-eslint-parser",
126126
rules: {
127+
"jsonc/comma-dangle": "off",
127128
"jsonc/sort-keys": "error",
128129
},
129130
},

0 commit comments

Comments
 (0)