Skip to content

Commit

Permalink
Update: Remove eslint-plugin-prettier extends (#261)
Browse files Browse the repository at this point in the history
  • Loading branch information
stormwarning authored Mar 17, 2022
1 parent 93eed0e commit e15148d
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 63 deletions.
9 changes: 9 additions & 0 deletions .changeset/violet-chairs-kneel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@zazen/eslint-config': minor
---

Remove `eslint-plugin-prettier` from extended rulesets

Per [Prettier’s integration recommendations](https://prettier.io/docs/en/integrating-with-linters.html), Prettier is run separately from
ESLint. Should update `lint-staged` config to include `prettier --write` for
appropriate files.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Removed for now until/unless I get more opinionated about Vue code. For now, ins
extends: [
'plugin:vue/[vue3-]recommended',
'@zazen',
'plugin:prettier/recommended',
'prettier',
],
rules: { /**/ },
}
Expand Down
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ module.exports = {
* @see https://github.com/sindresorhus/eslint-plugin-unicorn
* @see https://github.com/import-js/eslint-plugin-import
* @see https://github.com/xjamundx/eslint-plugin-promise
* @see https://github.com/prettier/eslint-plugin-prettier
* @see https://github.com/prettier/eslint-config-prettier
*/
extends: [
'xo',
'plugin:unicorn/recommended',
'plugin:import/recommended',
'plugin:promise/recommended',
'plugin:prettier/recommended',
'prettier',
],
rules: {
'no-console': 'warn',
Expand Down
2 changes: 1 addition & 1 deletion node.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports = {
/**
* @see https://github.com/weiran-zsd/eslint-plugin-node
*/
extends: ['plugin:prettier/recommended'],
extends: ['prettier'],
rules: {
/**
* We have this enabled in addition to `import/extensions` as
Expand Down
58 changes: 7 additions & 51 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,16 @@
],
"scripts": {
"changeset": "changeset add",
"eslint-check": "eslint --print-config . | eslint-config-prettier-check",
"lint": "eslint .",
"prepare": "husky install",
"release": "changeset publish",
"test": "ava"
},
"lint-staged": {
"*.{js,cjs,mjs}": "eslint --fix",
"*.{js,cjs,mjs}": [
"eslint --fix",
"prettier --write"
],
"package.json": "prettier --write"
},
"prettier": {
Expand All @@ -42,7 +44,6 @@
"eslint-plugin-import": "2.25.4",
"eslint-plugin-n": "14.0.0",
"eslint-plugin-prefer-let": "3.0.1",
"eslint-plugin-prettier": "4.0.0",
"eslint-plugin-promise": "6.0.0",
"eslint-plugin-unicorn": "40.1.0"
},
Expand Down
6 changes: 1 addition & 5 deletions typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@ module.exports = {
* @see https://github.com/xojs/eslint-config-xo-typescript
* @see https://github.com/cartant/eslint-plugin-etc
*/
extends: [
'xo-typescript',
'plugin:etc/recommended',
'plugin:prettier/recommended',
],
extends: ['xo-typescript', 'plugin:etc/recommended', 'prettier'],
rules: {
'import/named': 'off',

Expand Down

0 comments on commit e15148d

Please sign in to comment.