Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 701e38c

Browse filesBrowse files
thefourtheyervagg
authored andcommitted
tools: enable prefer-const eslint rule
Description from: http://eslint.org/docs/rules/prefer-const.html If a variable is never modified, using the `const` declaration is better. `const` declaration tells readers, "this variable is never modified," reducing cognitive load and improving maintainability. Refer: #3118 PR-URL: #3152 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
1 parent 1929d5b commit 701e38c
Copy full SHA for 701e38c

File tree

Expand file treeCollapse file tree

1 file changed

+5
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-0
lines changed
Open diff view settings
Collapse file

‎.eslintrc‎

Copy file name to clipboardExpand all lines: .eslintrc
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ rules:
7070
# require space after keywords, eg 'for (..)'
7171
space-after-keywords: 2
7272

73+
# ECMAScript 6
74+
# list: http://eslint.org/docs/rules/#ecmascript-6
75+
## Suggest using 'const' wherever possible
76+
prefer-const: 2
77+
7378
# Strict Mode
7479
# list: https://github.com/eslint/eslint/tree/master/docs/rules#strict-mode
7580
## 'use strict' on top

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.