Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eslint coding standards #534

Merged
merged 2 commits into from
Dec 14, 2024

Conversation

gselderslaghs
Copy link
Member

Proposed changes

Creating a follow up of #506 with minimal changes only to config in order to discuss ESLint configurations
As per PR #508 would introduce a magnificent change and would be very difficult to review, for now stripped off the prettier plugin, only installed dependencies and run a linter report
Hardened ESLint conditions compared to PR #508

Linter output

/Users/geertselderslaghs/dev/materialize/ci/compress.js
  1:12  error  A `require()` style import is forbidden  @typescript-eslint/no-require-imports
  2:18  error  A `require()` style import is forbidden  @typescript-eslint/no-require-imports

/Users/geertselderslaghs/dev/materialize/index.js
  1:26  error  A `require()` style import is forbidden  @typescript-eslint/no-require-imports

/Users/geertselderslaghs/dev/materialize/index.mjs
  5:7  error  'html' is assigned a value but never used  @typescript-eslint/no-unused-vars

/Users/geertselderslaghs/dev/materialize/rollup.config.ts
  7:8  error  'zip' is defined but never used  @typescript-eslint/no-unused-vars

/Users/geertselderslaghs/dev/materialize/spec/helpers/helper.js
    1:1   warning  Unused eslint-disable directive (no problems were reported from 'no-undef')
    2:1   warning  Unused eslint-disable directive (no problems were reported from 'no-unused-vars')
  124:10  error    'XloadHtml' is defined but never used                                              @typescript-eslint/no-unused-vars
  143:10  error    'XunloadFixtures' is defined but never used                                        @typescript-eslint/no-unused-vars
  155:15  error    'result' is never reassigned. Use 'const' instead                                  prefer-const
  193:15  error    'result' is never reassigned. Use 'const' instead                                  prefer-const
  207:15  error    'result' is never reassigned. Use 'const' instead                                  prefer-const
  227:15  error    'result' is never reassigned. Use 'const' instead                                  prefer-const
  240:15  error    'result' is never reassigned. Use 'const' instead                                  prefer-const

/Users/geertselderslaghs/dev/materialize/spec/tests/autocomplete/autocompleteSpec.js
   99:43  error  'text' is defined but never used                           @typescript-eslint/no-unused-vars
  117:11  error  'normal' is never reassigned. Use 'const' instead          prefer-const
  118:11  error  'autocompleteEl' is never reassigned. Use 'const' instead  prefer-const
  132:11  error  'normal' is never reassigned. Use 'const' instead          prefer-const
  133:11  error  'autocompleteEl' is never reassigned. Use 'const' instead  prefer-const

/Users/geertselderslaghs/dev/materialize/spec/tests/cards/cardsSpec.js
    1:1   warning  Unused eslint-disable directive (no problems were reported from 'no-undef')
  153:11  error    'cardImage' is never reassigned. Use 'const' instead                         prefer-const
  154:11  error    'cardContent' is never reassigned. Use 'const' instead                       prefer-const
  155:11  error    'cardAction' is never reassigned. Use 'const' instead                        prefer-const
  156:11  error    'smallRect' is never reassigned. Use 'const' instead                         prefer-const
  157:11  error    'cardImageRect' is never reassigned. Use 'const' instead                     prefer-const
  158:11  error    'cardContentRect' is never reassigned. Use 'const' instead                   prefer-const
  159:11  error    'cardActionRect' is never reassigned. Use 'const' instead                    prefer-const
  174:11  error    'cardImage' is never reassigned. Use 'const' instead                         prefer-const
  175:11  error    'cardContent' is never reassigned. Use 'const' instead                       prefer-const
  176:11  error    'cardAction' is never reassigned. Use 'const' instead                        prefer-const
  177:11  error    'mediumRect' is never reassigned. Use 'const' instead                        prefer-const
  178:11  error    'cardImageRect' is never reassigned. Use 'const' instead                     prefer-const
  179:11  error    'cardContentRect' is never reassigned. Use 'const' instead                   prefer-const
  180:11  error    'cardActionRect' is never reassigned. Use 'const' instead                    prefer-const
  195:11  error    'cardImage' is never reassigned. Use 'const' instead                         prefer-const
  196:11  error    'cardContent' is never reassigned. Use 'const' instead                       prefer-const
  197:11  error    'cardAction' is never reassigned. Use 'const' instead                        prefer-const
  198:11  error    'largeRect' is never reassigned. Use 'const' instead                         prefer-const
  199:11  error    'cardImageRect' is never reassigned. Use 'const' instead                     prefer-const
  200:11  error    'cardContentRect' is never reassigned. Use 'const' instead                   prefer-const
  201:11  error    'cardActionRect' is never reassigned. Use 'const' instead                    prefer-const

/Users/geertselderslaghs/dev/materialize/spec/tests/carousel/carouselSpec.js
  1:1  warning  Unused eslint-disable directive (no problems were reported from 'no-undef')

/Users/geertselderslaghs/dev/materialize/spec/tests/chips/chipsSpec.js
   1:1   warning  Unused eslint-disable directive (no problems were reported from 'no-undef')
  59:13  error    'numChips' is never reassigned. Use 'const' instead                          prefer-const
  60:13  error    'oneChip' is never reassigned. Use 'const' instead                           prefer-const

/Users/geertselderslaghs/dev/materialize/spec/tests/collapsible/collapsibleSpec.js
    1:1   warning  Unused eslint-disable directive (no problems were reported from 'no-undef')
   83:11  error    'headers' is never reassigned. Use 'const' instead                           prefer-const
   84:11  error    'bodies' is never reassigned. Use 'const' instead                            prefer-const
  106:11  error    'bodies' is never reassigned. Use 'const' instead                            prefer-const
  108:13  error    'headerLi' is never reassigned. Use 'const' instead                          prefer-const
  139:11  error    'bodies' is never reassigned. Use 'const' instead                            prefer-const
  147:13  error    'collapsibleInstance' is never reassigned. Use 'const' instead               prefer-const
  174:11  error    'firstHeader' is never reassigned. Use 'const' instead                       prefer-const
  175:11  error    'firstBody' is never reassigned. Use 'const' instead                         prefer-const
  176:11  error    'secondHeader' is never reassigned. Use 'const' instead                      prefer-const
  177:11  error    'secondBody' is never reassigned. Use 'const' instead                        prefer-const
  203:11  error    'listItems' is never reassigned. Use 'const' instead                         prefer-const
  204:11  error    'firstHeader' is never reassigned. Use 'const' instead                       prefer-const
  205:11  error    'firstBody' is never reassigned. Use 'const' instead                         prefer-const
  209:13  error    'listItemStyles' is never reassigned. Use 'const' instead                    prefer-const
  210:13  error    'marginLeft' is never reassigned. Use 'const' instead                        prefer-const
  211:13  error    'marginRight' is never reassigned. Use 'const' instead                       prefer-const

/Users/geertselderslaghs/dev/materialize/spec/tests/datepicker/datepickerSpec.js
  1:1  warning  Unused eslint-disable directive (no problems were reported from 'no-undef')

/Users/geertselderslaghs/dev/materialize/spec/tests/dropdown/dropdownSpec.js
  1:1  warning  Unused eslint-disable directive (no problems were reported from 'no-undef')

/Users/geertselderslaghs/dev/materialize/spec/tests/fab/fabSpec.js
  1:1  warning  Unused eslint-disable directive (no problems were reported from 'no-undef')

/Users/geertselderslaghs/dev/materialize/spec/tests/forms/formsSpec.js
  1:1  warning  Unused eslint-disable directive (no problems were reported from 'no-undef')

/Users/geertselderslaghs/dev/materialize/spec/tests/materialbox/materialboxSpec.js
  1:1  warning  Unused eslint-disable directive (no problems were reported from 'no-undef')

/Users/geertselderslaghs/dev/materialize/spec/tests/modal/modalSpec.js
    1:1   warning  Unused eslint-disable directive (no problems were reported from 'no-undef')
   71:13  error    'overlay' is never reassigned. Use 'const' instead                           prefer-const
   72:13  error    'overlayInDOM' is never reassigned. Use 'const' instead                      prefer-const
   77:15  error    'overlayInDOM' is never reassigned. Use 'const' instead                      prefer-const
   92:13  error    'overlay' is never reassigned. Use 'const' instead                           prefer-const
   93:13  error    'overlayInDOM' is never reassigned. Use 'const' instead                      prefer-const
   98:15  error    'overlayInDOM' is never reassigned. Use 'const' instead                      prefer-const
  114:13  error    'overlay' is never reassigned. Use 'const' instead                           prefer-const
  115:13  error    'overlayInDOM' is never reassigned. Use 'const' instead                      prefer-const
  120:15  error    'overlayInDOM' is never reassigned. Use 'const' instead                      prefer-const
  146:13  error    'overlay' is never reassigned. Use 'const' instead                           prefer-const

/Users/geertselderslaghs/dev/materialize/spec/tests/select/selectSpec.js
    1:1   warning  Unused eslint-disable directive (no problems were reported from 'no-undef')
  307:11  error    'optgroups' is never reassigned. Use 'const' instead                         prefer-const
  308:11  error    'browerSelectOptgroups' is never reassigned. Use 'const' instead             prefer-const
  323:11  error    'optgroups' is never reassigned. Use 'const' instead                         prefer-const
  324:11  error    'browerSelectOptgroups' is never reassigned. Use 'const' instead             prefer-const
  338:13  error    'secondOption' is never reassigned. Use 'const' instead                      prefer-const
  365:11  error    'originalVal' is never reassigned. Use 'const' instead                       prefer-const
  366:11  error    'optgroups' is never reassigned. Use 'const' instead                         prefer-const
  367:11  error    'browerSelectOptgroups' is never reassigned. Use 'const' instead             prefer-const
  381:13  error    'optgroup' is never reassigned. Use 'const' instead                          prefer-const

/Users/geertselderslaghs/dev/materialize/spec/tests/sidenav/sidenavSpec.js
    1:1   warning  Unused eslint-disable directive (no problems were reported from 'no-undef')
   40:11  error    'dragTarget' is never reassigned. Use 'const' instead                        prefer-const
   42:11  error    'overlay' is never reassigned. Use 'const' instead                           prefer-const
   77:11  error    'sidenav' is never reassigned. Use 'const' instead                           prefer-const
   93:11  error    'overlay' is never reassigned. Use 'const' instead                           prefer-const
  111:11  error    'sidenav' is never reassigned. Use 'const' instead                           prefer-const
  112:11  error    'overlay' is never reassigned. Use 'const' instead                           prefer-const
  113:11  error    'dragTarget' is never reassigned. Use 'const' instead                        prefer-const

/Users/geertselderslaghs/dev/materialize/spec/tests/slider/sliderSpec.js
  1:1  warning  Unused eslint-disable directive (no problems were reported from 'no-undef')

/Users/geertselderslaghs/dev/materialize/spec/tests/tabs/tabsSpec.js
    1:1   warning  Unused eslint-disable directive (no problems were reported from 'no-undef')
   40:11  error    'activeTab' is never reassigned. Use 'const' instead                         prefer-const
   41:11  error    'activeTabHash' is never reassigned. Use 'const' instead                     prefer-const
   42:11  error    'tabLinks' is never reassigned. Use 'const' instead                          prefer-const
   44:13  error    'tabHash' is never reassigned. Use 'const' instead                           prefer-const
   55:11  error    'indicator' is never reassigned. Use 'const' instead                         prefer-const
   62:11  error    'activeTab' is never reassigned. Use 'const' instead                         prefer-const
   63:11  error    'activeTabHash' is never reassigned. Use 'const' instead                     prefer-const
   64:11  error    'disabledTab' is never reassigned. Use 'const' instead                       prefer-const
   65:11  error    'disabledTabHash' is never reassigned. Use 'const' instead                   prefer-const
   66:11  error    'firstTab' is never reassigned. Use 'const' instead                          prefer-const
   67:11  error    'firstTabHash' is never reassigned. Use 'const' instead                      prefer-const
   68:11  error    'indicator' is never reassigned. Use 'const' instead                         prefer-const
  100:11  error    'activeTab' is never reassigned. Use 'const' instead                         prefer-const
  101:11  error    'activeTabHash' is never reassigned. Use 'const' instead                     prefer-const
  102:11  error    'indicator' is never reassigned. Use 'const' instead                         prefer-const
  117:11  error    'tabs' is never reassigned. Use 'const' instead                              prefer-const
  135:11  error    'activeTab' is never reassigned. Use 'const' instead                         prefer-const
  136:11  error    'activeTabHash' is never reassigned. Use 'const' instead                     prefer-const
  137:11  error    'firstTab' is never reassigned. Use 'const' instead                          prefer-const
  138:11  error    'firstTabHash' is never reassigned. Use 'const' instead                      prefer-const
  139:11  error    'indicator' is never reassigned. Use 'const' instead                         prefer-const
  140:11  error    'tabs' is never reassigned. Use 'const' instead                              prefer-const
  142:13  error    'tabHash' is never reassigned. Use 'const' instead                           prefer-const
  173:11  error    'tabNoContent' is never reassigned. Use 'const' instead                      prefer-const

/Users/geertselderslaghs/dev/materialize/spec/tests/toast/toastSpec.js
   1:1   warning  Unused eslint-disable directive (no problems were reported from 'no-undef')
  54:13  error    'toast' is assigned a value but never used                                   @typescript-eslint/no-unused-vars
  68:13  error    'toast' is assigned a value but never used                                   @typescript-eslint/no-unused-vars

/Users/geertselderslaghs/dev/materialize/spec/tests/tooltip/tooltipSpec.js
   1:1   warning  Unused eslint-disable directive (no problems were reported from 'no-undef')
  74:13  error    'tooltipRect' is never reassigned. Use 'const' instead                       prefer-const
  75:13  error    'tooltippedBtnRect' is never reassigned. Use 'const' instead                 prefer-const

/Users/geertselderslaghs/dev/materialize/src/autocomplete.ts
   71:5   error  '_defaults' is never reassigned. Use 'const' instead        prefer-const
  115:17  error  Unexpected any. Specify a different type                    @typescript-eslint/no-explicit-any
  160:19  error  Unexpected any. Specify a different type                    @typescript-eslint/no-explicit-any
  166:17  error  Unexpected any. Specify a different type                    @typescript-eslint/no-explicit-any
  229:9   error  'dropdownOptions' is never reassigned. Use 'const' instead  prefer-const
  233:9   error  'userOnItemClick' is never reassigned. Use 'const' instead  prefer-const

/Users/geertselderslaghs/dev/materialize/src/buttons.ts
   21:5   error  '_defaults' is never reassigned. Use 'const' instead                   prefer-const
   46:17  error  Unexpected any. Specify a different type                               @typescript-eslint/no-explicit-any
   99:19  error  Unexpected any. Specify a different type                               @typescript-eslint/no-explicit-any
  104:17  error  Unexpected any. Specify a different type                               @typescript-eslint/no-explicit-any
  135:30  error  Expected an assignment or function call and instead saw an expression  @typescript-eslint/no-unused-expressions
  202:9   error  'windowWidth' is never reassigned. Use 'const' instead                 prefer-const
  203:9   error  'windowHeight' is never reassigned. Use 'const' instead                prefer-const
  204:9   error  'btnRect' is never reassigned. Use 'const' instead                     prefer-const
  215:5   error  'scaleFactor' is never reassigned. Use 'const' instead                 prefer-const

/Users/geertselderslaghs/dev/materialize/src/carousel.ts
   52:5   error    '_defaults' is never reassigned. Use 'const' instead         prefer-const
   75:14  error    Unexpected any. Specify a different type                     @typescript-eslint/no-explicit-any
   76:15  error    Unexpected any. Specify a different type                     @typescript-eslint/no-explicit-any
   78:16  error    Unexpected any. Specify a different type                     @typescript-eslint/no-explicit-any
   82:14  error    Unexpected any. Specify a different type                     @typescript-eslint/no-explicit-any
   83:15  error    Unexpected any. Specify a different type                     @typescript-eslint/no-explicit-any
   91:16  error    Unexpected any. Specify a different type                     @typescript-eslint/no-explicit-any
   92:21  error    Unexpected any. Specify a different type                     @typescript-eslint/no-explicit-any
   93:20  error    Unexpected any. Specify a different type                     @typescript-eslint/no-explicit-any
   97:17  error    Unexpected any. Specify a different type                     @typescript-eslint/no-explicit-any
  154:7   warning  Unexpected var, use let or const instead                     no-var
  192:19  error    Unexpected any. Specify a different type                     @typescript-eslint/no-explicit-any
  197:17  error    Unexpected any. Specify a different type                     @typescript-eslint/no-explicit-any
  437:5   error    'now' is never reassigned. Use 'const' instead               prefer-const
  438:5   error    'elapsed' is never reassigned. Use 'const' instead           prefer-const
  440:5   error    'delta' is never reassigned. Use 'const' instead             prefer-const
  442:5   error    'v' is never reassigned. Use 'const' instead                 prefer-const
  483:9   error    'lastCenter' is never reassigned. Use 'const' instead        prefer-const
  484:9   error    'numVisibleOffset' is never reassigned. Use 'const' instead  prefer-const
  489:5   error    'delta' is never reassigned. Use 'const' instead             prefer-const
  490:5   error    'dir' is never reassigned. Use 'const' instead               prefer-const
  491:5   error    'tween' is never reassigned. Use 'const' instead             prefer-const
  492:5   error    'half' is never reassigned. Use 'const' instead              prefer-const
  527:11  error    'transformString' is never reassigned. Use 'const' instead   prefer-const
  546:13  error    'transformString' is never reassigned. Use 'const' instead   prefer-const
  561:13  error    'transformString' is never reassigned. Use 'const' instead   prefer-const
  570:11  error    'transformString' is never reassigned. Use 'const' instead   prefer-const

/Users/geertselderslaghs/dev/materialize/src/characterCounter.ts
   3:18  error  An interface declaring no members is equivalent to its supertype                                                                                                                                                                                                                                                                                                                           @typescript-eslint/no-empty-object-type
   9:49  error  The `{}` ("empty object") type allows any non-nullish value, including literals like `0` and `""`.
- If that's what you want, disable this lint rule with an inline comment or configure the 'allowObjectTypes' rule option.
- If you want a type meaning "any object", you probably want `object` instead.
- If you want a type meaning "any value", you probably want `unknown` instead  @typescript-eslint/no-empty-object-type
  21:17  error  Unexpected any. Specify a different type                                                                                                                                                                                                                                                                                                                                                   @typescript-eslint/no-explicit-any
  61:19  error  Unexpected any. Specify a different type                                                                                                                                                                                                                                                                                                                                                   @typescript-eslint/no-explicit-any
  66:17  error  Unexpected any. Specify a different type                                                                                                                                                                                                                                                                                                                                                   @typescript-eslint/no-explicit-any
  94:9   error  'maxLength' is never reassigned. Use 'const' instead                                                                                                                                                                                                                                                                                                                                       prefer-const
  95:7   error  'actualLength' is never reassigned. Use 'const' instead                                                                                                                                                                                                                                                                                                                                    prefer-const

/Users/geertselderslaghs/dev/materialize/src/chips.ts
   73:5   error  '_defaults' is never reassigned. Use 'const' instead  prefer-const
   98:11  error  Unexpected any. Specify a different type              @typescript-eslint/no-explicit-any
  101:26  error  Unexpected any. Specify a different type              @typescript-eslint/no-explicit-any
  105:17  error  Unexpected any. Specify a different type              @typescript-eslint/no-explicit-any
  160:19  error  Unexpected any. Specify a different type              @typescript-eslint/no-explicit-any
  171:17  error  Unexpected any. Specify a different type              @typescript-eslint/no-explicit-any
  222:40  error  Unexpected any. Specify a different type              @typescript-eslint/no-explicit-any
  257:28  error  'e' is defined but never used                         @typescript-eslint/no-unused-vars
  264:42  error  Unexpected any. Specify a different type              @typescript-eslint/no-explicit-any
  430:34  error  Unexpected any. Specify a different type              @typescript-eslint/no-explicit-any

/Users/geertselderslaghs/dev/materialize/src/collapsible.ts
   57:17  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  108:19  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  113:17  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/Users/geertselderslaghs/dev/materialize/src/component.ts
    4:18  error  An empty interface declaration allows any non-nullish value, including literals like `0` and `""`.
- If that's what you want, disable this lint rule with an inline comment or configure the 'allowInterfaces' rule option.
- If you want a type meaning "any object", you probably want `object` instead.
- If you want a type meaning "any value", you probably want `unknown` instead  @typescript-eslint/no-empty-object-type
   47:9   error  'ins' is never reassigned. Use 'const' instead                                                                                                                                                                                                                                                                                                                                            prefer-const
  112:22  error  'el' is defined but never used                                                                                                                                                                                                                                                                                                                                                            @typescript-eslint/no-unused-vars

/Users/geertselderslaghs/dev/materialize/src/datepicker.ts
  139:13  error  Unexpected any. Specify a different type                        @typescript-eslint/no-explicit-any
  141:13  error  Unexpected any. Specify a different type                        @typescript-eslint/no-explicit-any
  143:14  error  Unexpected any. Specify a different type                        @typescript-eslint/no-explicit-any
  145:14  error  Unexpected any. Specify a different type                        @typescript-eslint/no-explicit-any
  147:16  error  Unexpected any. Specify a different type                        @typescript-eslint/no-explicit-any
  149:14  error  Unexpected any. Specify a different type                        @typescript-eslint/no-explicit-any
  152:5   error  '_defaults' is never reassigned. Use 'const' instead            prefer-const
  255:12  error  Unexpected any. Specify a different type                        @typescript-eslint/no-explicit-any
  256:14  error  Unexpected any. Specify a different type                        @typescript-eslint/no-explicit-any
  257:15  error  Unexpected any. Specify a different type                        @typescript-eslint/no-explicit-any
  258:15  error  Unexpected any. Specify a different type                        @typescript-eslint/no-explicit-any
  263:17  error  Unexpected any. Specify a different type                        @typescript-eslint/no-explicit-any
  290:9   error  'defDate' is never reassigned. Use 'const' instead              prefer-const
  341:9   error  'day' is never reassigned. Use 'const' instead                  prefer-const
  366:19  error  Unexpected any. Specify a different type                        @typescript-eslint/no-explicit-any
  374:17  error  Unexpected any. Specify a different type                        @typescript-eslint/no-explicit-any
  378:9   error  'oldYearSelect' is never reassigned. Use 'const' instead        prefer-const
  382:9   error  'oldMonthSelect' is never reassigned. Use 'const' instead       prefer-const
  453:9   error  'min' is never reassigned. Use 'const' instead                  prefer-const
  454:7   error  'max' is never reassigned. Use 'const' instead                  prefer-const
  491:9   error  'displayDate' is never reassigned. Use 'const' instead          prefer-const
  492:9   error  'i18n' is never reassigned. Use 'const' instead                 prefer-const
  493:9   error  'day' is never reassigned. Use 'const' instead                  prefer-const
  494:9   error  'month' is never reassigned. Use 'const' instead                prefer-const
  495:9   error  'date' is never reassigned. Use 'const' instead                 prefer-const
  510:11  error  'firstVisibleDate' is never reassigned. Use 'const' instead     prefer-const
  511:9   error  'lastVisibleDate' is never reassigned. Use 'const' instead      prefer-const
  516:9   error  'visibleDate' is never reassigned. Use 'const' instead          prefer-const
  562:9   error  'opts' is never reassigned. Use 'const' instead                 prefer-const
  563:7   error  'now' is never reassigned. Use 'const' instead                  prefer-const
  564:7   error  'days' is never reassigned. Use 'const' instead                 prefer-const
  566:7   error  'data' is never reassigned. Use 'const' instead                 prefer-const
  575:9   error  'previousMonth' is never reassigned. Use 'const' instead        prefer-const
  576:7   error  'nextMonth' is never reassigned. Use 'const' instead            prefer-const
  577:7   error  'yearOfPreviousMonth' is never reassigned. Use 'const' instead  prefer-const
  578:7   error  'yearOfNextMonth' is never reassigned. Use 'const' instead      prefer-const
  579:7   error  'daysInPreviousMonth' is never reassigned. Use 'const' instead  prefer-const
  588:11  error  'day' is never reassigned. Use 'const' instead                  prefer-const
  589:9   error  'isSelected' is never reassigned. Use 'const' instead           prefer-const
  592:9   error  'isToday' is never reassigned. Use 'const' instead              prefer-const
  593:9   error  'hasEvent' is never reassigned. Use 'const' instead             prefer-const
  594:9   error  'isEmpty' is never reassigned. Use 'const' instead              prefer-const
  598:9   error  'isStartRange' is never reassigned. Use 'const' instead         prefer-const
  599:9   error  'isEndRange' is never reassigned. Use 'const' instead           prefer-const
  600:9   error  'isInRange' is never reassigned. Use 'const' instead            prefer-const
  602:9   error  'isDisabled' is never reassigned. Use 'const' instead           prefer-const
  620:11  error  'dayConfig' is never reassigned. Use 'const' instead            prefer-const
  648:9   error  'arr' is never reassigned. Use 'const' instead                  prefer-const
  711:7   error  'arr' is never reassigned. Use 'const' instead                  prefer-const
  732:7   error  'opts' is never reassigned. Use 'const' instead                 prefer-const
  733:7   error  'isMinYear' is never reassigned. Use 'const' instead            prefer-const
  734:7   error  'isMaxYear' is never reassigned. Use 'const' instead            prefer-const
  759:5   error  'monthHtml' is never reassigned. Use 'const' instead            prefer-const
  777:5   error  'yearHtml' is never reassigned. Use 'const' instead             prefer-const
  779:9   error  'leftArrow' is never reassigned. Use 'const' instead            prefer-const
  801:9   error  'rightArrow' is never reassigned. Use 'const' instead           prefer-const
  813:9   error  'opts' is never reassigned. Use 'const' instead                 prefer-const
  814:7   error  'minYear' is never reassigned. Use 'const' instead              prefer-const
  815:7   error  'maxYear' is never reassigned. Use 'const' instead              prefer-const
  816:7   error  'minMonth' is never reassigned. Use 'const' instead             prefer-const
  817:7   error  'maxMonth' is never reassigned. Use 'const' instead             prefer-const
  834:5   error  'randId' is never reassigned. Use 'const' instead               prefer-const
  859:9   error  'yearSelect' is never reassigned. Use 'const' instead           prefer-const
  860:9   error  'monthSelect' is never reassigned. Use 'const' instead          prefer-const
  911:13  error  'd' is never reassigned. Use 'const' instead                    prefer-const
  924:13  error  'm' is never reassigned. Use 'const' instead                    prefer-const

/Users/geertselderslaghs/dev/materialize/src/dropdown.ts
  107:16  error  Unexpected any. Specify a different type                                                                                 @typescript-eslint/no-explicit-any
  112:17  error  Unexpected any. Specify a different type                                                                                 @typescript-eslint/no-explicit-any
  162:19  error  Unexpected any. Specify a different type                                                                                 @typescript-eslint/no-explicit-any
  169:17  error  Unexpected any. Specify a different type                                                                                 @typescript-eslint/no-explicit-any
  236:11  error  Unexpected any. Specify a different type                                                                                 @typescript-eslint/no-explicit-any
  237:9   error  Unexpected any. Specify a different type                                                                                 @typescript-eslint/no-explicit-any
  311:13  error  Unexpected any. Specify a different type                                                                                 @typescript-eslint/no-explicit-any
  364:26  error  'e' is defined but never used                                                                                            @typescript-eslint/no-unused-vars
  433:11  error  'offsetParentBRect' is assigned a value but never used                                                                   @typescript-eslint/no-unused-vars
  554:59  error  The `Function` type accepts any function-like value.
Prefer explicitly defining any function parameters and return type  @typescript-eslint/no-unsafe-function-type

/Users/geertselderslaghs/dev/materialize/src/forms.ts
   15:9   error  'hasLength' is never reassigned. Use 'const' instead  prefer-const
   16:9   error  'lenAttr' is never reassigned. Use 'const' instead    prefer-const
   17:9   error  'len' is never reassigned. Use 'const' instead        prefer-const
  131:47  error  'e' is defined but never used                         @typescript-eslint/no-unused-vars
  154:44  error  'e' is defined but never used                         @typescript-eslint/no-unused-vars
  155:46  error  'e' is defined but never used                         @typescript-eslint/no-unused-vars
  159:46  error  'e' is defined but never used                         @typescript-eslint/no-unused-vars

/Users/geertselderslaghs/dev/materialize/src/index.ts
   5:10  error  'CharacterCounter' is defined but never used         @typescript-eslint/no-unused-vars
   5:28  error  'CharacterCounterOptions' is defined but never used  @typescript-eslint/no-unused-vars
  18:10  error  'Slider' is defined but never used                   @typescript-eslint/no-unused-vars
  18:18  error  'SliderOptions' is defined but never used            @typescript-eslint/no-unused-vars
  22:10  error  'Toast' is defined but never used                    @typescript-eslint/no-unused-vars
  22:17  error  'ToastOptions' is defined but never used             @typescript-eslint/no-unused-vars
  27:10  error  'Component' is defined but never used                @typescript-eslint/no-unused-vars
  57:32  error  Unexpected any. Specify a different type             @typescript-eslint/no-explicit-any
  61:34  error  Unexpected any. Specify a different type             @typescript-eslint/no-explicit-any
  92:7   error  'registry' is never reassigned. Use 'const' instead  prefer-const

/Users/geertselderslaghs/dev/materialize/src/materialbox.ts
   71:17  error  Unexpected any. Specify a different type                               @typescript-eslint/no-explicit-any
  118:19  error  Unexpected any. Specify a different type                               @typescript-eslint/no-explicit-any
  123:17  error  Unexpected any. Specify a different type                               @typescript-eslint/no-explicit-any
  268:7   error  Expected an assignment or function call and instead saw an expression  @typescript-eslint/no-unused-expressions
  308:45  error  'e' is defined but never used                                          @typescript-eslint/no-unused-vars

/Users/geertselderslaghs/dev/materialize/src/modal.ts
   90:28  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
   96:17  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  143:19  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  151:17  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  174:64  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/Users/geertselderslaghs/dev/materialize/src/parallax.ts
   12:5   error  '_defaults' is never reassigned. Use 'const' instead         prefer-const
   20:40  error  Unexpected any. Specify a different type                     @typescript-eslint/no-explicit-any
   21:46  error  Unexpected any. Specify a different type                     @typescript-eslint/no-explicit-any
   25:17  error  Unexpected any. Specify a different type                     @typescript-eslint/no-explicit-any
   66:19  error  Unexpected any. Specify a different type                     @typescript-eslint/no-explicit-any
   73:17  error  Unexpected any. Specify a different type                     @typescript-eslint/no-explicit-any
   78:11  error  'parallaxInstance' is never reassigned. Use 'const' instead  prefer-const
   85:11  error  'parallaxInstance' is never reassigned. Use 'const' instead  prefer-const
  131:97  error  Unexpected any. Specify a different type                     @typescript-eslint/no-explicit-any

/Users/geertselderslaghs/dev/materialize/src/pushpin.ts
   30:5   error  '_defaults' is never reassigned. Use 'const' instead  prefer-const
   38:21  error  Unexpected any. Specify a different type              @typescript-eslint/no-explicit-any
   39:19  error  Unexpected any. Specify a different type              @typescript-eslint/no-explicit-any
   43:17  error  Unexpected any. Specify a different type              @typescript-eslint/no-explicit-any
   82:19  error  Unexpected any. Specify a different type              @typescript-eslint/no-explicit-any
   89:9   error  'index' is never reassigned. Use 'const' instead      prefer-const
   94:17  error  Unexpected any. Specify a different type              @typescript-eslint/no-explicit-any
   98:14  error  'elIndex' is never reassigned. Use 'const' instead    prefer-const
   99:11  error  'pInstance' is never reassigned. Use 'const' instead  prefer-const
  113:9   error  'scrolled' is never reassigned. Use 'const' instead   prefer-const

/Users/geertselderslaghs/dev/materialize/src/range.ts
   3:18  error  An interface declaring no members is equivalent to its supertype  @typescript-eslint/no-empty-object-type
  17:17  error  Unexpected any. Specify a different type                          @typescript-eslint/no-explicit-any
  55:19  error  Unexpected any. Specify a different type                          @typescript-eslint/no-explicit-any
  61:17  error  Unexpected any. Specify a different type                          @typescript-eslint/no-explicit-any

/Users/geertselderslaghs/dev/materialize/src/scrollspy.ts
   42:5   error  '_defaults' is never reassigned. Use 'const' instead      prefer-const
   56:28  error  Unexpected any. Specify a different type                  @typescript-eslint/no-explicit-any
   61:15  error  Unexpected any. Specify a different type                  @typescript-eslint/no-explicit-any
   65:17  error  Unexpected any. Specify a different type                  @typescript-eslint/no-explicit-any
  107:19  error  Unexpected any. Specify a different type                  @typescript-eslint/no-explicit-any
  118:17  error  Unexpected any. Specify a different type                  @typescript-eslint/no-explicit-any
  147:30  error  Unexpected any. Specify a different type                  @typescript-eslint/no-explicit-any
  148:74  error  Unexpected any. Specify a different type                  @typescript-eslint/no-explicit-any
  162:9   error  'top' is never reassigned. Use 'const' instead            prefer-const
  163:7   error  'left' is never reassigned. Use 'const' instead           prefer-const
  164:7   error  'right' is never reassigned. Use 'const' instead          prefer-const
  165:7   error  'bottom' is never reassigned. Use 'const' instead         prefer-const
  168:9   error  'intersections' is never reassigned. Use 'const' instead  prefer-const
  170:11  error  'scrollspy' is never reassigned. Use 'const' instead      prefer-const
  171:11  error  'lastTick' is never reassigned. Use 'const' instead       prefer-const
  182:11  error  'scrollspy' is never reassigned. Use 'const' instead      prefer-const
  183:11  error  'lastTick' is never reassigned. Use 'const' instead       prefer-const
  193:53  error  Unexpected any. Specify a different type                  @typescript-eslint/no-explicit-any
  222:9   error  'hits' is never reassigned. Use 'const' instead           prefer-const
  224:11  error  'scrollspy' is never reassigned. Use 'const' instead      prefer-const
  225:11  error  'currTop' is never reassigned. Use 'const' instead        prefer-const
  228:13  error  'elTop' is never reassigned. Use 'const' instead          prefer-const
  229:11  error  'elLeft' is never reassigned. Use 'const' instead         prefer-const
  230:11  error  'elRight' is never reassigned. Use 'const' instead        prefer-const
  231:11  error  'elBottom' is never reassigned. Use 'const' instead       prefer-const
  233:13  error  'isIntersect' is never reassigned. Use 'const' instead    prefer-const

/Users/geertselderslaghs/dev/materialize/src/select.ts
   18:5   error  '_defaults' is never reassigned. Use 'const' instead  prefer-const
   51:17  error  Unexpected any. Specify a different type              @typescript-eslint/no-explicit-any
   91:19  error  Unexpected any. Specify a different type              @typescript-eslint/no-explicit-any
   97:17  error  Unexpected any. Specify a different type              @typescript-eslint/no-explicit-any
  279:36  error  'el' is defined but never used                        @typescript-eslint/no-unused-vars
  302:37  error  'el' is defined but never used                        @typescript-eslint/no-unused-vars

/Users/geertselderslaghs/dev/materialize/src/sidenav.ts
   91:17  error    Unexpected any. Specify a different type                  @typescript-eslint/no-explicit-any
  139:19  error    Unexpected any. Specify a different type                  @typescript-eslint/no-explicit-any
  147:17  error    Unexpected any. Specify a different type                  @typescript-eslint/no-explicit-any
  166:5   warning  Unexpected var, use let or const instead                  no-var
  205:70  error    Unexpected any. Specify a different type                  @typescript-eslint/no-explicit-any
  304:11  error    'dragDirection' is never reassigned. Use 'const' instead  prefer-const
  483:7   error    'slideOutPercent' is assigned a value but never used      @typescript-eslint/no-unused-vars
  530:69  error    Unexpected any. Specify a different type                  @typescript-eslint/no-explicit-any

/Users/geertselderslaghs/dev/materialize/src/slider.ts
   45:5   error  '_defaults' is never reassigned. Use 'const' instead  prefer-const
   71:17  error  Unexpected any. Specify a different type              @typescript-eslint/no-explicit-any
  174:19  error  Unexpected any. Specify a different type              @typescript-eslint/no-explicit-any
  181:17  error  Unexpected any. Specify a different type              @typescript-eslint/no-explicit-any

/Users/geertselderslaghs/dev/materialize/src/tabs.ts
   29:5   error    '_defaults' is never reassigned. Use 'const' instead  prefer-const
   42:18  error    Unexpected any. Specify a different type              @typescript-eslint/no-explicit-any
   43:19  error    Unexpected any. Specify a different type              @typescript-eslint/no-explicit-any
   44:13  error    Unexpected any. Specify a different type              @typescript-eslint/no-explicit-any
   48:17  error    Unexpected any. Specify a different type              @typescript-eslint/no-explicit-any
   95:19  error    Unexpected any. Specify a different type              @typescript-eslint/no-explicit-any
  107:17  error    Unexpected any. Specify a different type              @typescript-eslint/no-explicit-any
  138:5   warning  Unexpected var, use let or const instead              no-var

/Users/geertselderslaghs/dev/materialize/src/tapTarget.ts
   17:5   error  '_defaults' is never reassigned. Use 'const' instead  prefer-const
   36:17  error  Unexpected any. Specify a different type              @typescript-eslint/no-explicit-any
   77:19  error  Unexpected any. Specify a different type              @typescript-eslint/no-explicit-any
   82:17  error  Unexpected any. Specify a different type              @typescript-eslint/no-explicit-any
  169:24  error  Unexpected any. Specify a different type              @typescript-eslint/no-explicit-any

/Users/geertselderslaghs/dev/materialize/src/timepicker.ts
  100:5   error    '_defaults' is never reassigned. Use 'const' instead     prefer-const
  137:10  error    Unexpected any. Specify a different type                 @typescript-eslint/no-explicit-any
  138:17  error    Unexpected any. Specify a different type                 @typescript-eslint/no-explicit-any
  151:9   error    Unexpected any. Specify a different type                 @typescript-eslint/no-explicit-any
  153:10  error    Unexpected any. Specify a different type                 @typescript-eslint/no-explicit-any
  154:12  error    Unexpected any. Specify a different type                 @typescript-eslint/no-explicit-any
  162:21  error    Unexpected any. Specify a different type                 @typescript-eslint/no-explicit-any
  168:14  error    Unexpected any. Specify a different type                 @typescript-eslint/no-explicit-any
  177:11  error    Unexpected any. Specify a different type                 @typescript-eslint/no-explicit-any
  178:17  error    Unexpected any. Specify a different type                 @typescript-eslint/no-explicit-any
  182:17  error    Unexpected any. Specify a different type                 @typescript-eslint/no-explicit-any
  228:9   error    'svgNS' is never reassigned. Use 'const' instead         prefer-const
  241:19  error    Unexpected any. Specify a different type                 @typescript-eslint/no-explicit-any
  248:17  error    Unexpected any. Specify a different type                 @typescript-eslint/no-explicit-any
  288:9   error    'clockPlateBR' is never reassigned. Use 'const' instead  prefer-const
  289:9   error    'offset' is never reassigned. Use 'const' instead        prefer-const
  294:9   error    'clickPos' is never reassigned. Use 'const' instead      prefer-const
  310:9   error    'clickPos' is never reassigned. Use 'const' instead      prefer-const
  311:9   error    'x' is never reassigned. Use 'const' instead             prefer-const
  312:9   error    'y' is never reassigned. Use 'const' instead             prefer-const
  321:9   error    'clickPos' is never reassigned. Use 'const' instead      prefer-const
  322:9   error    'x' is never reassigned. Use 'const' instead             prefer-const
  323:9   error    'y' is never reassigned. Use 'const' instead             prefer-const
  394:23  error    Unexpected any. Specify a different type                 @typescript-eslint/no-explicit-any
  462:9   error    'dialRadius' is never reassigned. Use 'const' instead    prefer-const
  463:9   error    'tickRadius' is never reassigned. Use 'const' instead    prefer-const
  464:9   error    'diameter' is never reassigned. Use 'const' instead      prefer-const
  465:9   error    'svg' is never reassigned. Use 'const' instead           prefer-const
  469:9   error    'g' is never reassigned. Use 'const' instead             prefer-const
  471:9   error    'bearing' is never reassigned. Use 'const' instead       prefer-const
  476:9   error    'hand' is never reassigned. Use 'const' instead          prefer-const
  479:9   error    'bg' is never reassigned. Use 'const' instead            prefer-const
  577:11  error    'now' is never reassigned. Use 'const' instead           prefer-const
  599:9   error    'isHours' is never reassigned. Use 'const' instead       prefer-const
  600:7   error    'nextView' is never reassigned. Use 'const' instead      prefer-const
  601:7   error    'hideView' is never reassigned. Use 'const' instead      prefer-const
  629:9   error    'view' is never reassigned. Use 'const' instead          prefer-const
  630:7   error    'value' is never reassigned. Use 'const' instead         prefer-const
  631:7   error    'isHours' is never reassigned. Use 'const' instead       prefer-const
  632:7   error    'unit' is never reassigned. Use 'const' instead          prefer-const
  633:7   error    'radian' is never reassigned. Use 'const' instead        prefer-const
  634:7   error    'radius' is never reassigned. Use 'const' instead        prefer-const
  636:7   error    'x' is never reassigned. Use 'const' instead             prefer-const
  637:7   error    'y' is never reassigned. Use 'const' instead             prefer-const
  638:7   warning  Unexpected aliasing of 'this' to local variable          @typescript-eslint/no-this-alias
  638:7   error    'self' is never reassigned. Use 'const' instead          prefer-const
  691:7   error    'isHours' is never reassigned. Use 'const' instead       prefer-const
  692:7   error    'unit' is never reassigned. Use 'const' instead          prefer-const
  693:7   error    'z' is never reassigned. Use 'const' instead             prefer-const
  694:7   error    'inner' is never reassigned. Use 'const' instead         prefer-const
  762:9   error    'cx1' is never reassigned. Use 'const' instead           prefer-const
  763:7   error    'cy1' is never reassigned. Use 'const' instead           prefer-const
  764:7   error    'cx2' is never reassigned. Use 'const' instead           prefer-const
  765:7   error    'cy2' is never reassigned. Use 'const' instead           prefer-const
  807:11  error    'e' is assigned a value but never used                   @typescript-eslint/no-unused-vars
  809:9   error    'last' is never reassigned. Use 'const' instead          prefer-const

/Users/geertselderslaghs/dev/materialize/src/toasts.ts
   47:5   error  '_defaults' is never reassigned. Use 'const' instead           prefer-const
   80:22  error  Unexpected any. Specify a different type                       @typescript-eslint/no-explicit-any
   96:9   error  'toastElement' is never reassigned. Use 'const' instead        prefer-const
   97:22  error  Unexpected any. Specify a different type                       @typescript-eslint/no-explicit-any
  108:19  error  Unexpected any. Specify a different type                       @typescript-eslint/no-explicit-any
  135:42  error  Unexpected any. Specify a different type                       @typescript-eslint/no-explicit-any
  164:11  error  'toast' is never reassigned. Use 'const' instead               prefer-const
  168:11  error  'totalDeltaX' is never reassigned. Use 'const' instead         prefer-const
  169:11  error  'activationDistance' is never reassigned. Use 'const' instead  prefer-const
  170:11  error  'shouldBeDismissed' is never reassigned. Use 'const' instead   prefer-const
  199:14  error  'toastIndex' is never reassigned. Use 'const' instead          prefer-const
  264:9   error  'activationDistance' is never reassigned. Use 'const' instead  prefer-const

/Users/geertselderslaghs/dev/materialize/src/tooltip.ts
   94:17  error  Unexpected any. Specify a different type                               @typescript-eslint/no-explicit-any
  135:19  error  Unexpected any. Specify a different type                               @typescript-eslint/no-explicit-any
  141:17  error  Unexpected any. Specify a different type                               @typescript-eslint/no-explicit-any
  233:5   error  Expected an assignment or function call and instead saw an expression  @typescript-eslint/no-unused-expressions
  359:9   error  'attributeOptions' is never reassigned. Use 'const' instead            prefer-const

/Users/geertselderslaghs/dev/materialize/src/utils.ts
   54:25  error    'e' is defined but never used                                                                                            @typescript-eslint/no-unused-vars
   64:24  error    'e' is defined but never used                                                                                            @typescript-eslint/no-unused-vars
   87:9   error    'edges' is never reassigned. Use 'const' instead                                                                         prefer-const
   94:9   error    'containerRect' is never reassigned. Use 'const' instead                                                                 prefer-const
   96:9   error    'containerBottom' is never reassigned. Use 'const' instead                                                               prefer-const
  101:9   error    'scrollLeft' is never reassigned. Use 'const' instead                                                                    prefer-const
  102:9   error    'scrollTop' is never reassigned. Use 'const' instead                                                                     prefer-const
  104:9   error    'scrolledX' is never reassigned. Use 'const' instead                                                                     prefer-const
  105:9   error    'scrolledY' is never reassigned. Use 'const' instead                                                                     prefer-const
  141:9   error    'canAlign' is never reassigned. Use 'const' instead                                                                      prefer-const
  161:9   error    'containerAllowsOverflow' is never reassigned. Use 'const' instead                                                       prefer-const
  162:9   error    'containerRect' is never reassigned. Use 'const' instead                                                                 prefer-const
  163:9   error    'containerHeight' is never reassigned. Use 'const' instead                                                               prefer-const
  164:9   error    'containerWidth' is never reassigned. Use 'const' instead                                                                prefer-const
  165:9   error    'elOffsetRect' is never reassigned. Use 'const' instead                                                                  prefer-const
  167:9   error    'scrollLeft' is never reassigned. Use 'const' instead                                                                    prefer-const
  168:9   error    'scrollTop' is never reassigned. Use 'const' instead                                                                     prefer-const
  170:9   error    'scrolledX' is never reassigned. Use 'const' instead                                                                     prefer-const
  171:9   error    'scrolledYTopEdge' is never reassigned. Use 'const' instead                                                              prefer-const
  172:9   error    'scrolledYBottomEdge' is never reassigned. Use 'const' instead                                                           prefer-const
  242:25  error    The `Function` type accepts any function-like value.
Prefer explicitly defining any function parameters and return type  @typescript-eslint/no-unsafe-function-type
  243:52  error    Unexpected any. Specify a different type                                                                                 @typescript-eslint/no-explicit-any
  246:5   error    Expected an assignment or function call and instead saw an expression                                                    @typescript-eslint/no-unused-expressions
  247:9   error    'later' is never reassigned. Use 'const' instead                                                                         prefer-const
  254:11  error    'now' is never reassigned. Use 'const' instead                                                                           prefer-const
  256:11  error    'remaining' is never reassigned. Use 'const' instead                                                                     prefer-const
  257:7   warning  Unexpected aliasing of 'this' to local variable                                                                          @typescript-eslint/no-this-alias
  258:14  warning  Use the rest parameters instead of 'arguments'                                                                           prefer-rest-params

✖ 477 problems (453 errors, 24 warnings)

Types of changes

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to change).

Checklist:

  • I have read the CONTRIBUTING document.
  • My commit messages follows the conventional commit format
  • My change requires a change to the documentation, and updated it accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@wuda-io wuda-io merged commit 46d8e00 into materializecss:v2-dev Dec 14, 2024
1 check failed
@gselderslaghs gselderslaghs mentioned this pull request Dec 19, 2024
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants