Parcourir la source

:pencil: added formatting and style rules for eslint and prettier

master
j il y a 5 ans
Parent
révision
7b14f7265a
2 fichiers modifiés avec 38 ajouts et 0 suppressions
  1. 32
    0
      backend/.eslintrc
  2. 6
    0
      backend/.prettierrc

+ 32
- 0
backend/.eslintrc Voir le fichier

@@ -0,0 +1,32 @@
1
+{
2
+    "env": {
3
+        "browser": true,
4
+        "commonjs": true,
5
+        "es2021": true
6
+    },
7
+    "extends": [
8
+        "eslint:recommended",
9
+        "prettier"
10
+    ],
11
+    "parserOptions": {
12
+        "ecmaVersion": 12
13
+    },
14
+    "rules": {
15
+        "indent": [
16
+            "error",
17
+            4
18
+        ],
19
+        "linebreak-style": [
20
+            "error",
21
+            "unix"
22
+        ],
23
+        "quotes": [
24
+            "error",
25
+            "single"
26
+        ],
27
+        "semi": [
28
+            "error",
29
+            "never"
30
+        ]
31
+    }
32
+}

+ 6
- 0
backend/.prettierrc Voir le fichier

@@ -0,0 +1,6 @@
1
+trailingComma: "all"
2
+tabWidth: 4
3
+semi: false
4
+singleQuote: true
5
+bracketSpacing: true
6
+arrowParens: "avoid"

Chargement…
Annuler
Enregistrer