diff --git a/.eslintrc.js b/.eslintrc.js index 5203ae4c34..555555964c 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -127,18 +127,13 @@ module.exports = { 'plugin:@typescript-eslint/recommended', ], rules: { + // https://typescript-eslint.io/rules/no-use-before-define#how-to-use + 'no-use-before-define': 'off', + // TODO rules with a lot of errors to be fixed manually, fix in a separate PR + '@typescript-eslint/ban-types': 'off', // 16 eslint errors only, help wanted! '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/triple-slash-reference': 'off', - - // TODO - 'camelcase': 'off', - 'no-alert': 'off', - 'no-use-before-define': 'off', - '@internal/eqeqeq': 'off', - '@typescript-eslint/ban-types': 'off', - '@typescript-eslint/no-empty-function': 'off', - '@typescript-eslint/no-unused-vars': 'off', - } + }, }], }; diff --git a/types/fomantic-ui-tests.ts b/types/fomantic-ui-tests.ts index f5ce699bff..2986cc6b10 100644 --- a/types/fomantic-ui-tests.ts +++ b/types/fomantic-ui-tests.ts @@ -40,8 +40,8 @@ $().calendar({ }); // $ExpectType JQuery $.flyout('alert', 'hello'); // $ExpectType JQuery -$.flyout('confirm', 'Are you sure?', function () {}); // $ExpectType JQuery -$.flyout('prompt', 'Enter Code', function () {}); // $ExpectType JQuery +$.flyout('confirm', 'Are you sure?', function () { /* make eslint happy */ }); // $ExpectType JQuery +$.flyout('prompt', 'Enter Code', function () { /* make eslint happy */ }); // $ExpectType JQuery $.fn.flyout.settings.templates.greet = function (username) { return { @@ -75,7 +75,7 @@ $().form({ { type: 'isExactly[cat]', prompt: function (value) { - if (value == 'dog') { + if (value === 'dog') { return 'I told you to put cat, not dog!'; } @@ -122,8 +122,8 @@ $().form({ }, }); // $ExpectType JQuery -$.fn.form.settings.rules.date = function (str_date: string) { - return true; +$.fn.form.settings.rules.date = function (dateStr: string) { + return dateStr !== ''; }; $.modal('alert', { @@ -184,5 +184,5 @@ $.toast({ }); $().transition('shake', '200ms'); -$().transition('horizontal flip', 500, function () { alert('done!'); }); +$().transition('horizontal flip', 500, function () { /* make eslint happy */ }); $().transition('fade up');