Skip to content

Commit 233e3ea

Browse files
zax-xyzrizmanter11
andauthored
chore(eslint): add prettier plugin (#99)
catches prettier inconsistencies in linting before changes get pushed to prevent issues like with what happened with #96 also add eslint-config-prettier to disable any rules that may conflict with prettier just in case Co-authored-by: Riz Manter <[email protected]>
1 parent a6ce96c commit 233e3ea

File tree

3 files changed

+89
-1
lines changed

3 files changed

+89
-1
lines changed

.eslintrc.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "eslint:recommended",
2+
"extends": ["eslint:recommended", "prettier"],
33
"env": {
44
"node": true,
55
"es6": true
@@ -9,6 +9,7 @@
99
"ecmaVersion": 2021,
1010
"requireConfigFile": false
1111
},
12+
"plugins": ["prettier"],
1213
"rules": {
1314
"arrow-spacing": ["warn", { "before": true, "after": true }],
1415
"brace-style": ["error", "1tbs", { "allowSingleLine": true }],
@@ -34,6 +35,7 @@
3435
"no-var": "error",
3536
"object-curly-spacing": ["error", "always"],
3637
"prefer-const": "error",
38+
"prettier/prettier": "error",
3739
"semi": ["error", "always"],
3840
"space-before-blocks": "error",
3941
"space-in-parens": "error",

package-lock.json

Lines changed: 84 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@
4848
"@babel/core": "7.19.1",
4949
"@babel/eslint-parser": "7.19.1",
5050
"eslint": "8.23.1",
51+
"eslint-config-prettier": "8.5.0",
52+
"eslint-plugin-prettier": "4.2.1",
5153
"node-pre-gyp": "0.12.0",
5254
"prettier": "2.7.1"
5355
}

0 commit comments

Comments
 (0)