Skip to content
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

Move stylistic eslint rules to prettier #3099

Merged
merged 1 commit into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
{
"env": {
"es2021": true,
"node": true
"es2021": true,
"node": true
},
"extends": "eslint:recommended",
"extends": ["eslint:recommended", "prettier"],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
"ecmaVersion": "latest",
"sourceType": "module"
},
"rules": {
"indent": ["error", "tab"],
"linebreak-style": ["error", "unix"],
"quotes": ["error", "double"],
"semi": ["error", "always"],
"no-async-promise-executor": "warn",
"no-prototype-builtins": "warn"
}
Expand Down
4 changes: 4 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{
"useTabs": true,
"singleQuote": false,
"semi": true,
"endOfLine": "lf",
Copy link
Contributor Author

@uncenter uncenter Nov 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of these options are duplicates since Prettier respects the .editorconfig file settings, your choice if you want to be extra specific here (useTabs and endOfLine are already in the .editorconfig).

"arrowParens": "always",
"printWidth": 100
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
"ava": "^5.3.1",
"c8": "^8.0.1",
"eslint": "^8.53.0",
"eslint-config-prettier": "^9.0.0",
"husky": "^8.0.3",
"js-yaml": "^4.1.0",
"jsdoc": "^4.0.2",
Expand Down