-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc.js
97 lines (85 loc) · 2.35 KB
/
.eslintrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
/**
* JavaScript kodunda bulunan sorunlu kalıpları
* tanımlamak için statik kod analiz tanımları.
*/
module.exports = {
/**
* Önceden tanımlanmış global değişkenleri tanımlar
* @see https://eslint.org/docs/user-guide/configuring#specifying-environments
*/
env: {
/// Tarayıcı genel değişkenleri.
browser: true,
/// Modüller hariç tüm ECMAScript 6 özelliklerini etkinleştirir.
es6: true,
/// Node.js genel değişkenleri ve Node.js kapsamı.
node: true,
/// Test ve cover
jest: true,
// Mocha test framework tüm değişkenlerini yükler.
mocha: true,
},
/**
* Her kuralı kapatabilir ve yalnızca temel sözdizimi doğrulamasıyla çalışabilir.
*
* @see https://eslint.org/docs/user-guide/configuring#using-eslintrecommended
*/
extends: "eslint:recommended",
/**
* Ayrıştırıcı Seçeneklerini Belirleme.
*
* @see https://eslint.org/docs/user-guide/configuring#specifying-parser-options
*/
parserOptions: {
/**
* Ecma Script versiyon
*/
ecmaVersion: 6,
},
/**
* Amaçlarını anlamanıza yardımcı olmak için kategoriye göre gruplandırılmıştır.
*
* @see https://eslint.org/docs/rules
*/
rules: {
/**
* Tutarlı girinti uygula (girinti).
*
* @see https://eslint.org/docs/rules/indent
*/
indent: ["error", 2],
/**
* Tutarlı linebreak stilini uygula (linebreak stili).
*
* Çapraz platform rolü
* @see https://eslint.org/docs/rules/linebreak-style
*/
"linebreak-style": [
"error",
process.platform === "win32" ? "windows" : "unix",
],
/**
* Ters tırnak, çift veya tek tırnak (tırnak) tutarlı kullanımını zorunlu kılmak.
*
* @see https://eslint.org/docs/rules/quotes
*/
quotes: ["error", "single"],
/**
* Noktalı virgül gerektirir veya izin vermez.
*
* @see https://eslint.org/docs/rules/semi
*/
semi: ["error", "never"],
/**
* Kullanımına izin verme console(konsol yok).
*
* @see https://eslint.org/docs/rules/no-console
*/
"no-console": "error",
/**
* Değişken bildirimlerden sonra boş bir satır gerektirme veya buna izin verme
* @see https://eslint.org/docs/rules/newline-after-var
*/
"newline-after-var": ["error", "always"],
},
};