-
-
Notifications
You must be signed in to change notification settings - Fork 32
build: migrate prettier config to typescript and remove eslint-plugin-prettier #540
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
2ce1383
5d0a617
bc19ea0
4d49402
dcf7d10
45d971c
3931995
1ac25c0
2f0fd99
7b692cb
b162f8a
262946e
06951c7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
"extends": ["github>eslint/eslint//.github/renovate.json5"] | ||
"$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
"extends": ["github>eslint/eslint//.github/renovate.json5"] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
{ | ||
"line-length": false, | ||
"no-inline-html": false | ||
"no-inline-html": false, | ||
"no-duplicate-heading": { | ||
"siblings_only": true | ||
} | ||
} |
This file was deleted.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
The MIT License (MIT) | ||
===================== | ||
# The MIT License (MIT) | ||
|
||
Copyright © 2016 Teddy Katz | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,10 +12,12 @@ | |
"license": "MIT", | ||
"scripts": { | ||
"build": "tsup", | ||
"format": "prettier --write .", | ||
"format:check": "prettier --check .", | ||
"lint": "npm-run-all --continue-on-error --aggregate-output --parallel lint:*", | ||
"lint:docs": "markdownlint \"**/*.md\"", | ||
"lint:eslint-docs": "npm-run-all -s build \"update:eslint-docs -- --check\"", | ||
"lint:js": "eslint --cache --ignore-pattern \"**/*.md\" .", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Isn't the path needed? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, it's optional. It defaults to current working directory. I can add it back, if you prefer? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fine to use default then. |
||
"lint:js": "eslint --cache --ignore-pattern \"**/*.md\"", | ||
"lint:js-docs": "eslint --no-inline-config \"**/*.md\"", | ||
"lint:package-json": "npmPkgJsonLint .", | ||
"release": "release-it", | ||
|
@@ -69,7 +71,6 @@ | |
"eslint-doc-generator": "^2.2.2", | ||
"eslint-plugin-markdown": "^5.1.0", | ||
"eslint-plugin-n": "^17.21.0", | ||
"eslint-plugin-prettier": "^5.5.3", | ||
"eslint-plugin-unicorn": "^56.0.1", | ||
"eslint-remote-tester": "^4.0.3", | ||
"eslint-scope": "^8.0.1", | ||
|
@@ -80,7 +81,7 @@ | |
"markdownlint-cli": "^0.43.0", | ||
"npm-package-json-lint": "^8.0.0", | ||
"npm-run-all2": "^7.0.1", | ||
"prettier": "^3.4.1", | ||
"prettier": "^3.6.2", | ||
"release-it": "^17.2.0", | ||
"tsup": "^8.5.0", | ||
"typescript": "^5.9.2", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { type Config } from 'prettier'; | ||
|
||
const config: Config = { | ||
singleQuote: true, | ||
}; | ||
|
||
export default config; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we technically want to include this last to ensure it overrides any incompatible config?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will generally put the prettier config after all of the reusable configs, but before any configs that I've created with overrides / additional rules. The idea being that anything I add myself is an intentional choice and should take precedence, which I think aligns with the spirit of that documentation. With that said, it's currently before the TS Configs, so I should at least move it to be after those (I authored this PR before adding the TS configs). Would you prefer I move it all the way to the end or just after the ts configs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your reasoning makes sense. I'll leave it up to you.