Skip to content
This repository was archived by the owner on Mar 7, 2019. It is now read-only.

Commit 0d1f6e9

Browse files
Move some unused frontend rules to standard/
1 parent 6fb88c1 commit 0d1f6e9

File tree

3 files changed

+15
-17
lines changed

3 files changed

+15
-17
lines changed

standard/best-practices.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ module.exports = {
2525
// instead.
2626
'func-names': 1,
2727

28+
// Disallow Use of Alert
29+
// This rule is aimed at catching debugging code that should be removed and popup UI elements
30+
// that should be replaced with less obtrusive, custom UIs.
31+
'no-alert': 1,
32+
2833
// Disallow lexical declarations in case/default clauses
2934
// This rule disallows lexical declarations (let, const, function and class) in case/default
3035
// clauses. The reason is that the lexical declaration is visible in the entire switch block but

standard/known-errors.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,11 @@ module.exports = {
9797
// character for example.
9898
'no-irregular-whitespace': 2,
9999

100+
// Disallow Iterator (__iterator__)
101+
// This rule is aimed at preventing errors that may arise from using the __iterator__ property,
102+
// which is not implemented in several browsers.
103+
'no-iterator': 2,
104+
100105
// Disallow negated left operand of `in` operator
101106
'no-negated-in-lhs': 2,
102107

@@ -112,6 +117,11 @@ module.exports = {
112117
// This rule aims to eliminate errors due to multiple spaces inside of a regular expression.
113118
'no-regex-spaces': 2,
114119

120+
// Disallow Script URLs
121+
// Using javascript: URLs is considered by some as a form of eval. Code passed in javascript:
122+
// URLs has to be parsed and evaluated by the browser in the same way that eval is processed.
123+
'no-script-url': 2,
124+
115125
// Disallow Self Assignment
116126
// Self assignments have no effect, so probably those are an error due to incomplete
117127
// refactoring. Those indicate that what you should do is still remaining.

unused.js

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,6 @@ module.exports = {
1818
// Unused, too restrictive.
1919
'id-blacklist': 0,
2020

21-
// Disallow Use of Alert
22-
// Unused, front-end specific. Should be moved to appropriate front-end config as soon as it
23-
// exists.
24-
'no-alert': 0,
25-
2621
// Disallow arrow functions where they could be confused with comparisons
2722
'no-confusing-arrow': 0,
2823

@@ -40,11 +35,6 @@ module.exports = {
4035
// Unused, front-end specific.
4136
'no-implicit-globals': 0,
4237

43-
// Disallow Iterator (__iterator__)
44-
// Unused, front-end specific. Should be moved to appropriate front-end config as soon as it
45-
// exists.
46-
'no-iterator': 0,
47-
4838
// Disallow Multiline Strings
4939
// Unused, seems handy. This rule should be enabled when pre-ES5 compatibility is required.
5040
'no-multi-str': 0,
@@ -54,13 +44,6 @@ module.exports = {
5444
// default values (if ES6's function parameter defaults are not available).
5545
'no-param-reassign': 0,
5646

57-
// Disallow Script URLs
58-
// Using javascript: URLs is considered by some as a form of eval. Code passed in javascript:
59-
// URLs has to be parsed and evaluated by the browser in the same way that eval is processed.
60-
// Unused, front-end specific. Should be moved to appropriate front-end config as soon as it
61-
// exists.
62-
'no-script-url': 0,
63-
6447
// Disallow ++ and --
6548
// Unused, these operators are quite useful as long as whitespace is used responsibly around
6649
// them.

0 commit comments

Comments
 (0)