Skip to content

Commit 2753e1d

Browse files
authored
feat(lint): remove global undefined variable shadow
Modernize code using eslint advisory introduced in GH-2596. This PR focuses on fixing no-shadow-restricted-names rule. Discussed in #2589 (comment), it fixes the rule cleanly and the impact on the total JS size is minimal (<1%).
1 parent b0a1399 commit 2753e1d

26 files changed

+25
-26
lines changed

.eslintrc.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ module.exports = {
115115
eqeqeq: 'off', // about 20 errors to be fixed manually
116116
'global-require': 'off', // about 30 errors to be fixed manually
117117
'no-shadow': 'off', // about 220 errors to be fixed manually
118-
'no-shadow-restricted-names': 'off', // TODO https://github.com/fomantic/Fomantic-UI/pull/2604
119118
'prefer-arrow-callback': 'off', // about 350 errors (all autofixable)
120119
},
121120
reportUnusedDisableDirectives: true,

src/definitions/behaviors/api.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*/
1010

11-
(function ($, window, document, undefined) {
11+
(function ($, window, document) {
1212
'use strict';
1313

1414
function isWindow(obj) {

src/definitions/behaviors/form.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*/
1010

11-
(function ($, window, document, undefined) {
11+
(function ($, window, document) {
1212
'use strict';
1313

1414
function isFunction(obj) {

src/definitions/behaviors/state.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*/
1010

11-
(function ($, window, document, undefined) {
11+
(function ($, window, document) {
1212
'use strict';
1313

1414
function isFunction(obj) {

src/definitions/behaviors/visibility.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*/
1010

11-
(function ($, window, document, undefined) {
11+
(function ($, window, document) {
1212
'use strict';
1313

1414
function isFunction(obj) {

src/definitions/globals/site.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*/
1010

11-
(function ($, window, document, undefined) {
11+
(function ($, window, document) {
1212
'use strict';
1313

1414
function isFunction(obj) {

src/definitions/modules/accordion.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*/
1010

11-
(function ($, window, document, undefined) {
11+
(function ($, window, document) {
1212
'use strict';
1313

1414
function isFunction(obj) {

src/definitions/modules/calendar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*/
1010

11-
(function ($, window, document, undefined) {
11+
(function ($, window, document) {
1212
'use strict';
1313

1414
function isFunction(obj) {

src/definitions/modules/checkbox.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*/
1010

11-
(function ($, window, document, undefined) {
11+
(function ($, window, document) {
1212
'use strict';
1313

1414
function isFunction(obj) {

src/definitions/modules/dimmer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*/
1010

11-
(function ($, window, document, undefined) {
11+
(function ($, window, document) {
1212
'use strict';
1313

1414
function isFunction(obj) {

0 commit comments

Comments
 (0)